Get started
Pagination & limits
How list endpoints page through results, how often you can call the API, and how to make a retry safe.
Pagination
List endpoints take page (starting at 1) and limit. The items are in data.data and the position in data.pagination. Keep following nextPage until it is null.
{
"success": true,
"message": "Invoices retrieved",
"data": {
"data": [{ "id": "…" }, { "id": "…" }],
"pagination": {
"total": 15,
"page": 1,
"limit": 2,
"totalPages": 8,
"nextPage": "https://api.vezmo.com/api/v1/merchant/invoice?page=2&limit=2",
"prevPage": null
}
},
"requestId": "…",
"timestamp": "…"
}async function listAll(path, accessToken) {
const items = [];
let url = `https://api.vezmo.com/api/v1/${path}?page=1&limit=100`;
while (url) {
const res = await fetch(url, { headers: { Authorization: `Bearer ${accessToken}` } });
const body = await res.json();
if (!body.success) throw new Error(body.message);
items.push(...body.data.data);
url = body.data.pagination.nextPage; // null on the last page
}
return items;
}
const invoices = await listAll("merchant/invoice", accessToken);The payments list (GET /merchant/payment) also returns nextCursor and hasMore. For long exports, pass the previous page's nextCursor as cursor instead of a page number: it stays correct while new payments arrive. Its limit is at most 100 (default 15), and total stops counting at 10,000; totalIsCapped is true when there are more.
Rate limits
Per API key
Every request made with an API key counts toward that key's limit, whatever the endpoint and wherever it comes from (all our servers share one count):
- Live keys: 100 requests a second, by default.
- Test keys: 25 requests a second, by default.
Over it, the API answers 429 with errors[0].code rate_limited and a Retry-After header (in seconds). Wait that long, then retry with backoff. Your checkout pages and the mobile SDKs don't use an API key, so they don't count toward it.
HTTP/1.1 429 Too Many Requests
Retry-After: 1
{
"success": false,
"message": "Too many requests with this API key. Retry after a second.",
"errors": [{ "code": "rate_limited", "message": "Too many requests with this API key. Retry after a second.", "limit": 100, "retryAfter": 1 }],
"data": null,
"requestId": "…",
"timestamp": "…"
}Per business, by plan
Your plan also sets how many API requests your business makes a minute, all your API keys together. Live and test keys count apart, each against the same number.
| Plan | API requests a minute |
|---|---|
| Free | 60 |
| Grow | 300 |
| Pro | 1,000 |
| Enterprise | By contract |
A minute is a calendar minute (UTC): the count starts again at the top of each minute. While this limit is in watch mode, requests past it still go through and are only logged. Once it is enforced, a request past it is answered 429 with errors[0].code PLAN_LIMIT (see Plan limits) and a Retry-After header: the seconds until the next minute. Wait that long, then go on. Plan & billing shows your number and your busiest minute today. The per-key limit above still applies.
HTTP/1.1 429 Too Many Requests
Retry-After: 23
{
"success": false,
"message": "You've reached 60 API requests a minute on Free. Upgrade to Grow for more.",
"errors": [{ "code": "PLAN_LIMIT", "message": "You've reached 60 API requests a minute on Free. Upgrade to Grow for more.", "limit": "api.requests_per_minute", "used": 60, "allowed": 60, "plan": { "key": "free", "name": "Free" }, "upgradeTo": { "key": "grow", "name": "Grow" }, "retryAfter": 23 }],
"data": null,
"requestId": "…",
"timestamp": "…"
}Per endpoint
Busy endpoints also have their own limits, counted per IP address and per endpoint. Every window must have room for a call to go through.
| Endpoint | Limit |
|---|---|
Create token POST /merchant/api-auth/login | 5 a minute |
Create a secure payment POST /merchant/secure-payments | 10 a second, 30 per 10 seconds, 60 a minute |
| Refund or cancel a payment | 5 a second, 20 per 10 seconds, 40 a minute |
| Other payments endpoints | 3 a second, 20 per 10 seconds, 60 a minute |
Subscriptions /merchant/subscription/… | 3 a second, 20 per 10 seconds, 60 a minute |
| Agreements: create, upload, send, remind, void, delete | 2 a second, 10 per 10 seconds, 30 a minute |
| Agreements: templates, list, get, audit, document | 3 a second, 20 per 10 seconds, 60 a minute |
| Mark accepted and Mark rejected proposal | 2 a second, 10 per 10 seconds, 30 a minute |
Public payer routes, reading: GET /paylinks/:code, GET /client-invoice/… | 10 a second, 40 per 10 seconds, 120 a minute |
Public payer routes, paying: /paylinks/:code/checkout, …/confirm, …/client; POST /invoice/:id/checkout, …/confirm | 5 a second, 15 per 10 seconds, 30 a minute |
Paying a card through our server: POST /paylinks/:code/pay, POST /invoice/:id/pay, POST /orders/pay | 3 per 10 seconds, 8 a minute |
Taking an invoice's payment with an API key: POST /merchant/invoice/:id/checkout, …/confirm | Your key's own limit (above), not per IP: your server calls them for all your customers |
POST /merchant/invoice/:id/pay (it reaches the card's bank) | 5 a second and 60 a minute per API key, then 429 rate_limited with Retry-After |
Over a limit, the API answers 429 Too Many Requests. Wait a few seconds and retry with backoff.
{
"success": false,
"message": "ThrottlerException: Too Many Requests",
"errors": [{ "code": "http.429", "message": "ThrottlerException: Too Many Requests" }],
"data": null,
"requestId": "…",
"timestamp": "…"
}An access token lasts 30 minutes. Keep it and reuse it for every call until it expires; don't create a token per request, or you will hit the 5-a-minute limit on Create token.
Declined cards (card testing)
Card testers try stolen card numbers on checkout pages to find the ones that work. Every card payment on Vezmo, on every checkout, shares the same limits on declined cards: secure payments (/pay, the mobile SDKs, Vezmo Elements), payment links, invoices, product checkouts, subscriptions (checkout and the customer's manage page), saved cards, a card checked with its bank before it is saved, and the hold code, on your own account or on Vezmo's (merchant of record). A successful payment never counts. The numbers below are the defaults; they are the same for every business (our team can change them for all businesses at once).
| Who | Limit (by default) |
|---|---|
| One customer on one checkout. A checkout one customer pays (an invoice, a payment link, a secure payment, a subscription or the invoice on its manage page) counts as a whole; a product checkout, which many customers use, counts each customer apart (by their IP address and email). | 5 declined cards an hour, 10 in 24 hours |
| One card, on any checkout | 3 declines in 24 hours, then that card is refused for 24 hours on every checkout |
| One IP address, on any checkout (an IPv6 address counts with the rest of its /64) | 10 declined cards an hour, 20 in 24 hours |
| Your business, when it is being tested | 20 or more declines in an hour that are also at least 30% of its card payments: for the next 24 hours (by default), 3D Secure is asked on every card payment a customer makes, and our team is told. Renewals, charges you make on a customer's saved card and payments on your own processor are not affected. |
A decline is the card's bank (or our fraud rules) saying no, or 3D Secure the customer failed. 3D Secure the customer failed or left counts for the checkout and the IP address, never toward the card's own limit. A network error, a payment still in progress, a returned bank payment and a pay-later provider's refusal are never declines. At a limit, /pay (and every way our server confirms a card: the checkout pages, saved cards, the hold code, paying the card on file on the manage page) answers 429 with errors[0].code too_many_declines before anything is charged, and errors[0].reason says which limit: checkout (this payment), card (this card) or network (the customer's network). Show the message to your customer as it is.
{
"success": false,
"message": "Too many cards were declined for this payment. Please try again later or use another payment method.",
"errors": [{ "code": "too_many_declines", "reason": "checkout", "message": "Too many cards were declined for this payment. Please try again later or use another payment method." }],
"data": null,
"requestId": "…",
"timestamp": "…"
}Our server confirms every card, on your own account and on Vezmo's (merchant of record): no customer's browser can try a card on a payment. A card being saved (a free trial, or a card checked with its bank before it is saved) is set up and confirmed by our server too; only when the bank asks for 3D Secure on it does the customer's browser get to finish that step, and then only the card our server set up is saved. A card being saved that its bank refuses is ended: the next try starts a new one. Pages from before /pay are checked when they open (a 429 at a limit) only while they still work.
When your server takes an invoice's payment with your API key, the IP address limit doesn't apply (the IP is your server's); the invoice and card limits do.
Test mode keeps its own counts: test cards never touch your live limits. In test mode the checkout and IP address limits still answer 429 (so you can see one), but no card is blocked and 3D Secure is never forced (test cards are shared by every developer).
Email limits
Emails we send to your clients and signers from Vezmo's own address are limited per business. Each business can send 500 of each kind in 24 hours. If you need more, contact support: we can raise the limit for your business. Over a limit the API answers 429, and the message says your limit.
Emails test mode skips (a test key's invoice or proposal to an address outside your team) don't count. A send that test mode skips entirely doesn't start the once-a-minute wait either.
| What | Limit |
|---|---|
| Send invoice and Send proposal | One email per invoice or proposal a minute. |
| Invoice and proposal emails | 500 in 24 hours per business, CC copies included, unless support has set a different number for your business. The email that Create or Update invoice sends on its own counts too, but never fails the save. So does the invoice that Mark accepted emails. |
| Agreement invitations and reminders | 500 per business in 24 hours, unless support has set a different number for your business. Dashboard sends count too. |
| Agreement reminders | Once a minute per agreement. |
Agreement limits
- Upload: a PDF of at most 10 MB and 100 pages, not password-protected or encrypted.
- Recipients: 1 to 20 per agreement.
- Fields: at most 200 per agreement.
- Signer email codes: 5 an hour per signer.
Idempotency
POST /merchant/secure-payments accepts an Idempotency-Key header (1–255 ASCII characters, for example your order number). A retry with the same key and body returns the same payment instead of a second one.
curl -X POST https://api.vezmo.com/api/v1/merchant/secure-payments \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1234" \
-d '{ "title": "Order #1234", "amount": 49.90, "currency": "USD" }'- Same key, same body: the same payment, with a fresh client token.
- Same key, different body:
422. Use a new key for a new order. - Same key after the payment was paid:
409. The order is paid; reconcile it instead of retrying.
Refunds (POST /merchant/payment/:id/refund) take an Idempotency-Key too: a retry with the same key and body returns the refund already made, so a timeout can't refund twice. The key is per payment.
Create a subscription (POST /merchant/subscription) takes an Idempotency-Key too: the same key with the same body returns the first call's response and never charges again; with a different body it returns 422. Keys are per business and per mode.
Other POST endpoints don't take a key. If one times out, read the object before you retry.