Create one-time app purchases
You can create single or multiple app purchases, depending on your billing model for your app. An app purchase creates a charge to the merchant. This section teaches you how create single and multiple app charges using the Billing API. This section is for developers who charge users to use their apps.
Create a single app charge
Anchor link to section titled "Create a single app charge"You can create a single app charge by using the appPurchaseOneTimeCreate
mutation. Provide the name
, price
, and returnUrl
for the one-time charge. You can use only USD
as the currencyCode
. After the user accepts the charge, the user is redirected to the URL that's returned by the returnURL
.
A single app charge is similar to purchasing a product, where you don't have to continuing making payments after you acquire the product.
To create a single app charge, use the appPurchaseOneTimeCreate
mutation:
Create multiple app charges
Anchor link to section titled "Create multiple app charges"You can create a single app charge by using the appPurchaseOneTimeCreate
mutation. Provide the name
, price
, and returnUrl
for the one-time charge. You can use only USD
as the currencyCode
. After the user accepts the charge, the user is redirected to the URL that's returned by the returnURL
.
Multiple app charges are similar to a "pay as you go" billing model, where, when a service or product has reached a limit, you submit another payment to continue using it.
To create multiple app charges, use the appPurchaseOneTimeCreate
mutation: