NuPay is only available for the Brazilian market.
NuPay is a payment method powered by Nubank, available exclusively for Brazilian customers.
How it works
NuPay is an asynchronous payment method. The customer enters their CPF (Brazilian tax ID) to proceed. Paybyrd validates the CPF, verifies the customer has a NuPay account, and determines which payment conditions are available based on the order amount. The available payment conditions are displayed to the customer before they confirm.
Once the customer confirms, they complete the payment in the Nubank app on their phone. Paybyrd polls the order status and updates the transaction to succeeded or failed accordingly.
Payment flow
- The customer creates an order and selects NuPay as the payment method.
- The customer enters their CPF and submits.
- Paybyrd queries the NuPay API to validate the CPF and retrieve the available payment conditions for that customer and order amount.
- NuPay returns the payment options available for the order:
- Debit only — for lower order amounts.
- Debit, credit, and installments — for higher amounts; up to 10 installments are available.
- If the CPF is invalid or the customer does not have a Nubank account, NuPay is unavailable and an error screen is displayed.
- If the CPF is valid, a confirmation screen shows the available payment conditions. The customer reviews and clicks Pay.
- How the payment is completed depends on the device:
- Mobile — the Nubank app opens automatically for the customer to complete the payment.
- Desktop — a polling screen is displayed. The customer opens the Nubank app manually to complete the payment. There is no QR code available.
- Paybyrd polls the order status to confirm whether the payment was completed or cancelled.
Make a payment
This example shows the request that creates a NuPay payment, and the response it returns:
curl --request POST \
--url https://gateway.paybyrd.com/api/v2/payment \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {your_api_key}' \
--data '
{
"type": "OnlineTransfer",
"isoAmount": 10000,
"currency": "BRL",
"marketId": "BR",
"orderRef": "ORDER-123456",
"brand": "NUPAY",
"shopper": {
"firstName": "Maria",
"lastName": "Silva",
"email": "maria@silva.com"
}
}'
{
"type": "OnlineTransfer",
"currency": "BRL",
"orderRef": "ORDER-123456",
"brand": "NUPAY",
"paymentMethod": "nupay",
"shopper": {
"email": "maria@silva.com",
"firstName": "Maria",
"lastName": "Silva"
},
"code": "BYRD201",
"description": "Payment being processed. Waiting for shopper",
"status": "Processing",
"requestId": "b8a1c4d9-3f52-4e7a-9b0e-7d6e2f8a3c91",
"expiresAt": "2024-08-01T08:40:21.397267Z",
"transactionId": "c4d2a7f8-9e31-4b5a-8c2d-1e9f3b6a0d74",
"amount": "100.00",
"isoAmount": 10000
}