#Andres2792-PaymentLink
1 messages · Page 1 of 1 (latest)
Hi, are you able to share the request id here? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Sure! req_pMia0Drt0vw4nU and req_QNiwHlNbqhGFnz
Referencing this document: https://stripe.com/docs/api/payment_links/payment_links/update#update_payment_link-line_items
I'm trying to test this on my end
Sure @fallen reef ans that's the exact doc I was using :)
@fallen reef any update here mate?
Hmm, I was unable to reproduce it.
It's working as expected on my end
Let me compare the two requests
Awesome @fallen reef maybe i passed a wrong attribute... Not sure :(
I'm passing the exact same parameters:
line_items: { 0: { quantity: "1", price: "price_1LMzxgGHtciddFoAknHSieXO" } } }
Would it be a library issue?
But I'm pretty sure I was using the last release
And I'm really crazy here cuz I tried to do this via Ruby and I got NameErros via console and code
The endpoint didn't worked for me. Any payment link call on ruby worked :/
Hi there 👋 taking over
Give me a few minutes to get caught up.
Awesome @somber swan ty for the help mate! Really appreciate it :)
Ah, so it looks like Stripe is not being initialized properly. Or, possibly, it's outside the scope of the code that's trying to run Stripe::PaymentLink.create()
Do you have require 'stripe' somewhere that the function call can access?
Something else is going wrong, because the error you're receiving says "uninitialized constant Stripe", so it's either not getting initialized or it's getting initialized somewhere that the function call doesn't have access.
Jmm I will flush the library and try again
Yeah that's odd and that's why I bothered u all here :/
Sorry for that
No that's totally okay! That's what we're here for.
If you still aren't able to get it up and running, let us know and we can try to advise on what to do next
Hey @somber swan it worked! Idk why it got stuck but I just flushed and required the gem again and it works
Ty so much :) I really appreciate the help!
But now I'll see if I can change the price on ruby
Amazing! Love to see it
Same issue when trying to update the already created payment link but now on ruby @somber swan
What's the error you're receiving?
Ah! Can you enclose everything from line 13 to line 17 in curly braces {}?
Stripe::PaymentLink.update( 'plink_1LQfeFILwdSSnvJbBHvDTLyx', { line_items: [ {id: 'price_abc123'} ] }, )
Also line_items is an array of hashes, so it should be { line_items: [{id: 'price_abc123'}] }
Did you change that too?
Okay cool. Thanks for bearing with me!
req_thFQN3nxU0q9qS
Ups req_thFQN3nxUOq9qS
You know O VS 0 hehe my bad
The second ID :)
Okay gotcha. Looking now
Ahhh, okay. So you're passing in price instead of id. Notice how my code above has {id: 'price_abc123'} instead of {price: 'price_abc123'}. Additionally, I don't think you can update a Payment Link with a new Price. I'm pretty sure you can only update prices that are already attached to the payment link
Jmm I did it via DB :/ so no chance via API?
I don't think so, but let me check
Sure :)
Yeah, so you won't be able to pass price: 'price_abc123' until the feature is rolled out officially (it's currently just in preview right now), and you can't add a new Price to an existing Payment Link using id
Just tested on my end and confirmed
Apologies if that was a wild goose chase
Oof hehehe and no sneak peak on when will it be available for us mortals?
Not that I know of, but I can say that the preview likely implies that it's not too far off.
Great! Ty for your help mate! I really appreciate it. Have a good day :)