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 ApplicationCharge resource facilitates one-time charges. This type of charge is recommended for apps that aren’t billed on a recurring basis. 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 can't be charged.
true
,null
.