#Silvao
1 messages ยท Page 1 of 1 (latest)
hello! you should be able to prefill the promo code here : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks bro ๐
When it comes to a subscription, does the "transfer_data" field send the percentage to a third user only on the first payment, or does it send it on every payment?
it'll send it on every payment
I would need to send 30% to the affiliate on the initial subscription payment, and on the following payments, send 5% of the referred user's monthly fee to the affiliate.
Is there any solution for this within Stripe?
after the subscription has been successfully created and the first payment received, you can update the amount to be sent : https://stripe.com/docs/api/subscriptions/update#update_subscription-transfer_data-amount_percent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
to know if the first invoice for a subscription was paid, you can listen for the invoice.paid event and check the billing_reason to determine why the invoice was created : https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.