Important:
These APIs operate asynchronously. When you receive a successful response code from an API call, it indicates only the successful submission of your request, not the completion of the operation.
Using the Non-Subscription resource, you can track one-time payments made for consumable, non-consumable, and non-renewing products in Chargebee. Call this API to notify Chargebee of non-subscription purchases made at stores.
Sample non subscription [ JSON ]
{
"invoice_id": "consumable_1000000807994664",
"customer_id": "customer-123",
"charge_id": "consumable-app_store_charge_id-USD"
}
API Index URL GET
https://{site}.chargebee.com/api/v2/non_subscriptions
string, max chars=100 The unique immutable identifier of the invoice imported in Chargebee for which the receipt was sent.
optional, string, max chars=100 The unique immutable identifier of the customer object to which the invoice belongs.
This is a list of the event types we currently support. We will continue
to add more events moving forward. All events follow a uniform pattern -
<resource>_<event_name>. The resources that will be
present in the event content are provided beneath each event type's
description.
Note: If consolidated invoicing is enabled, the
attributes invoice.subscription_id and
credit_note.subscription_id should not be used
(as it will not be present if the invoice / credit note has lines from
multiple subscriptions). Instead to know the related subscriptions,
their line_items' subscription_id attribute should be referred.
string, max chars=100 The unique immutable identifier of the invoice imported in Chargebee for which the receipt was sent.
optional, string, max chars=100 The unique immutable identifier of the customer object to which the invoice belongs.
This API is used to sync consumable, non-consumable, and non-renewing product payments in Chargebee.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Record an one time purchase for apple app store
Record an one time purchase for apple app store
Sample Response [ JSON ]
Show more...
{
"non_subscription": {
"invoice_id": "consumable_1000000807994664",
"customer_id": "customer-123",
"charge_id": "consumable-app_store_charge_id-USD"
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/non_subscriptions/{non-subscription-app-id}/one_time_purchase
required, string, max chars=65k 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.
optional, string Parameters for product
optional, string Parameters for customer
Parameters for product
pass parameters as product[<param name>]
required, string, max chars=96 required, string, max chars=3 required, in cents, min=0 required, enumerated string Possible values are
consumableThis 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_consumableThe 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_subscriptionThe 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.
Show all values[+] optional, string, max chars=96 product[price_in_decimal] optional, string, max chars=39
Parameters for customer
pass parameters as customer[<param name>]
optional, string, max chars=50 optional, string, max chars=70 optional, string, max chars=150 optional, string, max chars=150
always returned required
Resource object representing non_subscription
Sample admin console URL
https://{site}.chargebee.com/admin-console/non_subscriptions/123x