Withdraw funds using stored debit or credit card tokens.
Card in Payout Drop-in is a stored-instrument flow. The accordion lists vaulted plain-card tokens for the authenticated shopper. The shopper selects a card and submits the withdrawal. Drop-in doesn't collect a new card Primary Account Number (PAN) in this flow.
This method gives you:
- Card-on-file only: Shoppers choose from tokens already in the vault.
- Unified callbacks: Same
onBeforeSubmit,onSubmit,onSuccess, andonErrorpattern as Apple Pay and Google Pay card-on-file methods. - No CVC: Card-on-file payout submit doesn't require CVC for these tokens.
- Token maintenance: Where the list UI allows it, shoppers can delete tokens and edit expiry.
- Branding: Panel styling comes from your payout site configuration.
The flow works like this:
- Your payout session includes
allowedFundingTypes.cards. Card is gated on this field. - You return a shopper ID from
onGetShopper. - Drop-in loads active tokens and keeps plain-card instruments that aren't expired or blacklisted.
- If at least one token remains, card appears in the accordion.
- The shopper selects a card and confirms the withdrawal.
- Optional
onBeforeSubmitandonSubmitrun, then payout initiation completes withonSuccessoronError.
If every method is filtered out, Drop-in reports SDK1701.
Card must be allowed on the payout session through allowedFundingTypes.cards. The SDK treats card as enabled when the cards field is present (including an empty array). If cards is missing or null, card isn't offered, even if cardSchemes is set.
Example session fragment:
{
"allowedFundingTypes": {
"cards": [],
"cardSchemes": ["Visa", "Mastercard"]
}
}cardSchemes may still appear on the session for other product configuration. It doesn't, by itself, turn on the card payout method.
Match transactionData.amount and transactionData.currency to the payout session amounts.
Card appears only when these shopper and token checks pass:
| Requirement | Description |
|---|---|
onGetShopper | The authenticated shopper ID used by the token vault. Without it, token retrieval is skipped and card won't appear. |
| Plain-card token | Tokens that aren't Apple Pay or Google Pay device wallet tokens (walletType ApplePay or GooglePay with panType Device). Those device tokens appear under Apple Pay or Google Pay instead. Other stored tokens, including non-device wallet tokens, remain eligible for Card. |
| Expiry | Whether the token is still in date. Expired tokens are filtered out. The current month remains valid. |
| Blacklist | Tokens listed in methodConfig.card.blacklistedInstruments are hidden. |
After filtering, Drop-in shows up to five tokens, ranked by most recent successful purchase or payout activity.
When card is a candidate and a shopper ID is present, Drop-in retrieves active tokens for ownerType MerchantGroup (set during initialisation) and your configured ownerId, for that shopper.
Typical path:
From that shared list, card keeps tokens that aren't Apple Pay or Google Pay device wallet tokens. If the token call fails or returns nothing usable for card, the card method is omitted without necessarily calling onError.
Showing a token in Drop-in doesn't authorise the payout. Confirm amount, destination, and eligibility on your backend before treating the withdrawal as complete.
Use methodConfig.card for blacklists only.
Use blacklistedInstruments to hide specific tokens from the card panel:
import type { PayoutDropInMethodConfig } from '@pxpio/web-components-sdk';
const methodConfig: PayoutDropInMethodConfig = {
card: {
blacklistedInstruments: {
gatewayTokenIds: ['<GATEWAY_TOKEN_ID>'],
schemeTokenIds: ['<SCHEME_TOKEN_ID>'],
},
},
};blacklistedInstruments accepts:
| Property | Description |
|---|---|
gatewayTokenIds | The gateway token IDs to hide from the panel. |
schemeTokenIds | The scheme token IDs to hide from the panel. |
Blacklisting hides instruments in the accordion. When closed-loop enforcement is active, the same blacklist values are also sent on the closed-loop allocation request. Confirm payout eligibility on your backend.
For plain-card tokens, Drop-in can show a Visa or Mastercard instrument as present but not selectable when gaming payout eligibility rules don't allow a withdrawal to that card. Other card schemes stay selectable. Apple Pay and Google Pay device tokens don't use these Card gaming rules.
When a card is greyed out, Drop-in shows the localisation.payoutDropIn.payoutNotSupportedForCard message. Override that string if you need custom copy. Always confirm payout eligibility on your backend before treating a withdrawal as complete.
Override the accordion label and unsupported-card message:
localisation: {
payoutDropIn: {
cardLabel: 'Debit or credit card',
payoutNotSupportedForCard: "Payouts aren't available for this card.",
},
},The following example initialises Drop-in for a card payout. It includes optional onBeforeSubmit and onSubmit hooks, which run on the card-on-file path before onSuccess or onError.
import {
PayoutDropIn,
type PayoutDropInSubmitResult,
} from '@pxpio/web-components-sdk';
import type { BaseSdkException } from '@pxpio/web-components-sdk';
const payoutDropIn = PayoutDropIn.initialize({
environment: 'test',
session: sessionData,
ownerId: 'YOUR-MERCHANT-GROUP-ID',
transactionData: {
currency: 'USD',
amount: 50,
entryType: 'Ecom',
merchantTransactionId: crypto.randomUUID(),
merchantTransactionDate: () => new Date().toISOString(),
},
onGetShopper: async () => ({ id: 'shopper-123' }),
onBeforeSubmit: async (payoutMethod) => {
if (payoutMethod !== 'Card') {
return true;
}
return confirmCardWithdrawal();
},
onSubmit: (payoutMethod) => {
if (payoutMethod === 'Card') {
showLoading(true);
}
},
onSuccess: async (result: PayoutDropInSubmitResult) => {
showLoading(false);
console.log('Card payout submitted', result.systemTransactionId);
console.log('Payout method', result.payoutMethod);
await verifyPayoutOnBackend(result);
},
onError: (error: BaseSdkException) => {
showLoading(false);
console.error(error.ErrorCode, error.message);
},
});
await payoutDropIn.create('payout-drop-in-container');On success, onSuccess receives a PayoutDropInSubmitResult with at least:
| Property | Description |
|---|---|
systemTransactionId | The PXP system transaction ID. |
merchantTransactionId | Your merchant transaction ID. |
payoutMethod | Card for this method. |
Treat onSuccess as submission acknowledgement. Verify the transaction with your webhook handler or a server-side lookup before updating the shopper's withdrawal status. Deduplicate using systemTransactionId, and check amount and currency against the withdrawal you authorised.
A successful card payout merchant webhook looks like this:
{ "eventDate": "2025-12-16T07:37:11.1613200Z", "eventCategory": "transaction", "eventData": { "state": "Authorised", "amount": { "transaction": 50, "currencyCode": "USD" }, "transactionMethod": "Payout", "merchant": "merchant-1", "site": "site-1", "merchantTransactionDate": "2025-12-16T07:37:11.1613200Z", "merchantTransactionId": "CARD-PAYOUT-001", "systemTransactionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "fundingData": { "card": { … } } } }
See Quickstart for the end-to-end session and reconciliation pattern, and Manage webhooks for subscription and signature validation.
These codes are the ones you're most likely to see on the card path:
| Code | Typical card context |
|---|---|
SDK1701 | No payout methods remain. For example, no eligible stored cards and no other methods. |
SDK1703 | Card payout initiation failed. Inspect message and details; correlate with backend transaction state. |
See Error handling.
Validate the path with these steps:
- Use
environment: 'test'with sandbox credentials. - Prepare a test shopper that already has a non-expired plain-card token in the vault (not an Apple Pay or Google Pay device token).
- Create a payout session that includes
allowedFundingTypes.cards. - Confirm the card accordion appears, token selection works, and submit reaches
onSuccessor a clearSDK1703. - Verify the transaction on your backend before treating the withdrawal as complete.
See Testing.