#Yor - payment links api

1 messages · Page 1 of 1 (latest)

bitter mesaBOT
dense wolf
#

Hi,

earnest halo
#

hey again

dense wolf
#

the previous code you wrong to me disapeared.

earnest halo
#

the docs show an example using our node lcient here:

dense wolf
#

I have been breaking my head over this

earnest halo
#
const paymentLink = await stripe.paymentLinks.create({
  line_items: [{price: '{{PRICE_ID}}', quantity: 1}],
});
dense wolf
#

I'm doing it with a automation software called robomotion

earnest halo
#

I'm not sure how that works, but you'll need to ensure you use the correct endpoint too

#

in the docs, you can switch to the curl tab to see the raw request structure, including URL

dense wolf
#

Im able to make a request to prices

#

with:
msg.req = {
"currency": "usd",
"unit_amount": "1000",
"id": "prod_Mvr6zscoyby3ul"
}

return msg;

#

but it doesnt work like that for payment link creation

#

its a bit different

#

And I seem to not be able to figure out how to incorperate the line_items in the syntax 😦

earnest halo
#

I don't see any requests to the payment links API in your account logs

#

I'm not familiar with robomotion, but it seems like the requests may not be sending like you expect

dense wolf
earnest halo
#

Well, you're not writing JS though, you're using this other tool

#

The example i shared is for writing your own node code

#

You can run a curl request in your terminal to test:

curl https://api.stripe.com/v1/payment_links \
  -u sk_test_123: \
  -d "line_items[0][price]"="prod_123" \
  -d "line_items[0][quantity]"=1
#

but as i said I'm not sure how you need to put the parameters in robomotion

dense wolf
#

Yes fair enough

#

Is there a way I can save this chat?

#

so it doesnt get deleted?

earnest halo
#

We don't delete them, you can save the link from the left on your thread

#

You can bookmark that if you like

#

Yor - payment links api