ChargebeeAPI

Set Promotional Credits

Idempotency Supported
Try in API Explorer

This API call can be used to set the promotional credits balance of a customer. Learn more about Promotional Credits.

For example,

  • If a customer has a credit balance of $10 and if you would like to set the balance to $100, you could pass the amount as $100.
  • If a customer has a credit balance of $10 and if you would like to set the balance to $5, you could pass the amount as $5.
  • If a customer has a credit balance of $10 and if you would like to clear the balance, you could pass the amount as $0.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/promotional_credits/set

Input Parameters

customer_id
required, string, max chars=50

Identifier of the customer.

amount
optional, in cents, min=0

Promotional credits amount.

amount_in_decimal
optional, string, max chars=33

Amount in decimal.

currency_code
required if Multicurrency is enabled, string, max chars=3

The currency code (ISO 4217 format) for promotional credit.

description
required, string, max chars=250

Detailed description of this promotional credits.

credit_type
optional, enumerated string, default=general

Type of promotional credits provided to customer.

Possible Enum Values
loyalty_credits

Loyalty Credits

referral_rewards

Referral

general

General

reference
optional, string, max chars=500

Describes why promotional credits were provided.

Returns

customerCustomer object
Resource object representing customer
promotional_creditPromotional credit object
Resource object representing promotional_credit