Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.y.uno/llms.txt

Use this file to discover all available pages before exploring further.

On this page, you will find a walk-through guide on creating a payment and the necessary information to accomplish such a task.

Requirements

Before starting following the steps described in this guide, you need to: Make sure to complete these requirements before following the create payment guide.
Explore Yuno Postman CollectionsYuno provides Postman Collections that you can use to replicate the use cases locally.
Enable Yuno Test Payment GatewayTo test a simple card payment in the sandbox environment, you must first enable the Yuno Test Payment Gateway. This connection simulates a provider and allows you to verify your direct integration without using real card data.

Steps summary

The create payment process normally requires finishing the two steps listed below.
  1. Create a customer
  2. Create the payment
Additional payment methods and functionalitiesDifferent payment methods, such as with specific wallets or BNPL, or functionalities, such as split payments, may require additional steps before creating the payment.

Create a payment

Step 1: Create a customer

Use the Create Customer to register the customer info. You will need to provide personal customer information. In addition, you also need to supply the merchant_customer_id, a unique identifier for the customer used on your system.
Customer complementary informationWhen creating a Customer, certain information is not required but can improve the user’s payment experience if provided. Phone, billing address, and shipping address are examples of not mandatory data you can provide.If you add optional information, be aware of the required mandatory fields.
At the end of the create a customer process, you will receive an id, which identifies the user within the Yuno system. Use the id to initialize the checkout. If you are creating a payment for an existing user who was previously created and already had an id you can skip this step.

Step 2: Create a payment

You will create a payment using the endpoint Create Payment. With Yuno, you can create payments with several payment methods, using 3DS or split payments. However, this guide focuses on a simple payment without additional authentication, validation, or enrollment requirements. Below, you find a deeper description of how to create a payment.

2.1 Provide the required attributes

Provide customer-related information, including the customer_payer object that contains the id from Step 1. Certain objects are not mandatory when creating a payment. However, if you provide this information, the user’s payment experience will be enhanced. Be aware of the mandatory fields if you wish to provide this information.

2.2 Choose the capture type

Yuno provides two options for payment capture:
  • Single-step: Authorization and capture are performed simultaneously. You only need to create the payment. The authorization and capture are performed automatically. For the single-step option, you need to send the attribute capture as true on the request.
  • Two steps: Authorization and capture are performed at different moments. After creating the payment, you will need to perform an authorization request and a capture request. If you wish to process the payment in Two Steps, send capture as false and after creating the payment, use the Authorize Payment and the Capture Authorization to complete the process.

2.3 Additional features

Yuno also lets you use some additional features that are supported in the basic payment creation process:
  • vault_on_success: If your customer uses a credit card to make the payment, we let you enroll that payment method for the customer for future purchases in the same step.
  • installments: In case you offer your clients installments for their payments and your chosen processor accepts them, you can send us the amount of installments to create the payment with.
Both fields can be found in the payment_method detail section of the payment.
To generate and receive a vaulted_token when vault_on_success = true, the payment must reference an existing Yuno customer through customer_payer.id. Creating or sending the customer data inline inside the payment request does not create the customer on our side, so no vaulting will occur. When these conditions are met and the payment status is SUCCEEDED, the vaulted_token will be returned in the payment response and can be used for future transactions.

Step 3: Check the payment status

After performing the request to the Create Payment endpoint, you can check the payment status by analyzing the status and sub_status from the response. Check the page Payment Status to see all options you can receive in response to the payment creation request. Depending on the processor and payment method, the status may take some time to update. Therefore, you may need to use endpoints to recover the payment status. To perform this task, you can use the Retrieve Payment by ID or Retrieve Payment by merchant_order_id. Another option is to use webhooks to receive notifications after each event. Yuno recommends you use webhooks to monitor asynchronous payments better. Check the Webhooks guide to learn how to configure the webhooks solution provided by Yuno.
Test Card PaymentsIf you need to test Card payments in general, Yuno provides the Yuno Test Payment Gateway. It works as a connection, however, it is available only in the sandbox environment. Check the Yuno Test Payment Gateway page to learn all functionalities, or go directly to the guide on how to test card payments.