WooshPay OpenAPI
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Back to WooshPay Website
  1. Add more payment methods
  • Online payments
    • Quick Start
    • Integration overview
    • Wooshpay JS SDK
    • Wooshpay Checkout
    • Wooshpay Direct API
    • Payment Link
    • Authorize and capture
    • Build subscriptions integration
    • Testing cards
  • After the payment
    • Payouts
    • Webhook
    • Check the webhook signatures
    • 校验webhook签名
  • Add more payment methods
    • Supported payment method
    • Cards
    • Wallets
      • Alipay
      • Alipay HK
      • Apple Pay
      • Google Pay
      • Wechat Pay
      • 微信支付
      • Kakao Pay
      • DANA
      • Boost
      • Grabpay
      • Mcash
      • Touch'n Go
      • ShopeePay
      • UnionPay
      • 9Pay
      • OVO
      • GCash
      • TrueMoney
    • Bank redirects
      • Bancontact
      • BPI
      • Trustly
      • EPS
      • Giropay
      • iDEAL
      • Przelewy24
      • FPX
    • Buy Now Pay Later
      • Klarna
    • Bank Debits
      • Sepa Direct Debit
    • Bank Transfer
      • Bank Transfer in Europe
      • Bank Transfer in United Kingdom
      • Bank Transfer in Indonesia
    • QR Payments
      • QRIS
      • PromptPay
    • Real-time payments
      • PIX
      • PayNow
      • UPI
      • SPEI
  • More payment scenarios
    • Set up future payments
    • Save payment method during payment
  • SaaS platform integration
    • Shopify Plugin
    • Shopastro 星盘
    • WooCommerce
    • Shoplazza 店匠
    • Shopline Plugin
    • Sage Connection
  • Resources
    • Supported currencies
  1. Add more payment methods

Cards

Supported card brands
1280X1280.PNG
You can read the link to understand the supported currencies and their standards.

Payment flow#

1280X1280 (1).PNG

Integration Method#

Payment method enumeration values: card
There is integration method for Card
1.
Direct API
2.
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.
Modified at 2024-03-11 01:59:11
Previous
Supported payment method
Next
Alipay
Built with