Billing API Question

New Member
2 0 0
Are there any built in functions to handle free trails? I don't see anything about that in the documentation, yet the press on the billing API mentions it will allow for them. Please help this is the only thing holding my app back. Thanks, Tim
Shopify Staff
Shopify Staff
195 0 3

Hi Tim,

There aren’t any built-in functions to handle free trials, but handling it yourself is really easy:

* make a record of when the user starts their trial

* on each login, check to see if their trial is finished by comparing the current time with when they started.

  If the trial’s done, then redirect them to a screen saying that their trial is done and now need to pay to continue using the software. Then put a link or button underneath that message to a controller or similar that handles the creation of the charge and the redirection to the Shopify page where the user accepts the charge.

Edward Ocampo-Gooding – Shopify Developer Advocate