#darwin_34890
1 messages · Page 1 of 1 (latest)
A bit different. Setup mode is SetupIntent
So the amount is also on hold?
No, there is no amount. SetupIntent is $0
So let's say I place an amount on the payload and the mode is setup. Will that reflect in the dashboard?
I'm getting this error {
"error": {
"message": "Mode cannot be setup when using prices.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_EumxCAHmcF06TZ?t=1699501404",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes because Setup expects no Price
But is there a way I can do something like the manual mode of payment intent to checkout session?
You can do manual capture on Checkout, by setting this parameter https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks that seems to work but the problem now is this {
"error": {
"code": "amount_too_small",
"doc_url": "https://stripe.com/docs/error-codes/amount-too-small",
"message": "The Checkout Session's total amount must convert to at least 200 grosz. $0.15 converts to approximately 0.62 zł.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_zKAWkBKDUPRTUc?t=1699505855",
"type": "invalid_request_error"
}
}
Where can I configure the maximum amount allowed?
I'm not sure I understand what you mean by configuring the maximum amount allowed? As with all currencies in Stripe, there is a minimum charge amount : https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
this is a public channel, please don't share your secret key
Just as a reminder, you should never share your secret API keys regardless of whether it's a test or live mode key. I strongly suggest you roll your test mode key immediately as the one you sent is now considered compromised: https://dashboard.stripe.com/test/apikeys
Oh wait sorry
I though I'm still on the other window
curl --location 'https://api.stripe.com/v1/checkout/sessions'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: Bearer '
--data-urlencode 'success_url=https://localhost:7217/success'
--data-urlencode 'cancel_url=https://localhost:7217/create-checkout-session/cancel'
--data-urlencode 'customer_email=darwin.simbajon@inchcape.com'
--data-urlencode 'line_items%5B0%5D%5Bprice_data%5D%5Bcurrency%5D=PLN'
--data-urlencode 'line_items%5B0%5D%5Bprice_data%5D%5Bproduct_data%5D%5Bname%5D=Reservation Fee'
--data-urlencode 'line_items%5B0%5D%5Bprice_data%5D%5Bproduct_data%5D%5Bmetadata%5D%5Bbrand%5D=JLR-POL'
--data-urlencode 'line_items%5B0%5D%5Bprice_data%5D%5Bunit_amount%5D=15'
--data-urlencode 'line_items%5B0%5D%5Bquantity%5D=1'
--data-urlencode 'mode=payment'
--data-urlencode 'payment_intent_data%5Bcapture_method%5D=manual'
--data-urlencode 'payment_intent_data%5Bmetadata%5D%5Bbrand%5D=JLR-POL'
--data-urlencode 'payment_intent_data%5Breceipt_email%5D=darwin.simbajon@yahoo.com'
Yeah this is my payload
All API requests expect amounts to be provided in a currency’s smallest unit. For example, to charge 10 USD, provide an amount value of 1000 (that is, 1000 cents). - https://stripe.com/docs/currencies#zero-decimal
what you passed in was 15 -> which is $0.15