POST /non_subscriptions/{non-subscription-app-id}/one_time_purchase

This API is used to sync consumable, non-consumable, and non-renewing product payments in Chargebee.

Servers

Path parameters

Name Type Required Description
non-subscription-app-id String Yes

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Possible values:

  • "all-disabled"
chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-event-actions String No

skip all actions to be done on the events

Possible values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
customer Object No

Parameters for customer

customer.id String No

Google Play Store : The unique id in Chargebee for the customer who made this purchase via Google Play Store. If not provided, a random unique ID generated for the purchase token will be the customer[id]. If the customer record is not found in Chargebee, it is created.

Apple App Store : The unique id in Chargebee for the customer who made this purchase. If not provided, the value is considered to be original_transaction_id (the transaction identifier at Apple, of the original purchase). If the customer record is not found in Chargebee, it is created.

customer.email String No

The email address of the customer who made the purchase.

customer.last_name String No

The last name of the customer who made the purchase.

customer.first_name String No

The first name of the customer who made the purchase.

product Object No

Parameters for product

product.id String Yes

Google Play Store : The unique identifier of the product purchased. The value of this parameter is the productId or sku received from the Google Play Store.
Note: The max chars limit is 95 for the Google Play Store.

Apple App Store : The unique identifier (created in App Store Connect) of the product purchased.

product.price_in_decimal String No

Google Play Store : This parameter is not applicable to the Google Play Store . If the value is passed, it will return a validation error.

Apple App Store : The price paid by the customer for the product. The value is in decimal and in major units of the currency. Provide either this or product[price].

product.price Integer Yes

Google Play Store : This parameter is not applicable to the Google Play Store . If the value is passed, it will return a validation error.

Apple App Store : The price paid by the customer for this product. The unit depends on the type of currency. Provide either this or product[price_in_decimal].

product.name String No

Google Play Store : The name (created in Play Store Console) of the product purchased. If not passed then the product[id] will be considered as the value of product[name].

Apple App Store : The name (created in App Store Connect) of the product purchased.

product.currency_code String Yes

Google Play Store : This parameter is not applicable to the Google Play Store . If the value is passed, it will return a validation error.

Apple App Store : The currency code (ISO 4217 format) for the product.

product.type String Yes

The type of product for one time purchase. * consumable -

This value represents a type of one-time purchase that provides users with in-app benefits or effects that can be consumed or depleted over time, such as lives, gems, boosts, or digital tips. Once consumed, the purchased item is no longer available and must be repurchased to obtain its benefits again. * non_consumable -

The value represents a type of in-app purchase that provides a permanent benefit to the user and can be purchased once without expiration. This type of purchase is typically used to offer premium features or content that enhance the user experience of the app, such as additional filters or cosmetic items in a game. * non_renewing_subscription -

The value represents a type of subscription that grants access to services or content for a limited period of time, such as a season pass to in-game content. Unlike other subscription models, this type of subscription does not renew automatically and requires people to purchase a new subscription once it concludes to continue accessing the content or services.

Possible values:

  • "consumable"
  • "non_renewing_subscription"
  • "non_consumable"
receipt String Yes

Google Play Store : The purchase token taken from the Android device after successful creation of the in-app purchase.

Apple App Store : The Base64 encoded App Store in-app purchase receipt taken from the Apple device after successful creation of the in-app purchase.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.