Introduction
PayPaga Integration alternatives are as follows:
Payment Widget Integration
Coming soon.
Direct API Integration
The Direct API integrations allows full control over the flow and interactions with the consumer.
API requests are secured with OAuth2.0 authorisation.
PayURL Integration
This provides a web funnel solution for pay-ins to be integrated as part of the merchants' checkout experience.
Authorization
undefined
Standard Codes and Values
Standards that define the possible values for common data types used in all APIs.
Country
ISO 3166-1 Alpha 2 is the standard used for country codes, see ISO 3166-1 Alpha-2 codes for further reference
Currency
ISO 4217 alphabetic code is the standard used for currency codes, see ISO 4217 for further reference
What made this section unhelpful for you?
Pay In - Direct API Integration
An advanced workflow designed for customised integrations where the merchant will manage the complete consumer experience leveraging a backend integration for the transaction processing. The workflow steps are listed below and illustrated in the sequence diagram.
- Prior to any transaction processing the Merchant must configure a Notification Method in the Developer's section of the Merchant Portal for the corresponding environment to enable transaction lifecycles notifications.
- Call OAuth2.0 Token Generation and retrieve OAuth2.0 token
- Using the OAuth2.0 token, the Merchant will interact with PayPaga API in two steps per transaction as follows:
- Call the Pay In Payment Options request to retrieve the current selection of orchestrated Payment Methods with corresponding data requirements
- Call the Pay In Payment Processing request with selected Payment Method, supplying any Payment Method specific data
- Action payment lifecycle notifications sent to the registered notification method.

Pay Out - Direct API Integration
Execute Pay Out transactions.

Pay In - PayURL Integration
The PayPaga PayURL is a customized checkout webpage to allow the selection of a payment method, entering any required information and submitting the payment.
The workflow steps are listed below:
- Call OAuth2.0 Token Generation and retrieve OAuth2.0 token.
- Using the OAuth2.0 token, call the Get PayURL endpoint to get a new PayPaga PayURL based on the parameters provided in the request.
- Redirect the user to the generated PayPaga PayURL.
- The PayPaga PayURL will present to the user a list of payment methods previously approved by the merchant for the specified country.
- Then, the user selects their preferred payment method, enters any required information and submits the payment.
- Upon successful submission, the payment result is displayed, including instructions for asynchronous payments. A new transaction with status of PENDING will be created in the system.
What made this section unhelpful for you?
PayURL Service
This service initiates the PayPaga PayURL flow where, if successful, returns a new PayURL to the user to be redirected to for payment completion.
Sandbox: https://merchant-api.stg.paypaga.com/payurl
Production: https://merchant-api.paypaga.com/payurl
Header Parameters
OAuth2.0 Bearer token returned from OAuth2.0 Token Generation API call
Body Parameters
Merchant identifier provided in the Developer's section of the merchant portal
ISO 3166-1 Alpha 2 Country code where the transaction is being processed
ISO 4217 alphabetic currency code of the transaction amount (e.g. MXN, BRL, etc.).
Total amount of the transaction, including fees and taxes, expressed as a decimal amount in the currency major and minor units
Merchant supplied unique transaction identifier for correlation
Response
Response Attributes
Unique PayPaga assigned transaction identifier to be used in the transaction lifecycle
The UTC time zone transaction date in the PayPaga system
Unique Merchant identifier supplied in the request
Unique identifier assigned to PayURL for the transaction
Response status description
API Version for support purposes
PayURL checkout webpage with the corresponding payurl_id as a query string parameter. The user must be redirected to this URL to complete the payment
Response Attributes
Unique PayPaga assigned transaction identifier to be used in the transaction lifecycle
Transaction processing timestamp (UTC time zone)
Numeric error code
100
108
110
116
152
153
500
Response status description
API Version for support purposes
Response Attributes
Unique PayPaga assigned transaction identifier to be used in the transaction lifecycle
The UTC time zone transaction date in the PayPaga system.
Numeric error code.
100
108
110
116
152
153
500
Groups all validation errors found in the request.
Show child attributes
Response status description
API Version for support purposes
What made this section unhelpful for you?
Response
{
"transaction_id": "20240902-2222-3333-cccc-555555aa55a5",
"transaction_date": "2024-09-02",
"merchant_id": "00aa0bb0-0000-0000-00cc-0000dd0eee00",
"payurl_id": "330004d4-a55a-4b44-cc55-d2dddd2ddd22",
"message": "PayURL Created successfully",
"version": "0.1",
"pay_url": "https://payurl.dev.paypaga.com/payment?payurl_id=330004d4-a55a-4b44-cc55-d2dddd2ddd22"
}
What made this section unhelpful for you?
PayURL with Custom Payment Method List
It is possible to narrow down the list of payment options the user can choose from, by using the parameter “payment_method_codes” as follows:
These are the possible scenarios:
- If the list contains an invalid method, an error will occur and no PayURL will be generated.
- If the list contains valid methods, the PayURL web page will show only those as payment options.
- If the list contains a single valid option and that option requires additional information to be entered by the user, the PayURL will show the correspondent fields to enter that information.
- If the list contains a single valid option and that option doesn’t require any additional information, the PayURL won´t display the payment options step. Instead, the payment request will be submitted automatically using the pre-selected payment option and the payment result will be displayed, including instructions for asynchronous payments.
- If customer data is required to continue with a specific payment method, it can also be pre-emptively provided in the request.
Header Parameters
OAuth2.0 Bearer token returned from OAuth2.0 Token Generation API call
Body Parameters
Merchant identifier provided in the Developer's section of the merchant portal
ISO 3166-1 Alpha 2 Country code where the transaction is being processed
ISO 4217 alphabetic currency code of the transaction amount (e.g. MXN, BRL, etc.)
Total amount of the transaction, including fees and taxes, expressed as a decimal amount in the currency major and minor units
Merchant supplied unique transaction identifier for correlation
List of preselected payment methods
["BNKTR"]
["BNKTR"]
["PWC"]
Show child attributes
What made this section unhelpful for you?
What made this section unhelpful for you?
PayURL with Customer Data in Request
(Compatible with Payment Method Preselection via single-item custom list)
This API enables known customer data to be supplied to streamline the customer experience and optimise conversion by minimising manual data entry.
Where all required customer data for a payment method is supplied and validated the customer will automatically receive instructions to complete the payment alleviating the need for any intermediate manual data entry steps.
Countries requiring the parameter | Value | Description |
BR | first_name | First name |
BR | last_name | Last name |
BR | cpf_number | CPF - Cadastro de Pessoas Físicas (11 digits unformatted) |
The API numerically validates the CPF before generating the URL. If incorrect, or invalid data is introduced, an error will be returned.
Header Parameters
OAuth2.0 Bearer token returned from OAuth2.0 Token Generation API call
Body Parameters
Merchant identifier provided in the Developer's section of the merchant portal
ISO 3166-1 Alpha 2 Country code where the transaction is being processed
ISO 4217 alphabetic currency code of the transaction amount (e.g. MXN, BRL, etc.)
Total amount of the transaction, including fees and taxes, expressed as a decimal amount in the currency major and minor units
Merchant supplied unique transaction identifier for correlation
Sets displayed payment method codes (see PayURL with Custom Payment Method List for more information)
Show child attributes
Array for pre-selecting and / or fulfilling payment method and customer information.
Show child attributes
Response
Response Attributes
The transaction Identifier provided by PayPaga.
The date the transaction has been generated.
The merchant ID that generated this PayURL
The unique identifier for this PayURL
The URL to redirect the user to, opening it leads to payment method selection or instructions depending on data provided
Response Attributes
The transaction Identifier provided by PayPaga
The date the transaction has been generated
Error code associated with the issue
Show child attributes
Error message in full
What made this section unhelpful for you?
Response
{
"transaction_id": "20250220-1532-43a5-a808-b7364a98e016",
"transaction_date": "2025-02-20",
"merchant_id": "00aa0bb0-0000-0000-00cc-0000dd0eee00",
"payurl_id": "729ffd5b-81e4-4808-ab2a-6dcd01c33df9",
"message": "PayURL Created successfully",
"version": "0.1",
"pay_url": "https://payurl.stg.paypaga.com/payment?payurl_id=729ffd5b-81e4-4808-ab2a-6dcd01c33df9"
}
What made this section unhelpful for you?
Redirect the user to the generated PayURL
The PayURL could be loaded directly in a new tab or browser window.
In case the PayURL is going to be loaded embedded into the merchant’s website using an <iframe>
use the following code:
<iframe allow="clipboard-write" src="[PASTE-YOUR-pay_url-HERE]"></iframe>
It is important to include the allow="clipboard-write"
attribute in the <iframe>
to allow the user to use the copy-to-clipboard functionality.
What made this section unhelpful for you?
Transactions Status Notification
The PayPaga platform provides Transaction Status Notifications that can be sent to a merchant defined API URL and/or to an email address list. Configuration of transaction status notifications is performed via the Developer's section of the Merchant Portal for each environment. The configuration uses a JSON format, the following is an example:
{ "notificationActivation": { "email": true, "api": false }, "apiEndpoint": "https://your-api-endpoint.com/your-webhook", "failedWebhookEmailList": [ "user1@example.com", "user2@example.com" ], "notificationEmailList": [ "user3@example.com", "user4@example.com" ]}
WARNING: The use of a port number in the apiEndpoint value is not allowed.
The payload of the API call and email is as follows:
{ "transaction_id": "XXXXX-XXXX-XXXX-XXXXX", "status": "Cmpleted", "merchant_id": "XXXXX-XXXX-XXXX-XXXXX", "transaction_type": "payin or payout", "merchant_transaction_reference": "XXXXXXXX-XXXX-XXX"}
RESPONSE:
Status code: 200
Body: Empty
Any other status code will be considered failed webhook request.
Request attempts:
Paypaga will attempt the notification request 3 times. If all attempts fail an email will be sent to the configured failedWebhookEmailList email list.
The first retry will occur after 30 seconds with backoff rate multiplier duplicating timeout for every attempt , for example:
- First attempt FAILED
- 30 seconds later second attempt FAILED
- 60 seconds later third attempt FAILED, send email with Payload to failedWebhookEmailList
In order to retrieve more details about the notified transaction use the applicable ‘Transaction Query’ API relevant to the transaction type.
Body Parameters
Unique PayPaga assigned transaction identifier
New status for the transaction
Approved
Declined
Error
Canceled
Merchant identifier provided in the Developer's section of the merchant portal
Transaction type
Payin
Payout
Merchant supplied unique transaction identifier for correlation
What made this section unhelpful for you?
What made this section unhelpful for you?
Query Balance
Real-time access to the financial balances of a merchant's account. This can be used for reporting and as a precursor to Pay Out Payment Processing to determine if there is sufficient balance.
Error codes for Query Balance
Error code | Description |
107 | The merchant balance does not exist |
500 | Unexpected error |
Header Parameters
OAuth2.0 Bearer token returned from OAuth2.0 Token Generation API call
Query Parameters
ISO 3166-1 Alpha 2 Country code where the transactions were processed. If not provided the balances of all the countries available to the merchant will be returned.
Payment method which processed the transactions. If not provided the balances of all the payment methods available to the merchant will be returned.
BNKTR
PWC
Path Parameters
Merchant identifier provided in the Developer's section of the merchant portal
Response
Response Attributes
Container for country balances
Show child attributes
Response Attributes
Transaction processing timestamp (UTC timezone)
Numeric error code. See code catalogue above.
Response status description
API Version for support purposes
Response Attributes
Transaction processing timestamp (UTC timezone)
Numeric error code. See code catalogue above.
Response status description
API Version for support purposes
What made this section unhelpful for you?
Base URL
Production:
https://merchant-api.paypaga.com
Sandbox:
https://merchant-api.stg.paypaga.com
Response
{
"country_collection": [
{
"country_code": "MX",
"payment_method_collection": [
{
"payment_method_code": "",
"balance_collection": [
{
"transaction_type": "Payin",
"currency": "MXN",
"amount": 234461.24
},
{
"transaction_type": "Payout",
"currency": "MXN",
"amount": 211015.116
}
]
},
{
"payment_method_code": "BNKTR",
"balance_collection": [
{
"transaction_type": "Payin",
"currency": "MXN",
"amount": 167761.96
},
{
"transaction_type": "Payout",
"currency": "MXN",
"amount": 150985.764
}
]
}
]
}
]
}
What made this section unhelpful for you?
Appendix
Transaction Status Definitions and Lifecycle
- "Initiated": Set when a transaction intent is initiated either when the Payment widget is loaded or the Payin Payment Options API is called..
- "Authorizing": Set when a transaction intent is submitted to a Payment Provider for processing when a Payment Processing API endpoint is called. The transaction remains in this state until the Payment Provider responds..
- "Pending": Set when a Payment Provider responds to the transaction processing request indicating successful receipt of the transaction.
- "Reject" (Final State): Set when a Payment Provider responds to the transaction processing request indicating unsuccessful receipt of the transaction.. Final state indicating a failed transaction.
- "Declined" (Final State): Set when a Payment Provider responds to the transaction processing request indicating processing was unsuccessful. Final state indicating a failed transaction.
- "Canceled" (Final State): Set when payment processing has been cancelled. Final state indicating a failed transaction.
- "Refund" (Not yet implemented): This status is reserved for future use for where a transaction is reversed.
- "Approved" (Final State): Set when a Payment Provider confirms the successful completion of the payment lifecycle. Final state indicating a successful transaction.
- "Error" (Final State): Set when an unexpected errors occurs during processing. Final state indicating a failed transaction.
- "Expired" (Final State): Set when a Pending transaction reach the time limit to be completed when an end user interaction is required. Final State indicating an incomplete transaction.