#Alakazam

1 messages · Page 1 of 1 (latest)

devout epochBOT
stiff geode
#

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

opal olive
#

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

stiff geode
opal olive
#

Thanks buddy!

#

Is there any way to pass user uid in subscription webhook ?

stiff geode
#

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

opal olive
#

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 ?

stiff geode
#

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

opal olive
stiff geode
#

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:

  1. Use List Checkout Session API with subscription to find out the Checkout Session created the subscription: https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-subscription
  2. Find the client_reference_id from the Checkout Session object in the Step 1
opal olive
#

Oh So simple. Thanks buddy for clarity.

#

My queries are solved! If anything will ping you on this thread.

stiff geode
#

No problem! Happy to help 😄

opal olive
#

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

stiff geode
#

Can you share the subscription ID (sub_xxx)?

opal olive
#

Yeh sure
sub_1N9NKMSEDjAlhmdiBKDb1mBl

stiff geode
#

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
opal olive
#

So customer have to pay advance for next 2 months ?

stiff geode
#

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