Yuno Testing Gateway
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.
Connecting with Yuno
Mandatory fields when integrating via Yuno:
Yuno Test Payment Gateway doesn't requiere any key.
General information
Countries:
Currencies:
All currencies are available.
Type of cards:
Test data:
Integration configuration
Dashboard configuration:
- Log in to dashboard.y.uno.
- Click Connections and then select Yuno Test Payment Gateway.
- Click Connect.
- Introduce Name.
- Click Connect
Production environment
Specific procedure for a merchant to go live:
Set up the Yuno Test Payment Gateway
- Complete the Test Payment Gateway Integration configuration.
- After establishing the connection, you must designate the Yuno Test Payment Gateway as your card payment provider in your routing section. Access Routing on the Yuno Dashboard, select Not published, find the Card option, and click Set Up.
- Create a new route for Card. If you are unsure how to create it, check the Configure dynamic routing.
- On the Routing dashboard, add conditions to trigger the card payment. You can use card brand or country as trigger conditions, for example.
- For the created condition, add the Yuno Test Payment Gateway.
- For the All other payments options, select the Cancel option. The below image presents an example of a routing configuration where the card brand condition was used, accepting payments with Visa and Mastercard brands.
- Now you need to make the cards available for testing. Access Checkout builder on the Yuno Dashboard. Activate the toggle button for Card and publish the checkout using the Publish button.
Use the Create payment guide to learn how to test card payments.
Test card payments with Yuno Testing Gateway
On this page, you will find a walk-through guide on creating a card payment using the Yuno Testing Gateway.
Yuno Testing Gateway is a Yuno solution to test card payment in general. It works as a connection. However, it is only available in the sandbox environment.
Requirements
Before starting following the steps described in this guide, you need to:
- Access your API credentials on the Yuno Dashboard, which are composed by:
public-api-key
private-secrete-key
account_id
- Set up the Yuno Testing Gateway connection on your Yuno Dashboard account. You find a step-by-step guide on connecting it in the Integration configuration section.
- Build a route for the Yuno Testing Gateway to define it as your card payment provider. You find a step-by-step guide on how to do it in the Set up the Yuno Testing Gateway section.
- Configure the checkout builder to make the Yuno Testing Gateway available.
Steps summary
The create payment process normally requires finishing the four steps listed below.
Create a payment
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 information
When 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 has an id
you can skip this step.
2. Create a checkout session
With a customer registered, you can create a checkout session. The checkout is when the customer finalizes their order and proceeds to pay for the products or services they wish to acquire. Therefore, at this stage, you will provide information regarding the payment amount and the location where it is being created.
Route conditions filtering
When creating the route, you can define condition that work as filters. If you have used country as a condition, check if the provided country when creating the checkout session in on the condition list. Otherwise, the card payment may not be processed by the Yuno Testing Gateway.
Use the Create Checkout Session endpoint. Notice that the customer_id
required to perform the request is the id
you received when creating the customer in Step 1.
From the request response to the Create Checkout Session endpoint, you will receive the checkout_session
information. It will be used to create the one-time token (OTT) and the payment on the next steps.
3. Create a one-time token (OTT)
An OTT is a unique identifier Yuno generates to protect your customer privacy and security. It serves as an identifier for payments detail and prevents sensitive data from being stored on your servers. Therefore, you can use OTTs to make it simple for your customers to repeat payments without re-entering their payment information, making the process more secure and convenient.
You will always get the OTT from the Yuno SDK on your production application. However, to make it easier for you to test the payment creation process, Yuno provides the Create OTT endpoint. You will need to provide the checkout_session
received in Step 2 and define the payment type as CARD
through the type
parameter. In the response, you will receive the one-time-token
, which you will use to create the payment.
4. Create a payment
You will create a payment using the Create Payment endpoint. Below you find a deeper description of how to create a payment.
4.1 Provide the required attributes
Provide customer-related information, including the checkout_session
from Step 2 through checkout.session
and 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.
4.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
capture
attribute astrue
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
asfalse
and after creating the payment, use the Authorize Payment and the Capture Authorization to complete the process.
4.3 Define the payment workflow
When creating the payment, you need to inform which integration from Yuno you are using. When creating a payment, you must inform it through the workflow
attribute, which can be:
CHECKOUT
: If you are using the Yuno SDK to create the payment.DIRECT
: If you are using a back-to-back integration. To use this workflow, you need to be PCI compliant.REDIRECT
: If you are using a back-to-back integration and provider redirection.
4.4 Provide the payment method information
Inform the payment method information through the object payment_method
. Here, you will provide the one-time-token
through the attribute token
and select the payment type
equal to CARD
, the one informed in Step 3, based on the Payment type list. In addition, you need to add the card information on the object detail.card
.
You can use the payment description or specific card data to get the desired result when you test payment with Yuno Test Payment Gateway. The following sections describe in detail each approach.
Yuno system follows a sequential process, initially examining card data and subsequently evaluating the provided description. Consequently, if there is a disparity in the status indicated by the card data and the description for a testing payment, Yuno will prioritize and reflect the status associated with the card data.
4.4.1 - Payment Description
To get the desired payment result using the payment description, you need to define the expected result as the description of the payment you create. For example, if you are testing a payment and expect a successful result, the payment description should be "SUCCEEDED". You find all available options in the Transaction Codes section.
4.4.2 - Card detail
Another option to get the expected payment results is to use one of the testing cards provided by Yuno. In the tables below, you find a list of cards and their data details to use when using the Yuno Testing Gateway. The Transaction Response Code column defines the returned payment status when you use the corresponding card.
Visa
Number | Expiration Date | Security Code | Cardholder Name | Transaction Response Code |
---|---|---|---|---|
4507990000000002 | 11/28 | 123 | John Doe | SUCCEEDED |
4507990000000010 | 11/28 | 123 | John Doe | INSUFFICIENT_FUNDS |
4507990000000028 | 11/28 | 123 | John Doe | DECLINED_BY_BANK |
4507990000000036 | 11/28 | 123 | John Doe | DO_NOT_HONOR |
4507990000000044 | 11/28 | 123 | John Doe | INVALID_SECURITY_CODE |
4507990000000051 | 11/28 | 123 | John Doe | INVALID_CARD_DATA |
4507990000000069 | 11/28 | 123 | John Doe | REPORTED_STOLEN |
4507990000000077 | 11/28 | 123 | John Doe | ERROR |
Mastercard
Number | Expiration Date | Security Code | Cardholder Name | Transaction Response Code |
---|---|---|---|---|
5252440000000002 | 11/28 | 123 | John Doe | SUCCEEDED |
5252440000000010 | 11/28 | 123 | John Doe | INSUFFICIENT_FUNDS |
5252440000000028 | 11/28 | 123 | John Doe | DECLINED_BY_BANK |
5252440000000036 | 11/28 | 123 | John Doe | DO_NOT_HONOR |
5252440000000044 | 11/28 | 123 | John Doe | INVALID_SECURITY_CODE |
5252440000000051 | 11/28 | 123 | John Doe | INVALID_CARD_DATA |
5252440000000069 | 11/28 | 123 | John Doe | REPORTED_STOLEN |
5252440000000077 | 11/28 | 123 | John Doe | ERROR |
American Express
Number | Expiration Date | Security Code | Cardholder Name | Transaction Response Code |
---|---|---|---|---|
370000000000002 | 11/28 | 1234 | John Doe | SUCCEEDED |
370000000000010 | 11/28 | 1234 | John Doe | INSUFFICIENT_FUNDS |
370000000000028 | 11/28 | 1234 | John Doe | DECLINED_BY_BANK |
370000000000036 | 11/28 | 1234 | John Doe | DO_NOT_HONOR |
370000000000044 | 11/28 | 1234 | John Doe | INVALID_SECURITY_CODE |
370000000000051 | 11/28 | 1234 | John Doe | INVALID_CARD_DATA |
370000000000069 | 11/28 | 1234 | John Doe | REPORTED_STOLEN |
370000000000077 | 11/28 | 1234 | John Doe | ERROR |
Diners
Number | Expiration Date | Security Code | Cardholder Name | Transaction Response Code |
---|---|---|---|---|
3647166000000002 | 11/28 | 123 | John Doe | SUCCEEDED |
3647166000000010 | 11/28 | 123 | John Doe | INSUFFICIENT_FUNDS |
3647166000000028 | 11/28 | 123 | John Doe | DECLINED_BY_BANK |
3647166000000036 | 11/28 | 123 | John Doe | DO_NOT_HONOR |
3647166000000044 | 11/28 | 123 | John Doe | INVALID_SECURITY_CODE |
3647166000000051 | 11/28 | 123 | John Doe | INVALID_CARD_DATA |
3647166000000069 | 11/28 | 123 | John Doe | REPORTED_STOLEN |
3647166000000077 | 11/28 | 123 | John Doe | ERROR |
UATP
Number | Expiration Date | Security Code | Cardholder Name | Transaction Response Code |
---|---|---|---|---|
1139000000000002 | 11/28 | 123 | John Doe | SUCCEEDED |
1139000000000010 | 11/28 | 123 | John Doe | INSUFFICIENT_FUNDS |
1139000000000028 | 11/28 | 123 | John Doe | DECLINED_BY_BANK |
1139000000000036 | 11/28 | 123 | John Doe | DO_NOT_HONOR |
1139000000000044 | 11/28 | 123 | John Doe | INVALID_SECURITY_CODE |
1139000000000051 | 11/28 | 123 | John Doe | INVALID_CARD_DATA |
1139000000000069 | 11/28 | 123 | John Doe | REPORTED_STOLEN |
1139000000000077 | 11/28 | 123 | John Doe | ERROR |
5. Check the payment status
After performing the request to the Create Payment, you can check the payment status by analyzing the status
and sub_status
from the response. Check the Payment Status page to see all the 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 endpoints. 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.
Updated 30 days ago