Subscription
Setting up a basic subscription flow is not much different from selling goods online, and as a result, it would require similar steps and building blocks.
Please, refer to the Online Store guide to learn how to set up this flow. After you are done with the basics, here are a few advanced tips for you.
Product Data
You may want to include some additional data with your payment session request. It can be used, for example, to track how much time of subscription you give to your user after the payment.
{
/* ... */
"product": {
"name": "Subscription - 6 Months"
"id": "monthly_basic",
"price": {
"USD_MULTI1": "30.0"
},
"data": `{
\"timeAdded\": 15552000 /* 6 * 30 * 24 * 3600 */
}`
}
/* ... */
}
You can then use this data when handling customers returning to your site.
See also
Check out the full Rest API Reference and Client libraries section to find out more.
Last updated
Was this helpful?