Cards
Supported card brands
You can read the link to understand the supported currencies and their standards.
Payment flow
Integration Method
Payment method enumeration values: card
There is integration method for Card
- Direct API
- Checkout
Direct API
For direct API card payments, you can refer to Wooshpay Direct API.
Checkout
Create a Session
Request
{
"cancel_url": "www.wooshpay.com",
"mode": "payment",
"success_url": "https://wooshpay.com/",
"payment_method_types": [
"card"
],
"line_items": [
{
"price_data": {
"currency": "USD",
"product": null,
"unit_amount": 2000,
"product_data": {
"name": "apple"
},
"billing_scheme": "testscheme",
"lookup_key": "test_lookup_key"
},
"quantity": 1
}
]
}
Response
{
"id": "cs_1766032392423735296",
"object": "checkout.session",
"created": 1709889908000,
"livemode": false,
"currency": "USD",
"customer": "",
"mode": "payment",
"status": "open",
"url": "https://checkouttest.clangcling.com/pay/cs_test_1766032392423735296?key=cGtfdGVzdF9OVEUyTmpnMU1EZ3dORFV6T1RZNE1EYzJPREF4T205T2EzcGpOMDQzVTJkWVdFODRWVmhHWm1GNGNUaHZUVEUyT0RZMk16Z3lPVFl6TWpV",
"cancel_url": "www.wooshpay.com",
"line_items": {
"object": "list",
"data": [
{
"id": "li_1766032392453095424",
"object": "item",
"currency": "USD",
"description": "apple",
"price": {
"id": "price_1766032392478261248",
"object": "price",
"created": 1709889908000,
"livemode": false,
"active": false,
"currency": "USD",
"product": {
"id": "prod_1766032392490844160",
"object": "product",
"created": 1709889908000,
"livemode": false,
"active": false,
"name": "apple",
"updated": 1709889908000
},
"type": "one_time",
"unit_amount": 2000,
"billing_scheme": "per_unit",
"lookup_key": "test_lookup_key"
},
"quantity": 1,
"amount_subtotal": 2000,
"amount_total": 2000
}
]
},
"payment_intent": "pi_1766032397326876672",
"payment_method_types": [
"card"
],
"payment_status": "unpaid",
"success_url": "https://wooshpay.com/",
"amount_subtotal": 2000,
"amount_total": 2000,
"billing_address_collection": "auto",
"expires_at": 1709976308308,
"payment_link": "",
"client_secret": "pi_1766032397326876672_secret_5SKHGraz4RZyKDbbvcHG80Dr",
"customer_creation": "if_required"
}
Next step
You can add more features to your integration as needed
Create a Webhook
Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.
Create a Refund
Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.
Last modified: 9 个月前