Wooshpay Direct API
A complete set of APIs
1.
2.
1. Non-3DS payment flow
payment_method_data
parameter.{
"amount":1,
"currency":"USD",
"confirm":true,
"payment_method_options":{
"card":{
"request_three_d_secure":"auto"
}
},
"payment_method_data":{
"type":"card",
"card":{
"cvc":"123",
"number":"4111111111111111",
"exp_month":"03",
"exp_year":"2027"
}
},
"merchant_order_id":"id1111",
"return_url":"https://wooshpay.com"
}
{
"id":"pi_1583366366029676544",
"object":"payment_intent",
"created":1666338934000,
"currency":"USD",
"amount":1,
"status":"succeeded",
"description":null,
"metadata":null,
"livemode":false,
"merchant_order_id":"id1111",
"client_secret":"pi_1583366366029676544_secret_WKtUP8YmKmUKxcQPV0Zrmxym",
"last_payment_error":null,
"next_action":"",
"payment_method_types":"[\"card\",\"alipay\",\"wechat_pay\",\"alipayplus\",\"klarna\",\"ideal\",\"giropay\",\"sofort\",\"eps\",\"trustly\",\"bancontact\",\"p24\",\"sepa\"]",
"receipt_email":null,
"statement_descriptor":null,
"statement_descriptor_suffix":null,
"cancel_at":"",
"cancellation_reason":null,
"confirmation_method":"automatic",
"payment_method_options":"{\"card\":{\"request_three_d_secure\":\"auto\",\"capture_method\":\"automatic\"}}",
"3ds_status":null,
"amount_capturable":null
}
2. 3DS payment flow
{
"amount":1,
"currency":"USD",
"confirm":true,
"payment_method_options":{
"card":{
"request_three_d_secure":"any",
"capture_method":"automatic"
}
},
"payment_method_data":{
"type":"card",
"card":{
"cvc":"123",
"number":"4111111111111111",
"exp_month":"03",
"exp_year":"2027"
}
},
"merchant_order_id":"id1111",
"return_url":"https://wooshpay.com"
}
{
"id":"pi_1583367070215569408",
"object":"payment_intent",
"created":1666339102000,
"currency":"USD",
"amount":1,
"status":"requires_action",
"description":null,
"metadata":null,
"livemode":false,
"merchant_order_id":"id1111",
"client_secret":"pi_1583367070215569408_secret_gXwuHGXjHgMqVw35oBInuYyC",
"last_payment_error":null,
"next_action":"{\"ddc_redirect\":{\"return_url\":\"https://wooshpay.com\",\"url\":\"https://jstest.wooshpay.com/v1/3ds/index.html?c=2&type=ddc&dataId=pi_1583367070215569408&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7InJlcXVlc3R0eXBlZGVzY3JpcHRpb25zIjpbIlRIUkVFRFFVRVJZIl0sImV4cGlyeWRhdGUiOiIwMy8yMDI3IiwiY3VycmVuY3lpc28zYSI6IlVTRCIsInNpdGVyZWZlcmVuY2UiOiJ0ZXN0X3N3b29zaHRyYW5zZmVybHRkOTczMjkiLCJiYXNlYW1vdW50IjoiMSIsInBhbiI6IjQxMTExMTExMTExMTExMTEiLCJzZWN1cml0eWNvZGUiOiIxMjMiLCJhY2NvdW50dHlwZWRlc2NyaXB0aW9uIjoiRUNPTSIsIm9yZGVycmVmZXJlbmNlIjoicGlfMTU4MzM2NzA3MDIxNTU2OTQwOCJ9LCJpc3MiOiJqd3RAc3dvb3NodHJhbnNmZXIuY29tIiwiaWF0IjoxNjY2MzM5MTAyfQ.L7CEYYRo95SesCt6WIsXr51MgHZKjkIDfmkooFTaUuo\"},\"type\":\"ddc_redirect\"}",
"payment_method_types":"[\"card\",\"alipay\",\"wechat_pay\",\"alipayplus\",\"klarna\",\"ideal\",\"giropay\",\"sofort\",\"eps\",\"trustly\",\"bancontact\",\"p24\",\"sepa\"]",
"receipt_email":null,
"statement_descriptor":null,
"statement_descriptor_suffix":null,
"cancel_at":"",
"cancellation_reason":null,
"confirmation_method":"automatic",
"payment_method_options":"{\"card\":{\"request_three_d_secure\":\"any\",\"capture_method\":\"automatic\"}}",
"3ds_status":null,
"amount_capturable":null
}
Controlling when to present the 3D Secure flow
auto
The default parameter for 3DS is
auto
, WooshPay's risk control will determine to do 3DS or not. To trigger 3DS manually, set payment_method_options[card][request_three_d_secure]
to any when creating or confirming a PaymentIntent or SetupIntent.any
When you set
request_three_d_secure
to any
, WooshPay requires your customer to perform authentication to complete the payment successfully if 3DS authentication is available for a card. If it’s not available for the given card, the payment proceeds normally.Modified at 2024-02-22 05:46:41