Direct Flow

How it works

If you are a developer, you can use our Direct Flow to keep using your checkout and connect to our services using only a server-to-server connection.

Your company must be PCI-certified to use our server-to-server card payments service. Please forward your AOC certification to your account manager before beginning the implementation.

For every implementation, we recommend taking the payment status and sub_status as the main reference for the payment's state. A payment could have different transactions associated with it, so by focusing on the payment status/sub_status, you can have the latest state regardless of how many transactions were made, giving you clear input for decision-making. With this integration, you can also enroll credit cards for future purchases (also only available for PCI-compliant merchants).

Payment

Step 1: Create a customer

[Optional] - The fist step of the payment flow is to create a customer. A customer will have payment methods associated. You can create a customer using the following endpoint. As a result, you will receive the customer's id that was created in the Yuno DB.

You can skip this step if you have previously created the customer.

This step is optional because you can send the customer information directly in the payment without creating a customer object in Yuno.

Step 2: Create the payment

As you take care of the whole payment experience with this integration, you will need to display the payment methods enabled in your Yuno account, and once the user has selected the payment method, you can create a payment. A payment gathers all crucial details regarding the order, customer specifics, total amount, currency, products, shipping details, and more. You can create a Payment using the following endpoint.

You can use the examples section in the API reference as a reference. If the user selects a previously enrolled payment method, you can use the vaulted_token returned by the get payment methods service to create the payment.

During the integration, we recommend taking the payment status and sub_status as the main reference for the payment's state. A payment could have different transactions associated with it, so by focusing on the payment status/sub_status, you can have the latest state regardless of how many transactions were made, giving you clear input for decision-making.

Complementary features

  • Webhooks: We also recommend configuring Webhooks in your Yuno dashboard. Webhooks are the best way to ensure your system is up-to-date with payment progress and status. Since the event notifications trigger automatically, your system won't need to perform recurrent requests to Yuno.

Enrollment

Step 1: Create a customer

The fist step of the payment flow is to create a customer. A customer will have payment methods associated. You can create a customer using the following endpoint. As a result, you will receive the customer's id that was created in the Yuno DB.

You can skip this step if you have previously created the customer.

Step 2: Enroll payment method

This feature is only available for enrolling Cards for PCI compliant merchants

Once you have your customer, you can enroll the payment method using the Enroll Payment Method endpoint . With the information provided by Yuno after the customer selects the payment method to enroll, you will be able to save that information for future purchases using the vaulted_token that represents the payment method object created.