Limits
- Exactly two cards, both
type: CARD. - One currency: both card amounts use the currency of the payment.
split_marketplace,external_subscriptionandamount.currency_conversionare 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.captureis shared by both cards.
Enablement
In production, two-card payments are enabled per organization. Until Yuno enables them,POST /v2/payments answers:
403. Contact your Key Account Manager to enable it. In sandbox, two-card payments are enabled for every organization.
Create the payment
SendPOST /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.
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_methodsistrueandpayment_methods_countis2.payment_method.payment_methodshas one entry per card, with itssequence(1or2),type,amount(currencyandvalue) andtransactions.- A card has no status of its own. Read each card’s outcome from its
transactions: the last transaction of the card and itsstatustell you what happened to that card. A card that went through 3DS showsTHREE_D_SECUREfollowed byPURCHASE(orAUTHORIZEwhencaptureisfalse). - Read the payment outcome from the payment-level
statusandsub_status. Whensdk_action_requiredistrue, the SDK has to continue the payment, for example to run a 3DS challenge.
Statuses
Yuno sums up both cards in the paymentstatus 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.
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.
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 theid 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-refundaccepts an optionalamount. Yuno spreads it across the cards, starting with the card that has the most refundable amount. Anamountabove 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_methodsandpayment_methods_count.payment_method.capture.payment_method.payment_methods[], withsequence,type,amountandtransactionsfor each card.
Errors
Errors are400 INVALID_PARAMETERS unless noted. The messages array lists every problem found in the request.