#Hassan-Currency PaymentIntents
1 messages · Page 1 of 1 (latest)
What's the id of the request where you see an error? https://support.stripe.com/questions/finding-the-id-for-an-api-request
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.
Complete reference documentation for the Stripe JavaScript SDK.
this method
in angular
and i need to send currency in the payload
as far as i see in example there is no currency key in json
i sent hardcode currency key in payload and it gives me error
That's not where you would set the currency. Angular (or any frontend library) is only used on the frontend to confirm a payment intent. To create one (and set the currency, amount, etc.) you want to use a backend library and follow https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
When you get to Step 3 (Collect card details) is when you would use the frontend.
isnt there any way i can do this ?? with the ngx stripe library
i have less time for the work
is there any 2nd way to achieve it ?
You can't. Frontend libraries cannot use secret keys (which is required to create a PaymentIntent). The alternative is to redirect to the hosted payment page instead of using PaymentIntents directly (see https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout).
That's a philosophical question but generally I consider myself to be human.
payment_method_data[type]=card&payment_method_data[currency]=eur&payment_method_data[card][number]=5454545454545454&payment_method_data[card][exp_month]=12&payment_method_data[card][exp_year]=22&payment_method_data[guid]=895f78c6-3da5-432d-82cb-15230f272395e5ee2b&payment_method_data[muid]=5c8a7380-b7fa-44c8-af3d-3c0a99cf288608e13b&payment_method_data[sid]=5d5fa09b-f731-426a-82f4-b6af2dd3d6aae3f7b2&payment_method_data[payment_user_agent]=stripe.js%2Ff94d7cc81%3B+stripe-js-v3%2Ff94d7cc81&payment_method_data[time_on_page]=30797&expected_payment_method_type=card&use_stripe_sdk=true&webauthn_uvpa_available=false&spc_eligible=false&key=pk_test_EQTb9SUvqQGqHIYGDihXjJAF008RfcExMQ&client_secret=pi_3JhvJYLennEu3KH701Yi0QgM_secret_mifLhWbp95qChotDmLlNt2nvG
does this accept currency ?
It does not. On the backend with a secret key (not Angular) you can see the accepted params on https://stripe.com/docs/api/payment_intents/confirm. For the frontend (e.g. Angular) it's the Stripe.js method which has the params listed on https://stripe.com/docs/js/payment_intents/payment_method
You set the currency when you create the PaymentIntent (on the backend, with a secret key) with https://stripe.com/docs/api/payment_intents/create#create_payment_intent-currency
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe JavaScript SDK.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
(the guides I linked above walk you through the required steps -- there isn't a faster/alternative way with Angular or anything as it's just a wrapper around Stripe.js for the frontend calls)
okay sir