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

Modified on: Mon, 26 Mar, 2018 at 12:21 AM

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"
        }]

A
Anand is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.