Create Payment
Create a payment with Yuno. Supports various payment methods, card vaulting, and 3DS configurations.
SDK_CHECKOUT (the default), so create it first. It is not needed for the DIRECT or REDIRECT workflows.
amount and a discount line in additional_data.order.discounts with type: YUNO_PROMOTION and the quote_id of a promotion quote. Yuno charges the discounted price, keeps amount as you sent it, and returns discount_amount. See Promotions. The promotion quote example needs Promotions enabled for your organization: until Yuno enables it, Create Promotion Quote answers 204 and no quote_id exists.capture: false inside the payment method detail, under the object that matches the payment method type: payment_method.detail.card.capture for cards and payment_method.detail.wallet.capture for wallets that support authorization (for example PayPal with a vaulted billing agreement). Yuno only reads the flag under the object that matches the payment method type, so capture: false under card is ignored on a wallet payment and the payment is captured right away.
If you want to process payments in a Single Step (Authorization and Capture simultaneously), send capture as true under that same object.
To test all possible transaction outcomes within Yuno in Sandbox, refer to the test data documentation.
For Two-Step payments (Authorization then Capture), send capture as false as described above, then use the Capture Authorization endpoint.
This request requires an X-Idempotency-Key. See Authentication for details.Authorizations
Headers
Body
The unique identifier of the account. You find this information on the Yuno dashboard (UUID, 36 chars).
Country where the transaction must be processed (MAX 2; MIN 2; ISO 3166-1).
AR, BO, BR, CL, CO, CR, EC, SV, GT, HN, MX, NI, PA, PY, PE, US, UY The payment workflow. Indicates whether the integration will use Yuno´s SDK or will be a back to back connection. Guides
SDK_CHECKOUT: [Recommended] - Use Yuno's SDK.DIRECT: Back to back integration with provider info for custom payment experience.REDIRECT: Back to back integration with provider redirection.
SDK_CHECKOUT, CHECKOUT, REDIRECT, DIRECT, SDK_SEAMLESS Links this payment to a subscription managed in an external billing platform. When present on an approved payment with a vaulted card, Yuno takes over the subscription's recurring charges. Cannot be sent together with the subscription object (returns INVALID_REQUEST). The object is returned in the payment response, in Retrieve Payment and in payment webhooks.
Links this payment to an invoice of an external billing platform, so that a payment you collect with Yuno pays that invoice (for example a balance top-up). Yuno checks the invoice before it charges. When the payment is approved, Yuno reports it to the invoice; when it is declined, Yuno records a failed attempt and the invoice stays open. A smaller amount than the amount remaining is accepted on one-off invoices; invoices of subscriptions that Stripe charges automatically need the exact amount. Cannot be sent together with external_subscription or subscription (returns INVALID_REQUEST). The object is returned in the payment response, in Retrieve Payment and in payment webhooks. See Pay a Stripe invoice (top-ups) for the amount rules and the error codes.
Specifies the subscription object. Send exactly one of three shapes: inline terms (frequency, availability and amount) to create a subscription, plan_id to create one from a plan, or id to charge an existing subscription. See Start a subscription with the first payment.
Response
201
- Payment
- Card - With card details
- Card - With airline data
- Card - With customer, billing, and shipping details
- Card - With customer, billing, shipping and order items
- Card - With installments
- Card - With authorization
- Card - With merchant advice code (MAC)
- Card - With device fingerprint
- Card - With vault on success
- Card - With vaulted token
- Alternative payment method
- Card - With shipping, fee and tip amount
- Card - With NT
- Wallet - Direct
- Split Marketplace
The total discount of the Yuno promotion applied to the payment: the sum of the YUNO_PROMOTION lines of additional_data.order.discounts. Absent when no promotion applied. The amount charged is amount.value minus this value, and it is on transactions.amount. See Promotions.
The invoice in an external billing platform that this payment pays (a top-up), as it was sent when the payment was created. The key is in the response only when the payment carried external_invoice. See Pay a Stripe invoice (top-ups).