This guide explores how to integrate NuPay, the digital payment method from NuBank, into your checkout. Yuno supports both the Yuno SDK (recommended) and Direct API workflows. You’ll learn how to: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.
- Enroll NuPay as a customer payment method
- Make payments without enrollment (2FA mode)
- Make payments with installments (payment conditions)
- Set up subscriptions
Requirements
Before starting, you need:- A Yuno account with Dashboard access
- API keys and an
account_id(found in the dashboard) - A customer created in Yuno (or create one in Step 1)
Create and manage customers
Create the customer once using your externalmerchant_customer_id, then retrieve by Yuno id or by merchant_customer_id as needed.
- Use the Create Customer endpoint and provide your own
merchant_customer_id(the unique id of the customer in your system). The response returnsidwhich is the Yuno customer id. - Use Retrieve Customer with the Yuno
id. - Use Retrieve Customer by External Id with query parameter
merchant_customer_id.
Enroll NuPay payment method
Follow the steps below to enroll theNU_PAY_ENROLLMENT payment method to a customer.
- Yuno SDK
- Direct API
With the SDK integration, Yuno handles displaying the NuPay payment method, redirecting the customer to NuBank for authentication, and managing the return flow.
Step 1: Create a customer
Create a customer and obtain their Yuno customerid using the Create Customer endpoint.Step 2: Create a customer session
Use the customerid and the Create Customer Session endpoint to receive a customer_session.Step 3: Initialize the SDK and enroll
Initialize Yuno’s SDK (Web, Android, or iOS) with thecustomer_session.If using the SDK checkout or headless integration, call Enroll Payment Method (Checkout) (POST /customers/sessions/{customer_session}/payment-methods) with payment_method_type: NU_PAY_ENROLLMENT.The SDK automatically displays the NuPay payment method, manages the customer redirection to NuBank, and handles the authentication flow.Step 4: Confirm enrollment
Listen to webhooks or retrieve enrolled payment methods to verify the status isENROLLED.Payments without enrollment (2FA mode)
You can accept one-time payments with NuPay without requiring the customer to enroll their payment method. This is often referred to as 2FA mode, as the customer authenticates each transaction individually.- Yuno SDK
- Direct API
Accept payments without enrollment using Yuno’s SDK. The SDK handles displaying NuPay and redirecting the customer to complete the authentication.The response returns a
Step 1: Create a checkout session
Start by creating a checkout session using the Create Checkout Session endpoint.checkout_session ID.Step 2: Initialize the SDK
Initialize Yuno’s SDK (Web, Android, or iOS) with thecheckout_session ID. NuPay will automatically render as an available payment option in the SDK interface.Step 3: Customer completes payment
When the customer selects NuPay:- The SDK prompts the customer for authentication.
- The customer is redirected to Nu for 2FA authentication.
- The SDK receives the result and processes the payment through Yuno.
Step 4: Handle SDK workflow payments (Optional)
If you are calling the Yuno payments API directly while using the SDK checkout, set theworkflow to SDK_CHECKOUT and pass the checkout.session token:Payments with payment conditions (installments)
NuPay supports installments for both enrolled payment methods and one-time payments (2FA mode).- Yuno SDK
- Direct API
NuPay supports installments for enrolled payment methods and one-time payments (2FA mode) within the SDK.Select the plan
Step 1: Get payment conditions
Request available installment options using the APM installments endpoint, depending on the flow:- Enrollment Flow
- 2FA Mode
id and installments number from the response.Step 2: Create payment using SDK workflow
Create the payment using the SDK workflow by settingworkflow: "SDK_CHECKOUT" and passing the checkout.session along with the plan details:Subscription flow
You can use NuPay for recurring charges.- Yuno SDK
- Direct API
Recurring payments/subscriptions with NuPay can be easily set up using the SDK enrollment token:
- Create a customer.
- Enroll NuPay via Yuno SDK (Checkout workflow) to obtain a
vaulted_token. - Create a subscription with the enrolled
vaulted_tokenusing the Create subscription endpoint. - Retrieve and manage subscription state as needed.
Limitations
- Subscriptions with NuPay do not support payment conditions (installments)
- Creating subscriptions directly within a payment request is not supported