Skip to main content

Create Payment Link

API data

API Gateway
This API is used for payment gateway operations:

caution

The generated payment link will be valid only until the expirationDate provided in the request. After that date, the link will be automatically disabled and can no longer be used for payments.

The Online Payments API also lets you create ready-to-use payment links with a predefined amount, providing a checkout page that can be used by the payer.

To create a payment link, send a POST request to /v1/paymentlink/new as shown below.

Webhook notifications

Automatic webhook

When a payment is made through a payment link, our platform can automatically send a notification to your application with the transaction data. This is an optional feature.

Learn more about Webhooks →

POST /v1/paymentlink/new

Via REST request with the following body:

Request
{ 
"description": "<string>",
"value": "<double>",
"qttyInstallments": "<integer>",
"qttyInstallmentsCustom": ["<integer>"],
"qttyInstallmentsIntFree": "<integer>",
"installmentsFee": "<double>",
"expirationDate": "<dateTime>",
"urlCallBack": "<string>"
}

Data dictionary - Parameters

PROPERTYDESCRIPTIONTYPELOCATIONREQUIREDVALIDATION
descriptionProduct/service descriptionStringBodyyesMax 250 characters
valueGross charge amountdecimalBodyyesMin 1.01 and max 999,999.99
qttyInstallmentsAllowed number of installments. Required if qttyInstallmentsCustom is not providedIntBodyconditional
qttyInstallmentsCustomArray of custom installment options. Required if qttyInstallments is not providedArray[Int]Bodyconditional
qttyInstallmentsIntFreeNumber of interest-free installmentsIntBodyyes1 to 12
installmentsFeeInterest rate applied to installments greater than qttyInstallmentsIntFree (e.g., 1.5 = 1.5%)doubleBodyyes0 to 100
expirationDateLink expiration dateDateBodyyesMust be greater than today
urlCallBackURL to receive webhook notifications when the payment is processedStringBodynoMax 500 characters
Payment link created successfully
{
"id": "3c228652-122e-4da6-b572-4aea64caad63",
"message": "Link de pagamento cadastrado com sucesso!",
"description": "MENSALIDADE JOÃO DA SILVA SAURO",
"value": 10.00,
"expirationDate": "2025-08-29",
"link": "https://faturas.sopague.com.br/link/3c228652-122e-4da6-b572-4aea64caad63"
}

Data dictionary - Response

PROPERTYDESCRIPTIONTYPE
idIdentifier of the created payment link.string
messageSuccess message.string
descriptionProduct/service description for the created link.string
valuePayment link amount.decimal
expirationDateLink expiration date.string
linkGenerated payment link URL.string

See also

Response codes

If a transaction fails, check the full response-code table to identify and properly handle errors:

Authorizer Host Response Codes →