PayPaga
  1. Pay In - PayURL Integration
PayPaga
  • Introduction
    • Introduction
    • API Reference
    • Errors
    • Standard Codes and Values
  • Authorization
    • Authorization
    • OAuth 2.0 Token Generation
  • Pay In - Direct API Integration
    • Pay In - Direct API Integration
    • Pay In - Payment Options
    • Pay In - Payment Processing
    • Pay In - Query Transactions
  • Pay In - PayURL Integration
    • Pay In - PayURL Integration
    • Pay In - Create PayURL
      POST
  • Pay Out - Direct API Integration
    • Pay Out - Direct API Integration
    • Pay Out - Query Transactions
    • Pay Out - Payment Processing
  • Pay Out - Examples
    • Pay Out - Brazil
    • Pay Out - Mexico
    • Pay Out - Argentina (V2)
    • Pay Out - Colombia (V2)
    • Pay Out - Ecuador (V2)
    • Pay Out - Guatemala (V2)
    • Pay Out - Peru (V2)
  • Transactions Status Notification
    • Transactions Status Notification
  • Query Balance
    • Query Balance
  • Appendix
    • Transaction Status Definitions and Lifecycle
  1. Pay In - PayURL Integration

Pay In - Create PayURL

Developing
Develop Env
https://merchant-api.stg.paypaga.com
Develop Env
https://merchant-api.stg.paypaga.com
POST
https://merchant-api.stg.paypaga.com
/payurl
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

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.

Customer Data#

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 parameterValueDescription
BRfirst_nameFirst name
BRlast_nameLast name
BRcpf_numberCPF - 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.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://merchant-api.stg.paypaga.com/payurl' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "merchant_id": "00aa0bb0-0000-0000-00cc-0000dd0eee00",
  "country_code": "MX",
  "currency": "MXN",
  "transaction_total": 10.26,
  "merchant_transaction_reference": "custom-reference-45678",
  "payment_method_codes": [
    "BNKTR"
  ],
  "payment_method_data": [
    {
      "payment_method_code": "BNKTR",
      "transaction_fields": [
        {
          "name": "first_name",
          "value": "Test"
        },
        {
          "name": "last_name",
          "value": "Person"
        },
        {
          "name": "cpf_number",
          "value": "12312312312"
        }
      ]
    }
  ]
}'
Response Response Example
200 - Success
{
  "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"
}

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠400Bad Request
Previous
Pay In - PayURL Integration
Next
Pay Out - Direct API Integration
Built with