Payouts with Saved Payment Methods
Store and reuse customer payment methods for payout processing using Hyperswitch's secure, PCI-compliant vault and token-based API flows.
Juspay Hyperswitch allows you to store payment method details in a secure, PCI-compliant card vault for subsequent payout processing. By utilizing stored credentials, you can programmatically list a customer's saved methods and retrieve a payment_token to initiate payouts without re-collecting sensitive information.
Tokenizing Payment Methods
Payment methods are persisted in the Hyperswitch Vault through two primary entry points:
Pre-transaction storage: Create a payment method for a specific customer using the /payment_methods API. This action stores details directly in the secure locker.
Post-transaction storage: Details are automatically vaulted following a successful transaction if specific flags are set:
For payments: Set
"setup_future_usage": "off_session".For payouts: set
"recurring": trueand send the customer. Both are needed. The success handler atpayouts.rssaves to the locker only whenrecurringis set, nopayout_method_idwas supplied, and acustomer_idis present.A payout with no customer still succeeds, and simply saves nothing. There is no error to catch, so the first sign of trouble is an empty list when you later go looking for the saved method. Send
customerorcustomer_idon the create request whenever you intend to vault.
Reusing a vaulted method is the other half of this and is covered under Recurring/Subsequent Payouts: pass the stored payout_method_id and set confirm to true. validate_create_request rejects a payout that supplies payout_method_id without confirm: true.
Retrieving Saved Methods
To process a payout, fetch the identifiers for a customer's saved methods via the List Payment Methods API. The response includes a payment_token.
Executing the Payout
The field names differ between the two calls. The list response calls it payment_token; Payouts Create has no payment_token field. Send that value as payout_token instead.
There are two ways to reference a vaulted method, and they are mutually exclusive. validate_create_request rejects a request carrying both.
Either way the request needs customer context. Supplying payout_token with no customer or customer_id is rejected with a missing-field error naming exactly that (validator.rs), and the payout_method_id path additionally checks that the stored method's customer_id matches.
payout_token, the value the list response returned aspayment_token(PayoutCreateRequest).payout_method_id(PayoutCreateRequest), which additionally needsconfirm: true. The validator looks the stored method up and rejects the payout if itscustomer_iddoes not match the customer on the request.
Setup and Integration
Utilize the Hyperswitch Dashboard and the specialized Postman collection to test vaulted payout flows.
Sandbox Endpoint:
https://sandbox.hyperswitch.ioDashboard: app.hyperswitch.io
Technical Reference: Payouts API Reference
Prerequisites
Before implementing saved payment method workflows, ensure the following:
Payout processors are configured and active.
An API Key is generated in the Developers section of the dashboard.
The Merchant ID is retrieved from your Dashboard home page.
Step-by-Step Implementation
Import Testing Collection
Download and import the Saved Payment Methods Postman Collection.

Configure Environment
In the Variables tab of the collection, define the following global parameters:
baseUrl:https://sandbox.hyperswitch.iomerchant_id: Your unique identifier.api_key: Your secret API key.

Direct Vaulting
Follow the sequence to create a payment method and immediately utilize the resulting token for a payout.
Recurring/Subsequent Payouts
Follow the sequence to list existing customer payment methods and process a payout using a previously stored token.
Smart Router for PayoutsLast updated
Was this helpful?

