A credit purchase was paid: deposits the credits on the entitlement's balance, once per reference.
const url = 'https://example.com/api/v1/provision/admin/billing-events/credit-purchase-completed';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"externalReference":"example","accountExternalReference":"example","entitlementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","metric":"example","credits":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/provision/admin/billing-events/credit-purchase-completed \ --header 'Content-Type: application/json' \ --data '{ "externalReference": "example", "accountExternalReference": "example", "entitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "credits": 1 }'Request Bodyrequired
Section titled “Request Bodyrequired”A paid one-time purchase of credits onto the balance of one of your entitlements. Deposited once per
externalReference, however often it is posted.
object
The purchase, e.g. chargebee:invoice:2034.
The balance-carrying metric the credits land on.
Examplegenerated
{ "externalReference": "example", "accountExternalReference": "example", "entitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "credits": 1}A paid one-time purchase of credits onto the balance of one of your entitlements. Deposited once per
externalReference, however often it is posted.
object
The purchase, e.g. chargebee:invoice:2034.
The balance-carrying metric the credits land on.
Examplegenerated
{ "externalReference": "example", "accountExternalReference": "example", "entitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "credits": 1}A paid one-time purchase of credits onto the balance of one of your entitlements. Deposited once per
externalReference, however often it is posted.
object
The purchase, e.g. chargebee:invoice:2034.
The balance-carrying metric the credits land on.
Examplegenerated
{ "externalReference": "example", "accountExternalReference": "example", "entitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "credits": 1}Responses
Section titled “Responses”Accepted
The event was accepted and published; its consumer applies it shortly after.
object
The event was accepted and published; its consumer applies it shortly after.
object
Examplegenerated
{ "eventId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}The event was accepted and published; its consumer applies it shortly after.
object
Examplegenerated
{ "eventId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Bad Request
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}