App Recurring payments - Admin Rest API

App Recurring payments - Admin Rest API

ssodano
Shopify Partner
11 1 5

I'm building an app for App Store that offer last mile delivery. App have free plans that allow to pay single shipment on demand, and not free plan that give some shippings free and some advantages.

- How i can integrate through admin rest api the subscription flow? I was looking to https://shopify.dev/docs/api/admin-rest/2023-01/resources/recurringapplicationcharge
seems only way to integrate recurring payment through rest api. In that case, how to specify interval?

- There are webhook event dedicated for subscription activation/update/cancel/renew?
How can i know when subscription renew, or when it was deleted? I was looking to graphQl docs, and it provide endpoints/webhook to manage it, there is something like that for admin rest api integration?

Other admin rest api used:
- carrier service;
- fulfillment orders;

I appreciate any helps.

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 511

Hey @ssodano - hope I'm understanding this correctly, but you want to set up an "on demand" single purchase charge? This is possible in REST using the ApplicationCharge resource (docs on that here). You could set up a one time payment that is charged on demand using that method. 

In terms of webhook events/subscriptions, you should be able to set up a webhook subscription to one of the subscription billing endpoints both through REST and GraphQL. Here's a link to the way to set up a webhook subscription via our REST Admin API. There are subscription topics like the subscription_billing_cycle_edits webhook topic that will provide webhook subscription plan activation/update information as well as other relevant topics for subscription billing plans.  

 

Hope this helps - let me know if I can clarify anything on our end!

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog