#Amer Bearat
1 messages · Page 1 of 1 (latest)
this is the body that im sending
String paymentIntentBody = 'amount=2000' +
'¤cy=usd' +
'&payment_method_data[type]=card' +
'&payment_method_data[card][number]=4242424242424242' +
'&payment_method_data[card][exp_month]=12' +
'&payment_method_data[card][exp_year]=2023' +
'&payment_method_data[card][cvc]=123' +
'&customer=' + customerId +
'&customer_data[name]=Steve Simpson' +
'&customer_data[email]=ss@test.com' +
'&confirm=true' +
'&setup_future_usage=off_session';
What does your checkout flow look like? Why are you passing the card number as plain test via the backend? That's generally discouraged, but if you are PCI compliant it's doable
req_J97RfumP6xZX6n
this is the business requirement
the client will be submitting the PCI Form
If you are sure you are PCI compliant, then that's ok. Generally this flow is what we recommend, though: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements. If the way you are doing things is the business requirement, I can't think of a way to make it simpler
The above doc I linked is a bit simpler (fewer api calls), but it may not work with your business use-case. Recommend giving it a read though
Create Payment, Then, Attaching payment method to Customer. Lastly, creating payment intent. when passing raw data we cant combine any calls together?
Assuming by "create payment" you mean "create payment method"? If so, there's not a way to combine the the above calls