Skip to main content
POST
/
api
/
v1
/
payment-links
Criar link de pagamento
curl --request POST \
  --url https://upay-sistema-api.onrender.com/api/v1/payment-links \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "amountCents": 2,
  "currency": "BRL",
  "expiresAt": "2023-11-07T05:31:56Z",
  "redirectUrl": "<string>",
  "productDescription": "<string>",
  "settings": {
    "pixEnabled": true,
    "boletoEnabled": true,
    "creditCardEnabled": true,
    "maxInstallments": 6,
    "interestFreeInstallments": 1,
    "interestRate": 123,
    "requirePhone": true,
    "requireAddress": true
  },
  "products": [
    {
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 2
    }
  ],
  "stockQuantity": 1,
  "stockEnabled": true,
  "metaPixelCode": "<string>",
  "status": "ACTIVE"
}
'
{
  "message": "<string>",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "slug": "<string>",
    "title": "<string>",
    "description": "<string>",
    "amount": 123,
    "currency": "BRL",
    "status": "ACTIVE",
    "expiresAt": "2023-11-07T05:31:56Z",
    "redirectUrl": "<string>",
    "settings": {},
    "salesCount": 0,
    "timesUsed": 0,
    "metaPixelCode": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

Chave de API obtida através do endpoint /api/credentials. Também aceita formato Bearer Token: Authorization: Bearer <api_key>

Body

application/json

É necessário fornecer pelo menos amountCents OU products (ou ambos)

title
string
required
Required string length: 1 - 255
description
string | null
Maximum string length: 1000
amountCents
integer

Valor fixo em centavos (opcional se products for fornecido)

Required range: x >= 1
currency
string
default:BRL
expiresAt
string<date-time> | null
redirectUrl
string<uri> | null
productDescription
string | null
Maximum string length: 1000
settings
object
products
object[]

Lista de produtos associados ao link (opcional se amountCents for fornecido)

stockQuantity
integer | null
Required range: x >= 0
stockEnabled
boolean
metaPixelCode
string | null

Código do Meta Pixel para rastreamento

status
enum<string>
default:ACTIVE
Available options:
ACTIVE,
INACTIVE

Response

Link de pagamento criado com sucesso

message
string
data
object