Docs

Subscriptions Articles & FAQ

subscription created, api, events, ChargeBee, Coupon ID

461783

2016-08-30T13:38:49Z

2024-08-30T10:35:49Z

903

5

0

221649

How to retrieve a coupon Id from the subscription_created webhook event?

How to retrieve a coupon Id from the subscription_created webhook event? 

In the subscription_created event, the coupon Id can be found as the entity_Id under the invoice » discounts. Here's a sample for your reference.

“discounts”: [{

        "object": "discount",  
        "entity_type": "document_level_coupon",  
        "description": "$50 off",  
        "amount": 5000,  
        **"entity_id": "$50OFF"**  
    }]

Was this article helpful?
Loading…