#Alakazam
1 messages · Page 1 of 1 (latest)
I'm afraid it's not possible to configure such allowed email list in the Checkout Session
Checkout Session doesn't support allowed email list
Oh Okey , So i have few customers with their immutable registered email id , Is there any thing customer from outside from my email registerer will get refund automatically if they pay with their email ids
I think you might be able to use Radar rules to have allowed/blocked emails that only specified email address will be able to make successful payment:
- Radar: https://stripe.com/docs/radar/rules
- Email attribute: https://stripe.com/docs/radar/rules/supported-attributes#email
I'd recommend trying out if it works in test mode
Do you mean your internal user reference ID? If so, you can set it in subscription_data.metadata when creating the Checkout Session, so that the metadata will be available in customer.subscription.* event
I am actually doing checkout session from payment links , i can pass client reference id in payment links , but subscription created webhook the reference id is not coming , so how can i pass unique id ?
Ah I see! client_reference_id is only available in Checkout Session and it won't be populated to Subscription object. You can use List Checkout Session API and search for the subscription: https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-subscription
It will return the Checkout Session of the subscription, which you will then find the client_reference_id in Checkout Session object: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-client_reference_id
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.
I didn't understand, Can you just brief me ,
Let's say the payment link is
https://buy.stripe.com/test_123456?client_reference_id=63805b6620a9ee10d188cc7c
Customer completed payment in checkout page with their email id , So I want to update in my db wrt client_reference_id when customer.subscription.created webhook hit
Then what i have to do
client_reference_id won't be available in Subscription object of customer.subscription.created event. It's only available in Checkout Session object.
After receiving the customer.subscription.created event, you'd need:
- Use List Checkout Session API with
subscriptionto find out the Checkout Session created the subscription: https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-subscription - Find the
client_reference_idfrom the Checkout Session object in the Step 1
Oh So simple. Thanks buddy for clarity.
My queries are solved! If anything will ping you on this thread.
No problem! Happy to help 😄
In customer billing portal , customer is subscribed to free subscription , So he/she want to switch to paid subscription on the same day he subscribed to free plan. While upgrading the new plan it showing double price of the original plan price.
Example
Prorated charge for Paid plan : ₹6,504.58
Paid plan: ₹6,505.89
Total: ₹13,010.47
Can you share the subscription ID (sub_xxx)?
Yeh sure
sub_1N9NKMSEDjAlhmdiBKDb1mBl
The next billing cycle will be on 19 June. The subscription was upgraded on 19 May. In the next invoice, it will collect the payment
- from 19 May to 19 June - the past period (since the first invoice for 19 May to 19 June was $0 and didn't collect the payment for this period) and
- from 19 June to 19 July
So customer have to pay advance for next 2 months ?
No! For upcoming invoice on 19 June, user will pay for the past month (19 May to 19 June) and the upcoming month (19 June to 19 July), not next two months