#riggzby-products
1 messages · Page 1 of 1 (latest)
Hi, thanks for coming back to me
If you mean Payment Intents, then Products/Prices don't work with them directly as of today
We take deposit payments and balance payments for holidays - so the amounts can vary depending on the amount the holiday costs.
We're using the API dated 2020-08-27
Ok, is there a different method we should be looking at?
API version is mostly irrelevant. What APIs are you calling when you say you're transitioning from Charges?
Payment Intents is the API that has 'replaced' Charges: https://stripe.com/docs/payments/payment-intents
We've attempted to start with the stripe.redirecttocheckout method
Directly from Stripe.js, or via creating a Checkout Session?
creating a checout session
(Checkout does work with Products/Prices, but not required)
What specific issues are you running into?
let me just grab the message I'm seeing in the dashboard
The error returned is "no such plan as 1.00"
with this response:
{
"guid": "",
"muid": "",
"sid": "*******************",
"items": {
"0": {
"type": "price",
"id": "1.00",
"quantity": "1"
}
},
"mode": "payment",
"success_url": "https://www.alternative-aquitaine.co.uk.com/deposit-thanks",
"cancel_url": "https://www.alternative-aquitaine.co.uk.com/booking-failed",
"key": "",
"referrer": "https://staging.alternative-aquitaine.co.uk/"
}
Can you share the req_xxx ID for that please?
id should be the ID of a Price object from your Dashboard/account
req_xxx ID?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
It'll be rjght there on that Dashboard page
Looks like you're using redirectToCheckout from Stripe.js directly: https://stripe.com/docs/js/checkout/redirect_to_checkout
Which I wouldn't recommend as it's mostly deprecated now and is pretty limited: https://stripe.com/docs/payments/checkout/client
ah ok - so I should be using: https://stripe.com/docs/payments/checkout/client ?
No, that's what you're using right now
I would recommend you create Checkout Sessions, instead: https://stripe.com/docs/checkout/quickstart
Thanks - does that one not require a price/product ID however?
Well, you can pass the price_data parameter to create an 'ad-hoc' price: https://stripe.com/docs/products-prices/manage-prices#ad-hoc-prices
Learn how to manage products and prices.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ooooo
But generally recommended to model your Products/Prices in the Dashboard for most cases
yeah, that really doesn't fit with our business model. Each transaction is almost bespoke based on what a customer has purchased. For example flight prices vary dynamically based on a rate set by an airline and can change daily for the same ticket
we can't really set up a product with a set price if we don't even know what the price is going to be until the time of transaction
This has given me plenty to go and have a play with though. Really very much appreciate your time looking at this for me.
Are you fixed to using Checkout?
no not really
You could just use Payment Intents in a custom flow, which just expect a amount & currency param
Right, that may match more closely to what were previously doing.
I'm guessing that the alternative just means we end up with a load of bespoke products being visible in the dashboard?
With Checkout? Yep