| HTTP status | Error code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Failed to parse the request body |
| 400 | VALIDATION_ERROR | Request validation failed |
| 400 | CONFIGURATION_NOT_AVAILABLE | No configuration available for the requested parameters |
| 401 | UNAUTHORIZED | Missing or invalid authorization token |
| 409 | MERCHANT_REFERENCE_ALREADY_EXISTS | Merchant transaction reference already exists |
| 500 | INTERNAL_ERROR | Unexpected server error |
curl --location 'https://api.paypaga.com/v2/pay-urls' \
--header 'DisablePartnerMock;' \
--header 'Content-Type: application/json' \
--data-raw '{
"country": "BR",
"currency": "BRL",
"amount": 125.5,
"merchant_transaction_reference": "TRX-2026-0001",
"merchant_order_reference": "ORDER-2026-0001",
"merchant_customer_id": "customer@email.com",
"allowed_payment_methods": [
"pix",
"bank_transfer"
],
"predefined_fields": [
{
"payment_method": "pix",
"fields": {
"document_number": "12345678909"
}
}
],
"return_urls": {
"success_url": "https://merchant.com/payment-success",
"pending_url": "https://merchant.com/payment-pending",
"failure_url": "https://merchant.com/payment-failure"
}
}'{
"transaction_id": "20240806-2010-4086-8342-c28f4979f834",
"pay_url": "https://checkout.paypaga.com/pay/abc123",
"expires_at": "2024-08-06T22:10:41Z"
}