Payment Link
With PagaSul, you can accept payments by sharing a link directly with your customer. No server-to-server API call is needed — the link is a URL with payment parameters in the query string. When the customer follows it, PagaSul renders the hosted checkout.
Here is a step-by-step description of the payment processing flow with the payment link.
How to integrate
1. Build the payment link
Construct a URL to https://checkout.pagasul.com/pay with your payment parameters as a query string. You can do this on the server or the client.
https://checkout.pagasul.com/pay
?client_id=123
&client_payment_id=order_42
&amount=150.00
¤cy=BRL
&payer.id=user_1234
&callback_url=https%3A%2F%2Fyour-site.com%2Fwebhook
&payment_options.return_url=https%3A%2F%2Fyour-site.com%2Fthank-you
client_payment_id must be unique per payment in your system — it is used for idempotency.
To preselect a payment method, include payment_method=BR.PIX (or another code). Without it, the customer chooses on the checkout page. See Payment Methods for available codes and any additional required fields per method.
Full parameter list
| Parameter | Type | Required | Description |
|---|---|---|---|
| client_id | integer | Yes | Your account identifier, provided upon integration |
| client_payment_id | string | Yes | Your payment ID, must be unique to the client_id used |
| payment_method | string | Optional | Preselected payment method code (see Supported payment methods section). If not passed, the customer will be presented with a form to select a method from those connected on your client_id |
| currency | string | Yes | Payment currency (see Supported payment methods section) |
| amount | decimal | Yes | Requested payment amount (for example: pass 12.34 for 12 dollars 34 cents amount) |
| payer.id | string | Yes | A unique identifier for a customer or customer account on your side. It is used to accumulate customer data and for anti-fraud protection |
| payer.is_trusted | boolean | Optional | If passed and "true" customer marked as trusted (for use please consult Pagasul representative) |
| payer.name | string | Optional | Customer name |
| payer.email | string | Optional | Customer email |
| payer.country | string | Optional | Customer country (alpha-2 code) |
| payer.state | string | Optional | Customer state |
| payer.city | string | Optional | Customer city |
| payer.address | string | Optional | Customer address |
| payer.phone | string | Optional | Customer phone |
| payer.language | string | Optional | Preferred language for customer |
| payer.cpf | string | Optional | Customer CPF (Cadastro de Pessoas Físicas) for Brazil payment methods. Can be passed in following formats: "231.002.999-00" or "23100299900" |
| payer.cuit | string | Optional | Customer CUIT (Unique Tax Identification Code) for Argentina payment methods. Can be passed in following formats: "30-69330706-2" or "30693307062" |
| payer.citizenship_card | string | Optional | Number of the Citizenship Card (Cédula de Ciudadanía) for Colombian/Ecuadorian payment methods |
| payer.nit | string | Optional | Unique Taxpayer Number (Número de Identificación Tributaria) for Colombian/Bolivian payment methods |
| payer.pas | string | Optional | Passport needed for Bolivian/Ecuadorian payment methods |
| payer.ce | string | Optional | Customer Identity card of Foreigners (Cédula de Extranjería) for Colombian payment methods |
| payer.ti | string | Optional | Customer identity document (Tarjeta de Identidad) for Colombian payment methods |
| payer.ci | string | Optional | Customer identity document (Cédula de Identidad) for Bolivia/Venezuela payment methods. For Venezuela it must start with letter V or E |
| payer.ruc | string | Optional | Ecuadorian taxpayer number (Registro Único de Contribuyente) |
| payer_account | object | Optional | Customer account data section |
| payer_account.bank_code | string | Optional | Payer bank code (Mandatoriness see in section Supported payment methods). One of bank code from list (see Bank Codes section) |
| payment_options.return_url | string | Optional | If passed, the customer will be returned to the specified URL after the payment is completed |
| payment_options.callback_url | string | Optional | If passed, the notification on payment status change will be sent to the specified URL |
Also the full parameter list see Create payment link in the API Reference.
2. Share the link
Send the link to your customer via email, SMS, or embed it as a button in your UI. When the customer follows it, PagaSul opens the checkout page.
3. Handle the callback
When the payment is completed, PagaSul sends a POST to your callback_url. Verify the signature in the header, then check the status field:
| Status | Meaning | Action |
|---|---|---|
success | Payment completed | Fulfil the order |
decline | Payment declined | Notify the customer |
failed | Processing error | Contact PagaSul support |
For all statuses and result codes, see Statuses & Codes. For the full callback structure, see Callbacks.
4. Return the customer
After checkout, PagaSul redirects the customer to payment_options.return_url. Use it to display a confirmation page. Do not use this redirect to determine payment outcome — use the callback for that.