#PixelNinja-price-field
1 messages ยท Page 1 of 1 (latest)
Hey so I have a well "Checkout" button on my website which I need to create a custom invoice which I can redirect the user to. They then pay and get sent back to my website to access the content
I'm using the node api
Okay, so where are you wanting to include a Price?
I believe you're looking for the Invoice Line Item object: https://stripe.com/docs/api/invoiceitems/create?lang=node
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
There us a Price field there: https://stripe.com/docs/api/invoiceitems/create?lang=node#create_invoiceitem-price
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ah thanks, so that will let me get a hosted payment link?
All that does is make sure the Price is attached to the Invoice. You'll still need to follow the instructions for creating a Payment Link: https://stripe.com/docs/payments/payment-links/api
Ah I see, I was looking to make the links that are a one off payment where each link is user specific like they receive in an invoice email, is that similar?
Yeah, are you following docs to make that happen?
I'm trying to read through but honestly I'm getting lost in protecting myself from vulnerabilities as I've never worked with payment code before. I've got as far as working out the creating invoice items now but the callback from the payment is quite tough
I made a flowchart for each step and it was going quite well till I read something about awaiting a callback after the payment is successful
Can I see the flowchart? I think a lot of the difficulty I'm having with answering the question is I don't have context on what you've done already or what you're trying to do.
Sure
So honestly it's not much clearer but it's the best way I could think to plan
Whoops that's missing the invoice create call
Everything in the flowchart seems pretty straightforward to me. You can email invoices for payment to your customers, so that part is pretty easy to code as well. You mentioned trouble with a callback though and I'm not sure where you're running into issues.
Can you elaborate more on that?
So, I read somewhere in the docs that bank payments can take upto 2 days to be complete, I looked back through and struggled to find where I read it. I'm not sure if I should be calling the product API as soon as the payment has been accepted or if I should wait for the money to clear those few days later?
I don't know how secure it is to start the product shipping immediately in case of the payment being stopped or anything
Ah, okay. That makes sense. So ACH is not instant. Payment have to go through the Federal Reserve which takes 1 business day, and each bank can take up to 5 business days to process the payment on their end and actually move the money (though usually it only takes 1-2 days)
With that in mind, you shouldn't process order fulfillment (.e.g. don't ship your product) until you receive the charge.succeeded webhook
Does that make sense?