Nupay - Wallet Enrollment

Nupay has an alternative option where Customers can authorize their Nupay account through Yuno to make frictionless payments for future purchases. To add this option to your stack, you'll need to integrate the Enrollment process in Yuno.

Configuration

You'll need to set up the Nupay connection in the Connections section in the dashboard and then create the route for the Nubank payment method using the previously created connection.

Workflow

Then, you'll need to decide which type of integration you are going to use.

1- SDK integration

While using Yuno's SDKs, you have full control of your checkout frontend. Yuno will provide your backend with all the available payment methods you can offer to your clients. With this information, you can decide which payment methods to show in your checkout while we take care of the details to be considered for implementing each payment method.

Steps

After that, you will be able to directly create payments with the vaulted_token obtained for each payment method for the customer.

2- Direct integration

Besides our SDK integrations, we allow merchants to connect directly to Yuno's APIs to process payments in case you have specific requirements that need to be addressed with a back-to-implementation. For Credit cards, your company must be PCI-certified to use our server-to-server card payments service, and we will require you to forward your AOC certification to your account manager before beginning the implementation.

Steps
  • Create a customer
  • Create payment method: Create the NU_PAY_ENROLLMENT payment method and redirect the customer to the redirect_url returned by the provider in the service response. Example:
    • Request
      {
        "country": "BR",
        "type": "NU_PAY_ENROLLMENT",
        "workflow": "DIRECT",
        "account_id": "[your_account_id]",
        "customer_payer": {
             "merchant_customer_id": "AA01",
              "first_name": "John",
              "last_name": "Doe",
              "email": "[email protected]",
              "document": {
                  "document_type": "CPF",
                  "document_number": "47127142394"
              }
         },
        "callback_url":"https://www.y.uno"
      }
      
      Customer payer info is mandatory to create the enrollment. NuPay uses the document as the main id to link the accounts.
      • Response
      {
        [...]
        "type": "NU_PAY_ENROLLMENT",
        "category": "WALLET",
        "country": "BR",
        "status": "READY_TO_ENROLL",
        "sub_status": null,
        "vaulted_token": "aa3b0a80-12bc-406d-a616-749fcd543d66",
        "callback_url": "https://www.y.uno",
        "action": "REDIRECT_URL",
        "redirect_url": "https://sandbox-mock-nubank-app.spinpay.com.br/pre-authorized?merchant-name=high-network-staging&ticket=oF_lEOX1A4pZGFsttMdald69Y74hXHBXVW-Fa_PBZlM&merchant-source-id=76ca3966-e9c4-43d4-95d5-2d216bd9b780&state=1ceaa272-be21-41b7-a39e-3b88940952c1&auth-flow=oauth&redirect_uri_merchant=https%3A%2F%2Fstaging.y.uno%2Fspinpay-webhook%2Fv1%2Fenrollment&auth_flow=oauth",
        "created_at": "2024-11-20T13:54:24.802534Z",
        "updated_at": "2024-11-20T13:54:24.802535Z",
        [...]
    }
    
    • vaulted_token: Token you will need to create future payments.
    • redirect_url: URL you will need to redirect your customer in order to finish the enrollment.
  • Implement webhooks or do a get to the payment method in order to be updated on the enrollment status.

The same as in the SDK integration, after the previous steps, you will be able to directly create payments with the vaulted_token obtained for each payment method for the customer using NU_PAY_ENROLLMENT as the payment_method.type.