Create a Checkout with Peru interoperable QR Code
This integration enables merchants to process payments in Peru through the PagSeguro Payment Page using QR code-based digital wallets. Customers scan a QR code displayed at checkout using their preferred wallet app to authorize the payment.
The following wallets are supported:
- Yape
- Plin
- BBVA Wallet
- Scotiabank
- Interbank
- Ligo
- BanBif
- Izipay Ya+
How it works
- The merchant creates a checkout session through the Payment Page API.
- The merchant redirects the customer to the Payment Page URL returned in the response.
- The customer opens their preferred wallet app, scans the QR code displayed on the Payment Page, and authorizes the payment.
- PagSeguro sends a notification to the merchant's
notification_urlwhen the transaction status changes.
QR code expiry
The checkout URL (
expires_at) is valid for 1 hour after the session is created — the customer must access the page within this window. Once the customer accesses the Payment Page and the QR code is generated, the QR code remains valid for 2 days.
Step 1: Build the request
Send a POST request to the Create a Payment Page endpoint.
The only difference from a standard Payment Page request is the charge.e_wallet field, which must be set to NIUBIZ_WALLET.
For Payment Page checkouts, the display language is specified in
checkout.language. Theintegrationobject does not accept alanguagefield for this flow.
POST /v3/checkouts
Headers
Authorization: Basic {base64(merchant_id:secret_key)}Content-Type: application/json
Request body
{
"integration": {
"reference": "REF-XXX-1234567890",
"notification_url": "https://www.merchantwebsite.com/notify?type=transaction",
"project": 1
},
"order": {
"currency": "PEN",
"items": [
{
"quantity": 1,
"description": "Pants",
"unit_price": 50.00
},
{
"quantity": 1,
"description": "Tshirt",
"unit_price": 50.00
}
]
},
"checkout": {
"language": "es_ES",
"redirect_urls": {
"success": "https://www.merchantwebsite.com/success"
}
},
"charge": {
"country": "PE",
"e_wallet": "NIUBIZ_WALLET"
},
"payer": {
"email": "[email protected]",
"person": {
"name": "Tiago Silva Santos",
"birth_date": "1988-06-15",
"phone": {
"country_code": "51",
"number": "999999999"
}
}
}
}
Reference pages
For additional requirements and options, refer to:
Step 2: Process the API response
On success, the API returns the checkout session details.
{
"code": "2bd81fda-c77c-436c-8a4a-4855b9fadec7",
"url": "https://checkout.international.pagseguro.com/2bd81fda-c77c-436c-8a4a-4855b9fadec7",
"created_at": "2026-05-12T19:22:36Z",
"expires_at": "2026-05-12T20:22:36Z"
}
Redirect the customer to the url returned in the response. The checkout URL is valid for 1 hour (expires_at). Once the customer accesses the Payment Page, the QR code generated remains valid for 2 days.
Step 3: Handle transaction status
When the transaction status changes, PagSeguro sends a notification to your notification_url. After receiving the notification, call the transaction status endpoint to retrieve the full details using the transaction code.
GET /transactions/{code}
{
"transaction-result": {
"store-id": "10",
"transactions": [
{
"transaction-code": "1224025387",
"order-id": "REF-XXX-1234567890",
"order-description": "Pants",
"status": "COMPLETE",
"currency": "PEN",
"amount": "100.00",
"customer-email": "[email protected]",
"customer-country": "PE",
"notify-url": "https://www.merchantwebsite.com/notify?type=transaction",
"payment-country": "PE",
"payment-id": "238",
"payment-name": "niubiz wallet",
"order-date": "2026-05-12T19:22:36-03:00",
"payment-date": null,
"last-status-change-date": "2026-05-12T19:23:40-03:00",
"chargeback-date": null,
"refundable": false,
"refunds": [],
"payment-response": null,
"payment": {
"payment-method": {
"type": "e_wallet",
"sub-type": "niubiz wallet"
}
}
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
For a description of all possible status values, see Transaction Status Description.
You can also monitor status without waiting for a notification by polling the status endpoint directly using the code returned in the checkout response.
Field reference
The payer object is optional. When provided, payer.person.name and payer.person.phone are required.
| Field | Required | Description |
|---|---|---|
| integration.reference | Required | Merchant's unique reference for the transaction |
| integration.notification_url | Required | URL that receives status updates |
| integration.project | Optional | Integration project identifier (≥ 1) |
| order.currency | Required | ISO 4217 currency code. See Supported Currencies |
| order.items[].quantity | Required | Quantity of the item |
| order.items[].description | Required | Description of the item |
| order.items[].unit_price | Required | Unit price in major currency units (e.g. 50.00) |
| checkout.language | Required | Language for the Payment Page interface. See Supported Languages |
| checkout.redirect_urls.success | Required | URL the customer is redirected to on success |
| charge.country | Required | Country of charge, e.g. PE for Peru |
| charge.e_wallet | Required | Must be NIUBIZ_WALLET |
| payer.email | Optional | Customer's email address |
| payer.person.name | Conditional | Customer's full name. Required when payer is sent |
| payer.person.birth_date | Optional | Customer's birth date in YYYY-MM-DD format |
| payer.person.phone.country_code | Conditional | Phone country code. Peru: 51. Required when payer is sent |
| payer.person.phone.number | Conditional | Local phone number. Required when payer is sent |
Error handling
If the request fails, the API returns an HTTP status code other than 201 and an errors array describing the problem.
{
"errors": [
{
"message": "The value provided for charge.e_wallet is not valid.",
"location": "body.charge.e_wallet"
}
]
}
For the complete list of error codes and descriptions, see the Error Codes and Reason Codes reference pages.
Testing
Use the Payment Page Sandbox Environment to test the Niubiz Wallet integration before going live.
Updated 8 days ago
