These credits can be provided to the customer for promoting the product. You can use Promotional Credits to offer referral bonuses, cash back offers and more. When a customer has promotional credits, it is automatically applied whenever a new invoice is created.
{
"amount": 100,
"closing_balance": 100,
"created_at": 1517501388,
"credit_type": "general",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWStxi4s",
"description": "add promotional credits",
"done_by": "full_access_key_v1",
"id": "pc___test__KyVnHhSBWStz44u",
"object": "promotional_credit",
"type": "increment"
}
This API call can be used to add promotional credits to a customer. Learn more about Promotional Credits.
For example, if a customer has credits of $10, if you pass the amount as $10, then the customer’s credit balance would become $20.
curl https://{site}.chargebee.com/api/v2/promotional_credits/add \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWStxi4s" \ -d amount=100 \ -d description="add promotional credits"
curl https://{site}.chargebee.com/api/v2/promotional_credits/add \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWStxi4s" \ -d amount=100 \ -d description="add promotional credits"
This API call can be used to deduct promotional credits for a customer. Learn more about Promotional Credits.
For example, if a customer has a credit balance of $20, if you pass the amount as $5, then the customer’s credit balance would become $15.
If you do not pass any amount as the input parameter then, it will deduct the whole available amount from the credit balance.
curl https://{site}.chargebee.com/api/v2/promotional_credits/deduct \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWSuFQ4x" \ -d amount=100 \ -d description="deduct promotional credits"
curl https://{site}.chargebee.com/api/v2/promotional_credits/deduct \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWSuFQ4x" \ -d amount=100 \ -d description="deduct promotional credits"
This API call can be used to set the promotional credits balance of a customer. Learn more about Promotional Credits.
For example,
curl https://{site}.chargebee.com/api/v2/promotional_credits/set \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWSuPk5A" \ -d amount=100 \ -d description="set promotional credits"
curl https://{site}.chargebee.com/api/v2/promotional_credits/set \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWSuPk5A" \ -d amount=100 \ -d description="set promotional credits"
curl https://{site}.chargebee.com/api/v2/promotional_credits \ -G \ -u {site_api_key}:\ --data-urlencode limit=5
curl https://{site}.chargebee.com/api/v2/promotional_credits \ -G \ -u {site_api_key}:\ --data-urlencode limit=5
curl https://{site}.chargebee.com/api/v2/promotional_credits/pc___test__KyVnHhSBWSuN257 \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/promotional_credits/pc___test__KyVnHhSBWSuN257 \ -u {site_api_key}: