#default_user_Bq67qllUp5l4mHuk0ao
1 messages ยท Page 1 of 1 (latest)
Hmm, can you share an example?
yes
POST /v1/customers/cus_N6XCNiFAILkek0
Status
200 OK
ID
req_c9GxrxXm51TJu2
Time
7/14/23, 4:36:55 AM
IP address
34.76.16.233
API version
2020-08-27
Source
Stripe/v1 NodeBindings/8.222.0
Idempotency
Key โ stripe-node-retry-fab4361a-fe1a-48ed-812b-698a277d6464
Response body
{
"id": "cus_N6XCNiFAILkek0",
"object": "customer",
"address": null,
"balance": 0,
"created": 1672789368,
"currency": "cad",
"default_currency": "cad",
"default_source": null,
"delinquent": false,
"description": null,
"discount": {
"id": "di_1NTkItL0Z6nKgMqTAeWu3Jvw",
"object": "discount",
"checkout_session": null,
"coupon": {
"id": "oTGmFHEK",
"object": "coupon",
"amount_off": null,
"created": 1689334565,
"currency": null,
"duration": "once",
"duration_in_months": null,
"livemode": true,
"max_redemptions": 1,
"metadata": {
},
"name": "8BMJDY8X",
"percent_off": 100,
"redeem_by": null,
"times_redeemed": 1,
"valid": false
},
"customer": "cus_N6XCNiFAILkek0",
"end": null,
"invoice": null,
"invoice_item": null,
"promotion_code": "promo_1NTkI6L0Z6nKgMqTtFRstAzw",
"start": 1689334615,
"subscription": null
},
"email": "vinnyscott@hotmail.com",
"invoice_prefix": "8496AF15",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": true,
"metadata": {
},
"name": "Ted Clemens",
"next_invoice_sequence": 59,
"phone": "15193587835",
"preferred_locales": [
],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
Request POST body
{
"promotion_code": "promo_1NTkI6L0Z6nKgMqTtFRstAzw"
}
we see here the promo code has valid: false
so i understand is because it gor tedeemed
but what are the other use case it will be invalid?
๐ taking over for my colleague. Let me catch up.
Ah, on the Coupon object: https://stripe.com/docs/api/coupons/object#coupon_object-valid
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.