The payment link object
{
"id": "0199ed2a-…",
"orderId": "0199ed29-…",
"token": "Vq3…",
"url": "https://pay.malla.business/Vq3…",
"status": "pending",
"amountCents": 4500,
"currency": "USD",
"expiresAt": "2026-10-13T15:04:05.000Z",
"createdAt": "2026-10-12T15:04:05.000Z",
"paidAt": null
}status is pending, paid, expired or cancelled. Links last 24 hours. When a link expires unpaid and the order has no other live link, the order is cancelled and its stock released.
POST/payment-links
Returns a payable link for a pending order: the existing one if it still has time left and the same amount, otherwise a new one. Answers 201 when it creates a link and 200 when it reuses one, so it's safe to call again.
curl -X POST "https://api.malla.fun/payment-links" \
-H "Authorization: Bearer $MALLA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "orderId": "ORDER_ID" }'const link = await malla.paymentLinks.create({ orderId })
await sendWhatsApp(customer.phone, `Paga aquí: ${link.url}`)| Error | |
|---|---|
404 not_found |
The order doesn't exist. |
409 order_not_pending |
Already paid or cancelled. |
409 nothing_to_pay |
The total is 0. |
403 payments_not_enabled |
Your business isn't verified or has no payout account yet. |
422 unsupported_amount |
The amount can't be charged in the order's currency. |
GET/payment-links
Lists an order's links, newest first.
| Query | |
|---|---|
orderId |
Required. |
const links = await malla.paymentLinks.list({ orderId })The HTTP response is { "data": [...] }; the SDK returns the array.
Related events: payment_link.created, payment_link.expired, order.paid.