This request enrolls a payment method for a customer. With the information provided by WHITELABEL after the customer selects the payment method to enroll, you will be able to save that information for future purchases using the payment method object created.
Check the Available payment methods in WHITELABEL. You’ll need to set your credentials for each payment method in the WHITELABEL dashboard in order to be able to use them.
Note that this request requires an X-Idempotency-Key. Check the Authentication page for more information.
Webhooks
We recommend listening to Webhooks to stay up to date with the state of the enrolled payment methods of your customers.
If a customer enrolls the same card multiple times, WHITELABEL creates a new enrollment each time and returns a distinct vaulted_token. Use the card fingerprint in the enrollment response to detect duplicates on your side (the fingerprint may be null for some providers). See Card Fingerprint.
Only available for PCI certified merchants.
POST/customers/{customer_id}/payment-methods
Path Parameters
customer_idstringrequired
The unique identifier of the customer, created using the Create Customer endpoint (MAX 64; MIN 36).
Body application/json
account_idstringrequired
The unique identifier of the account. You find this information on WHITELABEL’s Dashboard (MAX 64; MIN 36).
The payment method type (MAX 255; MIN 3; Payment type).
workflow"DIRECT"
The payment workflow indicates whether the integration will use WHITELABEL’s SDK or will be a back to back connection. Since you are in the Direct workflow, the value must be DIRECT.
callback_urlstring
URL to return the customer after an enrollment in a provider´s environment. Only necessary for alternative payment methods integrations (MAX 255; MIN 3).
tokenstring<uuid>
Pre-generated token used to reference the payment method being enrolled.
parent_typestring
Type of the parent payment method, used when enrolling a tokenized/derived method (e.g. CARD).
account_updaterboolean
Per-card control for Card Account Updater. When set to false, this card is excluded from Card Account Updater and will not receive automatic card-detail updates. When omitted, the card follows your account’s Account Updater configuration. Applies at enrollment.
card_dataobject
Specifies the details of the card. Only for DIRECT workflow integration.
Show card_data properties
numberstringrequired
Card’s number without any separators (MAX 19; MIN 8) - only available for PCI certified merchants.
expiration_monthinteger<int32>required
Card’s expiration month - MM (MAX 2; MIN 2) - only available for PCI certified merchants.
expiration_yearinteger<int32>required
Card’s expiration year - YYYY (MAX 4; MIN 4) - only available for PCI certified merchants.
security_codestring
Card’s security code (MAX 4; MIN 3) - only available for PCI certified merchants.
holder_namestring
Cardholder’s full name as it appears on the card (MAX 26; MIN 3) - only available for PCI certified merchants.
brandstring
Card brand (e.g. VISA, MASTERCARD, AMEX).
schemestring
Card scheme used to process the transaction (validated card scheme).
soft_descriptorstring
Statement descriptor shown on the cardholder’s bank statement.
Information about the customer/payer associated with the payment method.
Show customer_payer properties
codestring
WHITELABEL customer identifier (customer code). MIN 3 / MAX 255.
organization_customer_external_idstring
Customer identifier in the merchant’s own system, scoped to the organization. MIN 3 / MAX 255.
emailstring
Email address of the customer.
ip_addressstring
IP address of the customer at the time of enrollment. Required by the provider for the online ACH mandate.
browser_infoobject
Browser metadata. Required by the provider for the online ACH mandate.
Show browser_info properties
user_agentstring
Full user-agent string of the customer’s browser.
payment_methodobject
Payment method wrapper used for non-card methods (e.g. bank transfer / ACH) and vaulting options.
Show payment_method properties
typestring
Method type label for the enrolled instrument (e.g. ACH_ENROLLMENT). The enrollment type is driven by the top-level type; this field is informational.
vault_on_successboolean
When true, the payment method is vaulted (saved) after a successful enrollment.
vault_onlyboolean
When true, WHITELABEL stores the bank details from payment_method.detail.bank_transfer and enrolls the payment method immediately as ENROLLED, without any provider interaction at enrollment or unenrollment. Only available for bank transfer enrollments.
detailobject
Method-specific details for the instrument being enrolled.
Show detail properties
bank_transferobject
Show bank_transfer properties
account_type"CHECKINGS" | "SAVINGS"
Bank account type.
account_holder_type"INDIVIDUAL" | "ENTITY"
Type of account holder (e.g. INDIVIDUAL, ENTITY). Accepted and stored, but not forwarded to the provider for ACH — does not control individual vs. company treatment for ACH enrollment.
bank_idstring
Identifier of the bank. MIN 3 / MAX 255.
bank_namestring
Name of the bank. MIN 3 / MAX 255.
bank_accountstring
Bank account number. MIN 3 / MAX 255.
beneficiary_namestringrequired
Name of the account beneficiary. MIN 3 / MAX 255.
branchstring
Bank branch code. MIN 1 / MAX 8.
branch_digitstring
Branch verification digit. MIN 1 / MAX 2.
routing_numberstringrequired
Bank routing number. MIN 3 / MAX 255.
codestring
Bank code. MIN 1 / MAX 8.
referencestring
Reference associated with the bank account. MIN 1 / MAX 255.
bank_account_mask_numberstring
Masked bank account number associated with the bank transfer (for example, ****6789). This is account data, not mandate data.
mandateobject
Direct debit mandate details, for bank transfer methods that operate with mandates (for example, ACH, SEPA, BACS, PAD).
Show mandate properties
idstring
Mandate identifier, as provided by the payment provider.
infostring
Free-text mandate information.
received_statusstring
Provider status indicating whether the mandate was received. Forwarded as provided by the payment provider.
existing_statusstring
Provider status of the existing mandate. Forwarded as provided by the payment provider.
created_atstring<date-time>
Date and time when the mandate was created (ISO 8601).
updated_atstring<date-time>
Date and time when the mandate was last updated (ISO 8601).
creditor_idstring
Creditor identifier of the direct debit mandate (for example, the SEPA creditor identifier shown on the payer’s bank statement). MIN 1 / MAX 128.
provider_dataobject
Provider data used for token migration or provider-token enrollment. Send this object when token_source is PROVIDER_API, MIGRATION_FILE, or PROVIDER_TOKEN. Usage must be agreed with your commercial advisor in WHITELABEL.
Origin of the provided token. Note: PROVIDER_TOKEN is only supported when the top-level type is CARD. Using it with ACH_ENROLLMENT returns an error.
payment_method_tokenstring
Provider’s payment method token. Required when token_source is PROVIDER_TOKEN.
connection_idstring<uuid>
Identifier of the provider connection. Required when token_source is PROVIDER_API or PROVIDER_TOKEN.
verifyobject
Indicates whether to verify the payment with a verify transaction or not. You’ll need to have a provider defined in your CARD route. False by default.
Show verify properties
vault_on_successbooleanrequired
Indicates whether to verify the payment with a verify transaction or not. You’ll need to have a provider defined in your CARD route. False by default.
currencystring
Currency of the card verification. For a full list of currency codes, see Country reference (MAX 3; MIN 3; ISO 4217).
external_subscriptionobject
Links the card verification to a subscription managed in an external billing platform. The object is echoed in the enrollment response and persisted on the verification payment (verify.payment.id in the response) — correlate later through Retrieve Payment and payment webhooks; it is not returned by the payment-method retrieve endpoint or enrollment webhooks. Requires vault_on_success to be true; sending it otherwise returns INVALID_PARAMETERS.
Show external_subscription properties
idstring
Identifier of the subscription in your system.
customer_idstring
Identifier of the subscription’s customer in your system.
metadataobject[]
Optional custom key–value tags for the verification (e.g., order_ref, invoice). They are attached to the internal verify payment created by the verification — available downstream exactly like payment metadata (payment data, provider gateway request, routing) — and stored with the enrolled payment method’s verification settings. Up to 120 items.
Show metadata properties
keystringrequired
The metadata key (MAX 48. Value: MIN:1, MAX:48). [Case Sensitive]
valuestringrequired
The metadata key value (MAX 512. Value: MIN:1, MAX:512). [Case Sensitive]
recurring_paymentobject
Recurring / subscription billing metadata associated with the enrolled method.
Show recurring_payment properties
regular_billingobject
Show regular_billing properties
labelstring
Display label for the recurring billing plan.
amountobject
Show amount properties
currencystring
Billing currency, ISO 4217 format (3 letters).
valuenumber
Billing amount per interval. Range 0 – 9999999999.
interval_unit"DAY" | "WEEK" | "MONTH" | "YEAR"
Billing interval unit.
interval_countinteger
Number of interval units between charges (e.g. 1 = every month when interval_unit is MONTH).
Response
201
idempotency_keystring
namestring
descriptionstring
typestring
categorystring
countrystring
statusstring
sub_statusany
vaulted_tokenstring
callback_urlstring
actionstring
redirect_urlstring
parent_typestring
created_atstring
updated_atstring
card_dataobject
Show card_data properties
iinstring
lfdstring
holder_namestring
Cardholder’s full name as returned by the payment provider.
expiration_monthinteger
expiration_yearinteger
number_lengthinteger
security_code_lengthinteger
brandstring
issuerstring
issuer_codeany
country_codestring
ISO 3166-1 alpha-2 country code of the card’s issuing country.
categorystring
typestring
fingerprintstring
last_successfully_usedany
last_successfully_used_atany
preferredany
verifyobject
Show verify properties
vault_on_successboolean
paymentany
provider_dataobject
Additional data from the provider
Show provider_data properties
raw_requestobject
Obfuscated copy of the request WHITELABEL sent to the provider. Only returned for allowlisted organizations.