Overview
Card payments are the most widely used payment method on Yuno, supporting Visa, Mastercard, Amex, and local card brands across all supported countries. This guide covers the full card payment lifecycle, from tokenization through authorization, capture, and recurring payments.Card Payment Flow
A typical card payment follows these steps:- Tokenize the card using the Yuno SDK (client-side) to obtain a one-time token
- Create a payment using the token via the API (server-side)
- Handle 3DS if a challenge is triggered (automatic via SDK)
- Receive confirmation via synchronous response and webhook
Tokenization
One-Time Tokens (SDK)
The Yuno Web or Mobile SDK collects card details in a secure iframe and returns a one-time token. This token is valid for a single payment and expires after 10 minutes.Vaulted Tokens (Returning Customers)
To save a card for future use, includevaulted_token: true and a customer_id in the payment request. The response returns a vaulted_token_id that can be used for subsequent payments without re-entering card details.
Creating a Card Payment
Card Payment (Europe)
Node.js
In Europe, 3DS authentication is mandatory under PSD2/SCA regulations. Yuno handles this automatically when the issuer requires it.
3DS Authentication
Yuno handles 3D Secure (3DS) automatically when required by the card issuer or configured by the merchant.How It Works
-
Frictionless flow: The issuer authenticates the cardholder without interaction. The payment proceeds automatically and the response includes
three_d_secure.status = "AUTHENTICATED". - Challenge flow: The issuer requires cardholder verification (OTP, biometric, or password). The Yuno SDK renders the challenge UI automatically. After the cardholder completes the challenge, the payment continues.
3DS Response Fields
| Field | Description |
|---|---|
version | 3DS protocol version (2.1.0 or 2.2.0) |
status | AUTHENTICATED, ATTEMPTED, FAILED, REJECTED |
eci | Electronic Commerce Indicator |
cavv | Cardholder Authentication Verification Value |
3DS is mandatory in certain markets (e.g., Europe under PSD2). Yuno applies 3DS rules based on your merchant configuration and the issuer’s requirements. Configure 3DS preferences in Dashboard > Settings > Security.
Card Brand Detection and Routing
Yuno automatically detects the card brand from the BIN (first 6-8 digits) and routes the transaction to the optimal provider based on your routing rules.| BIN Range | Brand |
|---|---|
| 4xxxxx | Visa |
| 51-55xxxx, 2221-2720 | Mastercard |
| 34xxxx, 37xxxx | American Express |
| 6011, 644-649, 65xxxx | Discover |
| 3528-3589 | JCB |
| 62xxxx | UnionPay |
| 300-305, 36xxxx, 38xxxx | Diners Club |
| 636368, 438935, 504175 | Elo (Brazil) |
| 606282 | Hipercard (Brazil) |
| 60xxxx, 65xxxx, 81xxxx, 82xxxx | RuPay (India) |
| 4xxxxx, 5xxxxx (FR-issued) | Cartes Bancaires (France) |
| 2200-2204 | Mir (Russia) |
| 9792 | Troy (Turkey) |
| 6054, 6062 | Naranja (Argentina) |
| 603493 | Cabal (Argentina) |
| 5895, 6042, 6043 | Redcompra (Chile) |
Authorization vs. Capture
By default, card payments are authorized and captured in a single step. For two-step flows (hold funds, then capture later), setcapture: false:
- Authorize: Validates the card and holds funds. Payment status is
AUTHORIZED. - Capture: Settles the held funds. Use
POST /v1/payments/{id}/capture. - Void: Release held funds without capturing. Use
POST /v1/payments/{id}/cancel.
Authorizations typically expire after 7 days (varies by issuer). Capture before expiration to avoid auth reversals. See the Capture and Cancel guide for details.
AVS and CVV Verification
Address Verification Service (AVS) and CVV verification provide additional fraud signals:| Check | Result Codes | Description |
|---|---|---|
| AVS | MATCH, PARTIAL, NO_MATCH, NOT_SUPPORTED | Compares billing address with issuer records |
| CVV | MATCH, NO_MATCH, NOT_PROCESSED | Validates the card security code |
payment_method.verification:
Customer-Initiated vs. Merchant-Initiated Transactions
Card networks distinguish between Customer-Initiated Transactions (CIT) and Merchant-Initiated Transactions (MIT). Correctly flagging these improves approval rates and ensures compliance.CIT (Customer-Initiated)
The cardholder actively authorizes the payment. E.g., entering card details at checkout or clicking “Pay Now” with a saved card. CITs typically have higher approval rates because the issuer can verify the cardholder is present.MIT (Merchant-Initiated)
The merchant charges a stored card without the cardholder being present. E.g., recurring billing, subscription renewals, or delayed charges. MITs require:- A prior CIT that established the stored credential agreement
- The
network_transaction_idfrom the initial CIT - Proper
stored_credentialflags in the API request
Recurring Card Payments
For subscriptions and recurring billing, use stored credentials with the appropriate transaction type. See Stored Credentials for the full framework. The initial payment (cardholder-initiated):Card Response Handling
Success
A successful card payment returns statusSUCCEEDED (auto-capture) or AUTHORIZED (manual capture):
Common Decline Reasons
| Decline Code | Meaning | Retryable? | Suggested Action |
|---|---|---|---|
INSUFFICIENT_FUNDS | Card has insufficient balance | Yes (soft decline) | Ask customer to use another card or try later |
DO_NOT_HONOR | Issuer declined without specific reason | Maybe | Retry once; if repeated, ask customer to contact issuer |
EXPIRED_CARD | Card has expired | No (hard decline) | Ask customer to update card details |
STOLEN_CARD | Card reported stolen | No (hard decline) | Do not retry; flag for review |
INVALID_CVV | CVV mismatch | No | Ask customer to re-enter card details |
3DS_AUTHENTICATION_FAILED | Cardholder failed 3DS challenge | No | Ask customer to retry or use another card |
3DS Challenge Response
When 3DS requires a challenge, the initial response includes redirect information. The Yuno SDK handles this automatically, but for Direct API integrations:redirect_url. After completing the challenge, the payment status updates via webhook.