Charging for your app
Shopify’s Billing API provides an integrated billing solution that enables app charges to be handled by Shopify's merchant invoicing system. Leveraging this functionality provides the best merchant experience while greatly simplifying and streamlining billing for your apps. You select the API resources for your billing model and include the amount to charge; Shopify handles charging the merchant and making sure you get paid.
The Billing API includes three API resources to help meet the needs of your specific billing model:
- ApplicationCharge is used to bill your users one time only, for example when their free trial expires. This type of charge is recommended for apps that aren’t billed on a recurring basis.
- RecurringApplicationCharge is used to bill your users on a recurring 30-day billing cycle.
- UsageCharge – is used to charge merchants when fees are recurring, but vary from month to month.
There are several advantages to using Shopify's Billing API:
- The charges appear directly on the merchant’s Shopify invoice – merchants don't have to input their credit card information to pay for your app.
- Apps that use Shopify’s Billing API see higher free-to-paid conversion rates because charges appear to originate directly from Shopify.
- The correct amount of tax is charged automatically.
- You automatically receive your 80% revenue share from Shopify.
- Shopify handles all chargebacks.
How it works
Creating and issuing charges to users is a multi-step process:
A merchant triggers a charge with an event that you've identified, such as app installation, service plan upgrade, or individual purchase.
Shopify verifies the charge and returns a
confirmation_urlthat redirects the merchant to accept or decline the charge.
The merchant accepts or declines the charge and is redirected to the
return_urlspecified when issuing the charge. The
If the merchant accepts, then the app uses the
charge_idto activate the charge. If the merchant declines, then the merchant should be directed to a different url that confirms the decline of the charge.
After the charge is activated, you'll get paid. If you do not activate a RecurringApplicationCharge, then the merchant is not charged and you are not paid. If you do not activate an ApplicatinCharge, then the merchant is charged when accepting, but you are not paid.
For more information on how the Billing API works, see Billing concepts.