#joshbochu-Promo
1 messages ยท Page 1 of 1 (latest)
promo_1L86GvAzNd2FjFeP4FODm90J
Thanks, from my end I can see this promo code is inactive
How do your customer use this PROMO Code? via Checkout?
Yeah I think they would have used it via checkout
Any chance we could delete it from Stripe's end somehow? It would be very helpful ๐
This promo code is already inactive because the associated coupon is delete. Your customers should see an error message This code has expired when they attempt to use the promo code in checkout.
I suppose that implies we might have some stale data that's being ingested still.
To clarify, we can't delete it then?
There's no API to delete promo code. Can you generate a checkout session and send me the URL so I can reproduce the problem?
Actually, I think I understand what may be causing the issue. It's not customer related, but rather for our internal data analytics.
As I had queried Stripe to figure out the id, some of our Data teams are doing the query as well and run into a case where they need to store the max redemption (that's causing the bug)
We keep track of promo codes internally
https://stripe.com/docs/api/promotion_codes/object#promotion_code_object-active you can use this flag to check if the promo code is still 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.
Perfect! I'll see if we can do that
If it helps, its occuring via Fivetran
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.fivetran.integrations.stripe2.model.PromotionCode["max_redemptions"]), promotion_code=java.lang.RuntimeException: /v1/promotion_codes: java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (999999999999999) out of range of int at
Thanks Jack!!
No problem!
Is there a way to update the redemption num? Perhaps by generating the coupon back?
I tried earlier, but there was some issue with the deleted coupon I think
Are you updating an inactive promo code?
In this case, yes
or at least trying to somehow
message: 'Received unknown parameter: max_redemptions',
I don't think you can update the max_redemptions on an existing promo code.
https://stripe.com/docs/api/promotion_codes/update#update_promotion_code check this for the list of params that you can update.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can make the old one inactive and create a new one with the updated max_redemptions
A new old?
This one promo_1L86GvAzNd2FjFeP4FODm90J is already inactive, right? As discussed earlier
Ah gotcha yep saw the update/edit you had. No worries
I think the problem we're solving is specifically tied to promo promo_1L86GvAzNd2FjFeP4FODm90J, not so much with creating a new code/use for a customer.
The inactive code gets read by Fivetran and breaks their max int limit on their system, because they end up reading it.
Unsure if we can ignore it or set it to ignore so my approach would be to find a way to eliminate that redemption # or delete it so they cant read it
Since there's no API to delete a promo code, I'd suggest to check the active property before reading the max_redemptions, ignore the promo code if it's inactive.