#Ayrton_L
1 messages · Page 1 of 1 (latest)
Could you share what doesn't work and the error that you're facing?
im trying to confirm a payment intent via the api
tested both in the stripe shell and postman
stripe payment_intents confirm pi_3Mc1prG4mmIdHCP50AimbeUQ --payment-method=promptpay
this is the response i get
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such PaymentMethod: 'promptpay'",
"param": "payment_method",
"payment_intent": {
"id": "pi_3Mc1prG4mmIdHCP50AimbeUQ",
"object": "payment_intent",
"amount": 19003200,
"amount_capturable": 0,
"amount_details": {
"tip": {}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3Mc1prG4mmIdHCP50AimbeUQ_secret_5f2s0VPRYTn4muKUvtLOtBwYP",
"confirmation_method": "automatic",
"created": 1676532295,
"currency": "thb",
"customer": "cus_MlhO1hpvyH7QQ9",
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": null,
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
},
"promptpay": {}
},
"payment_method_types": [
"card",
"promptpay"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
},
"request_log_url": "https://dashboard.stripe.com/test/logs/req_2R5k8PID7Oki6t?t=1676606106",
"type": "invalid_request_error"
}
}
payment_method parameter is for payment method ID (pi_xxx), not the payment method type. To accept promptpay, you can follow the guide here: https://stripe.com/docs/payments/promptpay/accept-a-payment
i understand the js integration but im trying to get it working in the app and its not available in the flutter package thats why im trying to get it to work
so i need to attach it to they key payment_method_data right?
can you do an example for me?
dont really know the way its supposed to be sent
I see that you're testing with postman. The parameters and value set here was incorrect. It should be a separate lines for key-value. For example,
- payment_method_data[type]: promptpay
- payment_method_data[billing_details][email]: test@test.com