The Yuno payment process
The payment process consists of the following steps:1
Create a customer
Payments in Yuno usually link to a customer. The system stores customer details such as name, address, and phone number. Yuno uses this information to process payments across different payment methods and processors.
When you create a customer, Yuno generates a unique identifier for use in later steps.
A payment can be created without a customer. If you create the checkout session with a
customer_id, send the same customer in customer_payer.id when you create the payment.2
Create a checkout session
To process a payment with Yuno SDK or Checkout, create a checkout session. This session connects the customer to the payment and stores key transaction details. Yuno loads all available payment methods linked to your account.
Direct/Server-to-server integrations skip this step and provide the transaction details directly during payment creation. Set
workflow to DIRECT (or REDIRECT) on the payment request. Without it, the API asks for the checkout object.3
Collect payment details
To process a payment, you need to collect the customer’s payment information.
- SDK Integration: Yuno’s SDKs securely capture sensitive data and generate a one-time token (OTT).
- Direct Integration: You collect the payment details directly on your servers (requiring PCI compliance) and send them to the payment endpoint.
An OTT is a temporary, single-use code used by Yuno SDKs to enhance security for merchants.
4
Create the payment
A payment represents the final transaction. Use the data collected in the previous steps (customer ID and payment information) to process the final transaction.
Certain fields are optional but can enhance user experience. Consider mandatory fields if you decide to include this information.
The create payment request requires the
X-Idempotency-Key header. Send a unique value (for example, a UUID) so you can safely retry the request. See Idempotency.