WooshPay OpenAPI
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Back to WooshPay Website
  1. Save a customer's payment method without making a payment
  • 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
    • 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
      • Bank Transfer in Nigeria
      • Bank Transfer in South Africa
    • QR Payments
      • QRIS
      • PromptPay
    • Real-time Payments
      • PIX
      • PayNow
      • UPI
      • SPEI
    • Mobile Money
      • Mobile Money - Multi-Country Integration Guide
  • More payment scenarios
    • Save a customer's payment method when they use it for a payment
      • Save payment details during payment with Direct API
      • Save payment method during payment with Drop-in
    • Save a customer's payment method without making a payment
      • Save a payment method with Wooshpay Checkout
      • Save a payment method with Drop-in
      • Save a payment method with Direct API
  • SaaS platform integration
    • Shopify Plugin
    • WooCommerce
    • Shoplazza 店匠
    • Shopastro 星盘
    • Shopline Plugin
    • Sage Connection
  • Payouts
    • Overview
    • Cameroon
    • Europe
    • Ghana
    • Kenya
    • Nigeria
    • Philippines
    • Rwanda
    • South Africa
    • Tanzania
    • Uganda
    • United Kindom
    • United States of America
    • Monitor your payout results
  • Resources
    • Supported currencies
  1. Save a customer's payment method without making a payment

Save a payment method with Drop-in

Supported payment methods#

Payment methodCountry / Region
CardGlobal
DANAIndonesia
BoostMalaysia
Touch'n GoMalaysia
AlipayChina
AlipayHKHong Kong
GCashPhilippines
KakaoPaySouth Korea
Rabbit LINE PayThailand
TrueMoneyThailand

Learn how to Set up payment information and charge them later#

The Setup intent API lets you save your customer's payment details without initial payment and charge them in the future.
Use this integration to set up recurring payments or to create one-time payment with a final amount determined later, often after the customer receives your service.
Completing this integration requires six steps, and best practices can be found in the following use cases.

1. Create a Customer#

Request
{
    "email":"testsetup@gmail.com"
}
Response
{
    "id": "cus_1704682776109776896",
    "object": "customer",
    "created": 1695263020000,
    "livemode": false,
    "address": {},
    "email": "testsetup@gmail.com"
}

2. Create a SetupIntent#

For now, we support cardas a payment method with SetupIntent. You can create a Setupintent with payment_method_types = ["card]
Request
{   
    "customer":"cus_1704682776109776896",
    "payment_method_types" : ["card"],
    "usage": "off_session",
    "return_url":"https://wooshpay.com"
}
Response
{
    "id": "seti_1704683221188345856",
    "object": "setup_intent",
    "created": 1695263126075,
    "livemode": false,
    "status": "requires_payment_method",
    "customer": "cus_1704682776109776896",
    "client_secret": "seti_1704683221188345856_secret_0ZrCdUri7enbgZwzRPTPoQXV",
    "payment_method_types": [
        "card"
    ],
    "payment_method_options": {
        "card": {
            "request_three_d_secure": "auto",
            "setup_future_usage": "off_session"
        }
    },
    "return_url": "https://wooshpay.com"
}

Retrieve the client secret#

Included in the returned SetupIntent is a client secret, which the client side uses to securely complete the payment process instead of passing the entire SetupIntent object.

3. Collect payment details#

Pass the client secret from the previous step into options when you create the Element instance

4. Submit the payment details to Wooshpay#

You can complete the setup using Wooshpay.confirmSetup. Provide a return_url
in this function so that customer can be redirected after they compelet setup.

5. Retrieve the payment method attached to the customer#

To find a payment method to charge, list the payment methods associated with the customers using List a Customer's PaymentMethods.
Request
{
    "type":"card"
}

6. Charge the saved payment method later#

Using the Customer and PaymentMethod ID to create a payment intent.
When you already have the Customer and Paymentmethod IDs, create PaymentIntent with the amount and currency of the payment.
Before that, there are some parameters in PaymentIntent you need to know.
1.
confirm: If your set it to true, payment will be confirmed immediately when the paymentintent is created.
2.
Set payment_method to the ID of the PaymentMethod and Customer to the ID of the Customer.

Create a PaymentIntent#

Request
{
    "amount": 1000,
    "currency": "USD",
    "confirm": true,
    "off_session":false,
    "customer":"cus_1704388704790904832",
    "payment_method":"pm_1704478135803707392",
    "return_url": "https://wooshpay.com"
}
Response
{
    "id": "pi_1704478320244031488",
    "object": "payment_intent",
    "created": 1695214274000,
    "livemode": false,
    "currency": "USD",
    "amount": 1000,
    "status": "succeeded",
    "customer": "cus_1704388704790904832",
    "client_secret": "pi_1704478320244031488_secret_wqlE0XivPRU1d3zkAaJUir52",
    "payment_method_types": [
        "card"
    ],
    "confirmation_method": "automatic",
    "payment_method_options": {
        "card": {
            "request_three_d_secure": "auto",
            "setup_future_usage": "off_session"
        }
    },
    "return_url": "https://wooshpay.com",
    "payment_method": "pm_1704478135803707392",
    "amount_received": 1000,
    "capture_method": "automatic",
    "latest_charge": "ch_1704478320336306176"
}
Modified at 2025-08-13 09:56:10
Previous
Save a payment method with Wooshpay Checkout
Next
Save a payment method with Direct API
Built with