#elBR
1 messages ยท Page 1 of 1 (latest)
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.
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?
Hi ๐ @inner crypt had to step away
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
Do you want to see the Promo Code on the Invoice the customer sees or do you just need it for your own records?
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
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.