Subscriptions
Subscribe A Customer
With this same URL scheme, you may also create and subscribe customers to a Stripe Price with recurring billing.
https://app.collectforstripe.com/launchApp?action=subscribe&subscriptionId=[stripe_price_id]&callback=[callbackURL]
Example: Your website has a sign-up form, and you would like to sell memberships in person. Upon new sign-up, trigger this action to create a Stripe Customer, swipe a credit card and subscribe in one simple step.
or
collectforstripe://?action=subscribe&subscriptionId=[stripe_price_id]&callback=[callbackURL]
Please note you may also subscribe existing customers. This option will be presented upon landing in the Collect for Stripe app.
Action
requiredTell the app what type of action to take. In this case, you want to subscribe.
action=subscribe
Subscription ID
requiredIn Stripe, this is the price_id of the desired recurring Price (e.g. starts with price_). You can find this in your Stripe Dashboard Product catalog.
If tax is set in the Collect for Stripe app, it will be added to this subscription and noted before submitting. That tax is set as a percentage on the Stripe Subscription object itself, so it can be easily changed, reset or removed in your Stripe Dashboard later.
Callback
Provide any URL, and Collect will automatically send customers here after charge completion (or failure) with a result and a customer.
callback=https://mywebsite.com/hook
The customer object will now have the new card attached, as well as a new subscription object. See Retrieve the Subscription for more.
Retrieve the Subscription
At the end of a subscription, Collect will route to your provided callback. The system will append a result parameter so you can confirm success or failure.
https://mywebsite.com/hook?result=[success/fail]
Success
Check the result parameter to confirm a successful subscription.
https://mywebsite.com/hook?result=success&customer=cus_0123456789
The main parameter for you to retrieve all relevant subscription information is customer. This will be the actual Stripe Customer ID, which you can use to query Stripe's API and continue in your own app as needed.
Fail
In the event the subscription flow fails or is canceled, Collect will route to your callback with 'fail' as the result.
https://mywebsite.com/hook?result=fail