Payments & customers
Payment links
Payment links let you charge your customers without a complex integration. Generate a link and share it.
POST
/v1/payment-links
Create payment link
Creates a new payment link.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
number | Yes | Amount in decimals (e.g. 100.00 = $100.00) |
currency |
string | Yes | ISO code (MXN, USD, COP, etc.) |
description |
string | No | Charge description |
customer_id |
string | No | ID of the customer to associate |
expires_at |
timestamp | No | Expiration date (ISO 8601) |
allow_partial |
boolean | No | Partial payments: the payer chooses how much to pay and the link stays open until the amount is covered. Ignores max_payments. |
min_partial_amount |
number | No | Minimum payment (the last one may be lower if that is what is left). |
success_url |
string | No | Redirect URL after a successful payment |
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' }
})
});
Response
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"
}
}
About the response
- The object is nested in
data;urlyobjectgo at the top level. idis a UUID, with no prefix.- The public link is built with
token, not withid:https://recaudo.app/pay/{token}. If the account has its own domain,urlalready comes with that domain. - Amounts are decimals as strings (
"500.00"= $500.00 MXN), never cents. - For the routes
/payment-links/:iduse theid(UUID), not the token.
Other endpoints
GET
/v1/payment-links
List payment links
GET
/v1/payment-links/:id
Get link
PATCH
/v1/payment-links/:id
Update link
POST
/v1/payment-links/:id/cancel
Cancel link
Was this page helpful?
Thanks for letting us know.