Create Payment (two cards)
Create one payment funded by exactly two cards with POST /v2/payments, using the DIRECT, REDIRECT or SDK_CHECKOUT workflow.
amount, and the two parts must add up to amount.value. The base URL is https://api-sandbox.y.uno/v2 in sandbox https://api.y.uno/v2 in production (US) and https://api.eu.y.uno/v2 in production (EMEA). Read Pay with two cards before you integrate.
DIRECTorREDIRECT: sendpayment_method.payment_methodswith exactly two items, bothtype: CARD. Each item has itsamountanddetail.cardor avaulted_token.SDK_CHECKOUT: sendcheckout.sessionand the compositepayment_method.tokenfrom the headless Web SDK. Do not sendpayment_methods.
payment_method.capture applies to both cards and defaults to true. Do not send capture inside detail.card: the request is rejected.
The response has the same shape as Retrieve Payment (two cards).
403 PRODUCT_NOT_ENABLED. In sandbox they are enabled for every organization.split_marketplace, external_subscription and amount.currency_conversion are not allowed with two cards, and promotion quotes are not accepted.
This request requires an X-Idempotency-Key. See Authentication for details.Authorizations
Headers
Unique key for this request. Required on every v2 payment request. Retry an unclear outcome with the same key. Without it the request is rejected with 400 INVALID_PARAMETERS: "The header 'x-idempotency-key' is required."
Body
Your Yuno account id.
Your order id (MIN 3; MAX 255).
Description of the payment (MIN 3; MAX 255).
ISO 3166-1 alpha-2 country code.
Total of the payment. It must equal the sum of the two card amounts. amount.currency_conversion is not allowed.
DIRECT or REDIRECT with payment_method.payment_methods, or SDK_CHECKOUT with checkout.session and the composite payment_method.token.
DIRECT, REDIRECT, SDK_CHECKOUT Required. The payer, shared by both cards. Same fields as in Create Payment.
Your reference for the payment (MIN 3; MAX 255).
Required for SDK_CHECKOUT.
Optional. Where a 3DS challenge or a redirect returns the customer.
Optional, as in v1.
Response
Payment created. Read status and sub_status, then each card's transactions.
A payment funded by two cards.
Aggregated status of the payment. See Pay with two cards.
Aggregated sub status, for example APPROVED, AUTHORIZED, PARTIALLY_CAPTURED, PARTIALLY_REFUNDED, REFUND_RETRY_IN_PROCESS or CANCEL_RETRY_IN_PROCESS.
true for a payment funded by two cards.
Number of cards that fund the payment: 2.
true when the SDK must continue the payment, for example to run a 3DS challenge.
Total of the payment.
The payer, as sent in the request.
DIRECT, REDIRECT, SDK_CHECKOUT