Skip to main content
POST
/
charge
/
payment-link
Criar link de pagamento
curl --request POST \
  --url https://api.clickpay.app.br/charge/payment-link \
  --header 'Content-Type: application/json' \
  --data '
{
  "total": 100000,
  "customerId": "customer_123456",
  "customer": {
    "taxId": "12345678901",
    "name": "João Silva",
    "email": "[email protected]",
    "phone": "11999999999",
    "postalCode": "01234000",
    "address": "Rua ABC",
    "district": "Centro",
    "number": "123",
    "line1": "Apto 101"
  },
  "successUrl": "https://example.com/success",
  "failedUrl": "https://example.com/failed",
  "needShipping": false,
  "notifyCustomer": true,
  "devMode": false,
  "externalId": "ext_123456",
  "items": [
    {
      "productId": "prod_123456",
      "quantity": 2
    }
  ]
}
'
{
  "status": 123,
  "message": "<string>",
  "data": {
    "id": "charge_123456",
    "url": "https://pay.clickpay.app.br/c/charge_123456",
    "devMode": false,
    "total": 100000,
    "externalId": "woovi_123456"
  }
}

Headers

Idempotency-Key
string

Unique key for idempotent requests (UUID v4 recommended, max 255 chars). If provided, duplicate requests within 24h will return the cached response.

X-API-KEY
string

API Key for authentication (alternative to Bearer token)

Body

application/json
total
number

Valor total em centavos. Mínimo: R$ 5,00 (500 centavos). Se não informado, será calculado a partir dos produtos

Example:

100000

customerId
string

ID do cliente existente

Example:

"customer_123456"

customer
object

Dados do cliente para criar nova conta

successUrl
string

URL de redirecionamento em caso de sucesso

Example:

"https://example.com/success"

failedUrl
string

URL de redirecionamento em caso de falha

Example:

"https://example.com/failed"

needShipping
boolean

Se precisa de envio

Example:

false

notifyCustomer
boolean

Se deve notificar o cliente

Example:

true

devMode
boolean

Se está em modo desenvolvimento

Example:

false

externalId
string

ID externo para rastreamento da charge

Example:

"ext_123456"

items
object[]

Itens da cobrança (opcional)

Response

Link de pagamento já existe (resposta cacheada via idempotência)