The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.
The RecurringApplicationCharge resource facilitates a fixed-value, 30-day recurring charge. You can create an application charge by sending a request with the name the charge should appear under, the price your app is charging, and a return URL where Shopify redirects the merchant after the charge is accepted. After you've created the charge, redirect the merchant to the confirmation URL returned by Shopify. If the charge is declined, then Shopify redirects the merchant and provides a notification message that the app charge was declined.
Note
For testing purposes you can include "test": true
when creating the charge. This prevents the credit card from being charged.
Test shops and demo shops cannot be charged.
Updating an application charge
Each shop can have only one recurring charge per app. When a new recurring application charge is activated for a shop that already has one, the existing recurring charge is canceled and replaced by the new charge. The new recurring charge is then activated.
For example, if you want to offer discounted pricing to a specific merchant, then you can create a new application charge for the shop. This will prompt the shop to accept the new charge in order to continue using the app. The new charge replaces the old billing going forward.
Note: The recurring application charge must be activated or the returned value is
null
.Note: The recurring application charge must be accepted or the returned value is
null
.Note: Returns
null
when the recurring application charge is not canceled.terms
property. See usage charges for more information.capped_amount
property is provided.
Presented to the merchant when they approve an app's usage charges.return_url
property to ensure the merchant is redirected after accepting the charge (an invalid or missing return_url
property may lead to unstable behaviour in the charge approval flow).