#elBR

1 messages ยท Page 1 of 1 (latest)

silk torrentBOT
inner crypt
#

Hi there ๐Ÿ‘‹ no there isn't. Promotion Codes are codes that your customers can provide in Stripe Checkout to redeem the associated Coupon on their transaction.

Since you know the Coupon that relates to the Promotion Code that you want to use, you would pass the Coupon's ID when creating the Invoice.

feral shadow
#

yes, but then I get as a response an invoice with promotion_code: nil. I want to get the code name, for example "SALES" that my customer applied

#

how can I get that in return and after I search my invoices I can also know what was the promotion code?

fleet jasper
#

Hi ๐Ÿ‘‹ @inner crypt had to step away

feral shadow
#

ok, please answer my question. I want to create an invoce attaching a promotion code so that when I search to them later, I can check what promotion_code did my customer use

fleet jasper
#

Do you want to see the Promo Code on the Invoice the customer sees or do you just need it for your own records?

lime temple
#

After I search for invoices I want ti receive records that has a field also the promo code so that I can display to customer the code that they applied

fleet jasper
#

In that case you could simply add the Promo code text to the metadata property of the Invoice record.
https://stripe.com/docs/api/invoices/update#update_invoice-metadata

You can then use our Search API to search on that metadata
https://stripe.com/docs/api/invoices/search