Skip to main content
A two-card payment is one payment funded by exactly two cards. Each card pays its own part of the amount, and the two parts add up to the payment amount. Your customer pays one order, and you reconcile one payment. Use it when a customer wants to split an order between two cards, for example because one card does not have enough limit for the whole order.

Limits

  • Exactly two cards, both type: CARD.
  • One currency: both card amounts use the currency of the payment.
  • split_marketplace, external_subscription and amount.currency_conversion are not allowed, and promotion quotes are not accepted (see Promotions).
  • All or nothing: both cards succeed or the payment fails. See All or nothing.
  • payment_method.capture is shared by both cards.

Enablement

In production, two-card payments are enabled per organization. Until Yuno enables them, POST /v2/payments answers:
with HTTP status 403. Contact your Key Account Manager to enable it. In sandbox, two-card payments are enabled for every organization.

Create the payment

Send POST /v2/payments (https://api-sandbox.y.uno/v2/payments in sandbox, https://api.y.uno/v2/payments in production, https://api.eu.y.uno/v2/payments in production for EMEA) with the same public-api-key and private-secret-key headers as the v1 endpoints. The X-Idempotency-Key header is required on this request and on every v2 operation; without it the request is rejected with 400 and the message The header 'x-idempotency-key' is required.
On the SDK path, create the composite token with generateToken in the headless Web SDK. The token carries both cards and their amounts. See the full reference in Create Payment (two cards).

Read the response

The create request and Retrieve Payment (two cards) return the same shape:
  • split_payment_methods is true and payment_methods_count is 2.
  • payment_method.payment_methods has one entry per card, with its sequence (1 or 2), type, amount (currency and value) and transactions.
  • A card has no status of its own. Read each card’s outcome from its transactions: the last transaction of the card and its status tell you what happened to that card. A card that went through 3DS shows THREE_D_SECURE followed by PURCHASE (or AUTHORIZE when capture is false).
  • Read the payment outcome from the payment-level status and sub_status. When sdk_action_required is true, the SDK has to continue the payment, for example to run a 3DS challenge.

Statuses

Yuno sums up both cards in the payment status and sub_status. The first rule that matches wins: See Payment status for every status and sub status.

All or nothing

Both cards succeed or the payment fails. If one card fails (declined, error or fraud), Yuno reverses the other card before it answers the create request, so the response already shows the final outcome:
  • A card that was charged (PURCHASE, or captured) is refunded.
  • A card that was only authorized is canceled.
  • A card waiting for 3DS is closed by Yuno, with no call to the provider.
If a reversal fails, the payment stays DECLINED with sub status REFUND_RETRY_IN_PROCESS or CANCEL_RETRY_IN_PROCESS, and Yuno retries the reversal automatically. While the payment is in one of these sub statuses, capture and cancel are rejected.
Do not ask your customer to continue with the remaining card after a failure. Start a new payment instead.

Fraud screening

  • A rejection of one card before authorization declines the payment (DECLINED / FRAUD_DECLINED), and Yuno closes the other card.
  • A decline after authorization reverses both cards.

Operations

Capture, cancel and refund are per card: send the id of the card’s transaction, from payment_method.payment_methods[].transactions. Every operation answers 201 with the payment in the same v2 shape and requires an X-Idempotency-Key.
  • A refund on a card is capped at that card’s amount minus what was already refunded on it.
  • The payment-level cancel-or-refund accepts an optional amount. Yuno spreads it across the cards, starting with the card that has the most refundable amount. An amount above the total refundable amount is rejected.
  • While a card has an open chargeback, refunds are rejected with INVALID_STATUS.

Webhook

The payment webhook has the same payload as for v1 payments, plus:
  • split_payment_methods and payment_methods_count.
  • payment_method.capture.
  • payment_method.payment_methods[], with sequence, type, amount and transactions for each card.
There is no status per card in the webhook either: read each card’s outcome from its transactions. See Configure webhooks.

Errors

Errors are 400 INVALID_PARAMETERS unless noted. The messages array lists every problem found in the request.