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 a revenue share from Shopify. Your share of the revenue is defined in the Shopify Partner revenue share agreement.
- 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.
When the merchant accepts the charge they are 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 charge is declined, then Shopify redirects the merchant and provides a notification message that the app charge was declined.
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 ApplicationCharge, then the merchant is charged when accepting, but you are not paid.
For more information on how the Billing API works, see Billing concepts.