Pagamentos e clientes
Links de pagamento
Os links de pagamento permitem cobrar seus clientes sem uma integração complexa. Gere um link e compartilhe.
POST
/v1/payment-links
Criar link de pagamento
Cria um novo link de pagamento.
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
amount |
number | Sim | Valor em decimais (ex.: 100.00 = $100.00) |
currency |
string | Sim | Código ISO (MXN, USD, COP etc.) |
description |
string | Não | Descrição da cobrança |
customer_id |
string | Não | ID do cliente a associar |
expires_at |
timestamp | Não | Data de expiração (ISO 8601) |
allow_partial |
boolean | Não | Pagamentos parciais: o pagador escolhe quanto pagar e o link continua aberto até completar o valor. Ignora max_payments. |
min_partial_amount |
number | Não | Pagamento mínimo (o último pode ser menor se for o que falta). |
success_url |
string | Não | URL de redirecionamento após pagamento bem-sucedido |
curl -X POST https://recaudo.app/api/v1/payment-links \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 500.00,
"currency": "MXN",
"description": "Pago de servicio mensual",
"customer_id": "8e250c25-9d84-4892-98ec-d71fc1fcd3c7",
"success_url": "https://tuapp.com/pago-exitoso",
"metadata": {
"order_id": "ORD-123"
}
}'
$response = $client->post('/api/v1/payment-links', [
'json' => [
'amount' => 500.00,
'currency' => 'MXN',
'description' => 'Pago de servicio mensual',
'customer_id' => '8e250c25-9d84-4892-98ec-d71fc1fcd3c7',
'success_url' => 'https://tuapp.com/pago-exitoso',
'metadata' => [
'order_id' => 'ORD-123'
]
]
]);
const paymentLink = await fetch('/api/v1/payment-links', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
amount: 500.00,
currency: 'MXN',
description: 'Pago de servicio mensual',
customer_id: '8e250c25-9d84-4892-98ec-d71fc1fcd3c7',
success_url: 'https://tuapp.com/pago-exitoso',
metadata: { order_id: 'ORD-123' }
})
});
Resposta
201
{
"object": "payment_link",
"url": "https://recaudo.app/pay/27gQ0PYtfPaT6BjuqY6cOn1dnbe8jAgT",
"data": {
"id": "177d4e1f-4727-4044-b0f6-86a06b94c132",
"token": "27gQ0PYtfPaT6BjuqY6cOn1dnbe8jAgT",
"tenant_id": "38d88a68-46d6-4e0f-b323-e4385b036901",
"customer_id": "9c2f1a80-3d5e-4b71-8a2c-0f6e5d4c3b2a",
"invoice_id": null,
"type": "one_time",
"status": "pending",
"title": "Pago de servicio mensual",
"description": null,
"amount": "500.00",
"amount_paid": "0.00",
"currency": "MXN",
"allow_partial": false,
"min_partial_amount": null,
"reference": null,
"expires_at": null,
"paid_at": null,
"max_attempts": 3,
"view_count": 0,
"metadata": {
"order_id": "ORD-123"
},
"created_at": "2026-08-09T10:30:00.000000Z",
"updated_at": "2026-08-09T10:30:00.000000Z"
}
}
Sobre a resposta
- O objeto vem aninhado em
data;urlyobjectficam no nível superior. idé um UUID, sem prefixo.- O link público é montado com
token, não comid:https://recaudo.app/pay/{token}. Se a conta tiver domínio próprio,urljá vem com esse domínio. - Os valores são decimais em string (
"500.00"= $500.00 MXN), nunca centavos. - Para as rotas
/payment-links/:iduse oid(UUID), não o token.
Outros endpoints
GET
/v1/payment-links
Listar links de pagamento
GET
/v1/payment-links/:id
Obter link
PATCH
/v1/payment-links/:id
Atualizar link
POST
/v1/payment-links/:id/cancel
Cancelar link
Esta página ajudou?
Obrigado por avisar.