#svetlana_16529
1 messages · Page 1 of 1 (latest)
but I don't get this new payment link automatically by using API (through session obj)
Could you elaborate on this part? Which API?
Sure. I use "/v1/checkout/sessions". I create session with params and after that I use fields of this session object.
Yeah because that's a standalone Checkout Session
PaymentLink creates a lot of Checkout Sessions, that's 1:n relationship. But if you create a standalone Checkout Session, it doesn't belong to any PaymentLink
You can consider using metadata when creating Checkout Session, to store any customized information
Oh, how I can change payment information for this existed product? I would like use new payment window for it. I thought that I just can create new payment link and use it for all users with this product. Now I understand that it doesn't work in that way
Not sure what it mean for change payment information for product
Do you mean the set of PaymentMethods allowed to be used?
No, now when user buys my product he can just fill email and bank card data. I would like to give them opportunity to fill some additional fields
You can see the differences
Probably you want this?
I have added this custom fields to new payment link)
I Would like to understand how I can change it for the product. Now my users get url from stripe for payment with old fields. New fields are available only by manual getting new payment link
Not really understanding the issue. Custom fields are set per Payment Link. If you want different fields, you'll need a new/different PL
Okay, I will try to explain the problem. I have a product in stripe. When user buys subscription he gets old link because I get this link automaticly by using Checkout Sessions -> I get url of payment link and give it to users. Now I would like to give new number of fields during payment proccess. I have tried to do new payment link inside this product in stripe. This payment link has new fields. But I can share this payment link only manualy when I go to the stripe account and copy this link. I would like to apply this changes for product in general, I would like to get situation when user gets new payment link automaticly. As I have mentioned I don't get this new payment link from checkout session. It's null
You can't as I explained. The custom fields don't exist at the Product level like you're describing, they're on the Payment Link/Checkout Session
You need to just archive the PL with the old fields and only use the PL with the new fields
But I have only one PL inside this product
That's likely just a limitation of the Dashboard UI
A single Product/Price can have multiple Payment Links
It'sexample of my product
Inside default price I have only one new payment link
or I should archive product and create new?
As I said, that's a limitation of the UI. You can have infinite Payment Links for a single Product/Price. I guess we only surface the most recent PL there
Okay, it that case how I can find old payment link to archive it?
They're all listed here: https://dashboard.stripe.com/payment-links
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Here I alsoo have only one link for this product
Can you share an ID of Payment Link? plink_xxx?
Checking
Yeah I'm only seeing a single Payment Link for that price_xxx: https://dashboard.stripe.com/test/prices/price_1MSIS6APBXcnQHyvymDedUWA
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Maybe I'm not really understanding the issue. Can you share an example object where the wrong custom fields are collected?
Yes, sure. Let's speak about this product with plink_1NjCeFAPBXcnQHyv1cysW6Kb. My beckend works with checkout session and I get the url from chekout session and give it to the user automaticly. This url give user window for payment with old fields.
I would like to change this link to the new with custom fields. Is it possible?
I would like to get this link instead
You shouldn't be sharing checkout.stripe.com URLs – they expire. Instead you should be sharing https://buy.stripe.com/test_dR6eWIdAcdX65Xy3cn
Okay how I can get this link from API?
My previous colleague used checkout session and inside this object there is only this url
The url field when you list/retrieve the plink_xxx object(s): https://stripe.com/docs/api/payment_links/payment_links/object#payment_link_object-url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
When your customer(s) click that buy.stripe.com URL the Payment Link will generate a cs_xxx session for them to complete the payment
But those are one-time and short-lived. The buy.stripe.com URL is reusable and can be shared multiple times
I see, I will think about it. But if I will use old version with short-lived links can I configure new parameters for payment in that case?
can I configure new parameters for payment
I'm not sure what that refers to.
you can't update an existing CheckoutSession object, once it's created it's created, you'd create a new one(with a different resulting URL) if you need to for some reason.
I can't influence for payment fields on this page, can I?
What fields you want to update ?
I would liketo add additional fields forbussiness payments like tax ID, name of organisation
You can add custom fields when creating a PaymentLink:
https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-custom_fields
Is that what you are looking for ?
At the moment our project useses session object and payment links from this API is not available in session API. I'm trying to understand how I can change fields on the payment screen by using url from session API
I don't understand what you want to achieve exactly.
Can you give some concret examples ?
Sure, You can see it above with screeshots. I would like to give users url for payment with additional fields but I can't change it. When I create new payment link with new settings it's working butI schould take this link manually. I'm trying to understand how I can change default view of this screen for payment. My product in stripe has only one payment link inside but I don't get this link inside session data - it's null -> I just get url and it's working for payment but with old number of fields (only email and bank card)
I'm trying to understand how I can change default view of this screen for payment
What you want to change exactly in that view ?
My product in stripe has only one payment link inside but I don't get this link inside session data - it's null -> I just get url and it's working for payment but with old number of fields (only email and bank card)
I don't understand this part, can you share an example of a link ?
number of fields - I wouldlike to add field like tax ID, name of organisation
You are using PaymentLinks or Checkout Session ? I'm confused now ....
Checkout Session