#Alanx
1 messages · Page 1 of 1 (latest)
Which integration type are you using? Checkout Session, Payment Element, Invoicing or Subscription?
Subscription
I read docs, it said I can add client_reference_id to the url, so I think I can extract it from the session data
but I don't know the Price plan id?
Are you using Checkout Session to create a Subscription or direct Subscription API? Can you share the doc you're following?
Front-end can use v-model to bind current userId and pass to component, so I think CLIENT_REFERENCE_ID is ok to set
I'm curious about what if user didn't login and pay the bill, what will happen?
Thanks for sharing. With pricing table, you may set client_reference_id as your own internal customer ID in the pricing table. When a subscription is subscribed successfully, checkout.session.completed event will be sent.
You may then find the client_reference_id in the event for you to identify which customer the subscription belongs to. To get the prices that the customer subscriptions, an additional Checkout Session retrieval request with expanding line_items should be made.
- Checkout Session Retrieval API: https://stripe.com/docs/api/checkout/sessions/retrieve
- Expanding an object: https://stripe.com/docs/api/expanding_objects
I'm curious about what if user didn't login and pay the bill, what will happen?
Your system shouldn't show pricing table if the customer doesn't log in if you wish to have your own client_reference_id
fine, what about user copy my payment link and share to others and then pay the bill ?
If the payment link is created from pricing table with client_reference_id, it will always have the client_reference_id information regardless how the link is shared