Sign inGet Started

Developers

Build on NoCustPay.

Run your whole NoCustPay account from code or an AI agent: payments, invoices, customers, wallets, branding, reports and billing.

API reference

The API follows REST conventions: requests and responses are JSON, errors use standard HTTP status codes and every request is authenticated with an API key. Amounts are strings to keep exact decimals.

  1. 1Create a checkout sessionYour server calls POST /v1/checkout/sessions with the amount and customer.
  2. 2Redirect to checkoutSend the customer to the session url. They pick a coin and network and pay from any wallet or exchange.
  3. 3Get notifiedWe watch the chain and POST a signed event to your webhook_url when the status changes.
  4. 4Verify and fulfilOn your success_url, call GET /v1/checkout/sessions/{session_id} and ship only when status is paid.

Authentication

Send an API key as a bearer token in the Authorization header of every request.

Create a key on the API Keys page

A key is shown once and can expire. A key with full access can do everything, and it gets new permissions automatically. A restricted key only has the permissions you pick:

payments:read
Read Payments
payments:write
Manage Payments
wallets:read
Read Wallets
wallets:write
Manage Wallets
customers:read
Read Customers
customers:write
Manage Customers
invoices:read
Read Invoices
invoices:write
Manage Invoices
branding:read
Read Branding
branding:write
Manage Branding
webhooks:read
Read Webhooks
webhooks:write
Manage Webhooks
reports:read
Read Reports
billing:read
Read Billing
billing:write
Manage Billing

Errors

Errors return a JSON body with a message. Validation errors also include errors, keyed by field.

401UnauthenticatedThe API key is missing, revoked or expired.
403ForbiddenThe key does not have the permission this endpoint needs.
404Not foundThe item does not exist or belongs to another account.
422Validation failedOne or more fields are invalid. See errors for details.
429Too many requestsYou hit the rate limit. Wait for Retry-After seconds.
5xxServer errorSomething went wrong on our side. Retry with backoff.

Rate limits

Each API key can make 120 requests per minute, with its own budget. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit you get 429 withRetry-After in seconds.

Pagination

Paginated list endpoints return 25 items per page, newest first, in data. When more items exist, next_cursor holds a cursor. Pass it back as the cursor query parameter to get the next page.next_cursor is null on the last page.

Partial updates

PATCH changes only the fields you send. A field you leave out keeps its value, and null clears a field that can be empty.

A list field that you send, such as invoice items or wallet assets, replaces the whole list. Send the complete list, not only the changes.

Checkout

Hosted checkout: create a session, send the customer to its url, then retrieve the session when they come back. A session is a payment, so the same webhooks fire.

Create a checkout session

POST/v1/checkout/sessions

Creates a checkout session and returns 201 Created with its url. Redirect your customer there to pay. Pass network, or network and coin, to skip those choices. Sending an external_id you already used returns that session instead of creating a duplicate, so retries are safe.

Requires the payments:write permission.

Request body

namestringRequired
The customer's name, up to 255 characters.
emailstringRequired
The customer's email address.
amountstringRequired
Amount in the chosen currency, with no more decimals than the currency uses. It is converted to USD at the latest rate, must be at least 0.10 USD, and the wallet fee is added on top.
currencystringRequired
ISO currency code, one of: USD, EUR, GBP, CAD, AUD, JPY, CNY, KRW, INR, BDT, PKR, LKR, NPR, IDR, MYR, SGD, THB, PHP, VND, AED, SAR, TRY, EGP, NGN, KES, GHS, ZAR, BRL, MXN, ARS, COP.
networkstring
Opens the checkout on this network, so the customer only chooses a coin. One of: ethereum, bsc, polygon, arbitrum, optimism, base, avalanche, tron or bitcoin. It must be a network your active wallets accept, and the customer cannot change it.
coinstring
Needs network. Opens the checkout straight on the payment step for this coin: usdt, usdc, btc or eth. It must be accepted on that network by your active wallets, and the customer cannot change it.
external_idstring
Your order ID, up to 100 characters. Makes the request idempotent.
descriptionstring
Up to 255 characters. Shown to the customer on the checkout page.
success_urlstring
Where the customer returns after paying. session_id is appended to the query string, unless the URL contains {CHECKOUT_SESSION_ID}: then the session ID goes there instead and nothing is appended, for example https://shop.example.com/thanks?order={CHECKOUT_SESSION_ID}.
cancel_urlstring
Where the customer returns after cancelling. Works like success_url, including the {CHECKOUT_SESSION_ID} placeholder.
webhook_urlstring
A public HTTPS URL that receives status changes for this payment.
metadataobject
Any key/value data you want stored with the payment. Returned when you fetch it and in webhooks.

Retrieve a checkout session

GET/v1/checkout/sessions/{id}

Fetches a session. Call it when the customer lands on your success_url and fulfil the order only when status is paid. status is pending while the customer can still pay, paid when the exact amount arrived, overpaid or underpaid when a different amount arrived, expired when time ran out, and cancelled once the session was expired or cancelled.

Requires the payments:read permission.

Path parameters

idstringRequired
The session ID, also sent as session_id on the success_url. An ID from another account returns 404.

Expire a checkout session

POST/v1/checkout/sessions/{id}/expire

Closes a pending session so the customer can no longer pay it, and its status becomes cancelled. Only a session that has not received a transfer can be expired; any other returns 422 on session.

Requires the payments:write permission.

Path parameters

idstringRequired
The session ID, also sent as session_id on the success_url. An ID from another account returns 404.

Payments

Manage the payments your checkout sessions created: list them, fetch one, and cancel, review or delete several at once.

Get a payment

GET/v1/payments/{id}

Fetches the current state of one payment. Call it when the customer lands on your success_url, and fulfil the order only when paid is true. Never trust the redirect alone.

Requires the payments:read permission.

Path parameters

idstringRequired
The payment ID, also sent as session_id on the success_url. An ID from another account returns 404.

List payments

GET/v1/payments

Lists your payments, newest first, 25 per page. Each item has the same fields as Get a payment. Pass next_cursor back as cursor to get the next page.

Requires the payments:read permission.

Query parameters

searchstring
Up to 255 characters. Matches a payment ID, transaction hash, wallet address, your external_id, or the start of the customer name or email.
status[]array
Only payments in these statuses: pending, paid, underpaid, overpaid, expired or cancelled. Repeat the parameter for several.
networkstring
Only payments on this network: ethereum, bsc, polygon, arbitrum, optimism, base, avalanche, tron or bitcoin.
coinstring
Only payments in this coin: usdt, usdc, btc or eth.
needs_reviewboolean
Send true (or 1) to list only payments that need your review. Send false (or 0) for no filter.
cursorstring
The next_cursor from the previous page.

Cancel payments

POST/v1/payments/cancel

Cancels payments that are still waiting for a transfer. The others are skipped. Returns how many were cancelled and skipped.

Requires the payments:write permission.

Request body

idsarrayRequired
Between 1 and 100 payment IDs. An ID from another account, or a payment this action does not apply to, is counted as skipped.

Review payments

POST/v1/payments/review

Resolves payments that need your review, such as one where the wrong amount arrived. Payments that are not waiting for a review are skipped. Returns how many were reviewed and skipped.

Requires the payments:write permission.

Request body

idsarrayRequired
Between 1 and 100 payment IDs. An ID from another account, or a payment this action does not apply to, is counted as skipped.
mark_paidbooleanRequired
true marks a payment as paid only when the amount received is at least the amount due and no more than 5% above it. The others are skipped. false only marks them as reviewed and keeps their status.

Delete payments

POST/v1/payments/delete

Permanently deletes cancelled or expired payments that never received a transfer, once they are no longer held. The others are skipped. Returns how many were deleted and skipped.

Requires the payments:write permission.

Request body

idsarrayRequired
Between 1 and 100 payment IDs. An ID from another account, or a payment this action does not apply to, is counted as skipped.

Invoices

Invoices are created as drafts. Publish one to make it payable at its public_url, and email it to the customer when you publish or later. Every response has the public_url, and pdf_url once the invoice is no longer a draft.

List invoices

GET/v1/invoices

Lists your invoices, newest first, 25 per page. Each item is a summary without items, customer or payments. Get one invoice for the full record. Pass next_cursor back as cursor to get the next page.

Requires the invoices:read permission.

Query parameters

searchstring
Up to 255 characters. Matches an invoice number such as INV-0042 or 42, or the start of the customer name, or of the email when it contains @.
status[]array
Only invoices in these statuses: draft, open, paid or void. Repeat the parameter for several.
overdueboolean
Send true (or 1) to list only open invoices past their due date. Send false (or 0) for no filter.
cursorstring
The next_cursor from the previous page.

Create an invoice

POST/v1/invoices

Creates a draft invoice for one of your customers and returns 201 Created with it. The total is worked out from the items. Drafts cannot be paid yet, so pdf_url is null until you publish.

Requires the invoices:write permission.

Request body

customer_idstringRequired
One of your customers. A customer from another account returns 404.
currencystringRequired
ISO currency code, one of: USD, EUR, GBP, CAD, AUD, JPY, CNY, KRW, INR, BDT, PKR, LKR, NPR, IDR, MYR, SGD, THB, PHP, VND, AED, SAR, TRY, EGP, NGN, KES, GHS, ZAR, BRL, MXN, ARS, COP.
due_onstring
Due date as YYYY-MM-DD, or null for no due date.
notesstring
Up to 2000 characters, or null. Shown to the customer.
itemsarrayRequired
Between 1 and 50 line items.
items[].descriptionstringRequired
Up to 255 characters.
items[].quantityintegerRequired
From 1 to 10000.
items[].unit_pricestringRequired
Price of one unit in the invoice currency, above 0 and up to 1000000000, with no more decimals than the currency uses.

Get an invoice

GET/v1/invoices/{id}

Fetches one invoice with its items, customer and payments, plus changeable and deletable, which say whether it can still be updated or deleted. Only this endpoint returns payments, changeable and deletable.

Requires the invoices:read permission.

Path parameters

idstringRequired
The invoice ID. An ID from another account returns 404.

Update an invoice

PATCH/v1/invoices/{id}

Changes a draft or open invoice that has no payment in progress. Every field is optional, a field you leave out keeps its value, and null clears due_on or notes. Sending items replaces the whole list. The merged invoice is checked as a whole, so changing currency alone re-checks the stored unit prices against it. Changing an open invoice cancels any checkout the customer started. A paid or void invoice, or one with a payment in progress, returns 422.

Requires the invoices:write permission.

Path parameters

idstringRequired
The invoice ID. An ID from another account returns 404.

Request body

customer_idstring
One of your customers. A customer from another account returns 404.
currencystring
ISO currency code, one of: USD, EUR, GBP, CAD, AUD, JPY, CNY, KRW, INR, BDT, PKR, LKR, NPR, IDR, MYR, SGD, THB, PHP, VND, AED, SAR, TRY, EGP, NGN, KES, GHS, ZAR, BRL, MXN, ARS, COP.
due_onstring
Due date as YYYY-MM-DD, or null for no due date.
notesstring
Up to 2000 characters, or null. Shown to the customer.
itemsarray
Between 1 and 50 line items. Replaces the whole list, and every item needs all three fields.
items[].descriptionstring
Up to 255 characters.
items[].quantityinteger
From 1 to 10000.
items[].unit_pricestring
Price of one unit in the invoice currency, above 0 and up to 1000000000, with no more decimals than the currency uses.

Publish an invoice

POST/v1/invoices/{id}/publish

Publishes a draft so the customer can pay it at public_url, and returns the open invoice. Only drafts can be published.

Requires the invoices:write permission.

Path parameters

idstringRequired
The invoice ID. An ID from another account returns 404.

Request body

send_emailbooleanRequired
true also emails the invoice to the customer. An invoice is emailed at most once, so you cannot send it again later.

Send an invoice

POST/v1/invoices/{id}/send

Emails an open invoice to its customer. Each invoice is emailed at most once, whether at publish or here, so sending again returns 422. sendable tells you whether it can still be sent.

Requires the invoices:write permission.

Path parameters

idstringRequired
The invoice ID. An ID from another account returns 404.

Void an invoice

POST/v1/invoices/{id}/void

Voids an open invoice that has no payment in progress, so it can no longer be paid, and cancels any checkout the customer started. Drafts are deleted instead.

Requires the invoices:write permission.

Path parameters

idstringRequired
The invoice ID. An ID from another account returns 404.

Delete an invoice

DELETE/v1/invoices/{id}

Deletes an invoice that has never had a payment and returns 204 No Content. Invoices with payments can only be voided.

Requires the invoices:write permission.

Path parameters

idstringRequired
The invoice ID. An ID from another account returns 404.

Customers

Customers are the people and companies you send invoices to. Add one before you create an invoice for them.

List customers

GET/v1/customers

Lists your customers, newest first, 25 per page, with the number of invoices issued to each. Pass next_cursor back as cursor to get the next page.

Requires the customers:read permission.

Query parameters

searchstring
Up to 255 characters. Matches the start of the name, or of the email when it contains @.
cursorstring
The next_cursor from the previous page.

Create a customer

POST/v1/customers

Adds a customer and returns 201 Created with it.

Requires the customers:write permission.

Request body

namestringRequired
Up to 255 characters.
emailstringRequired
A valid email address, up to 255 characters. Stored in lowercase.
phonestring
Up to 50 characters, or null.
addressstring
Up to 1000 characters, or null.

Get a customer

GET/v1/customers/{id}

Fetches one customer with the number of invoices issued to them.

Requires the customers:read permission.

Path parameters

idstringRequired
The customer ID. An ID from another account returns 404.

Update a customer

PATCH/v1/customers/{id}

Changes only the fields you send. Every field is optional, and null clears phone or address.

Requires the customers:write permission.

Path parameters

idstringRequired
The customer ID. An ID from another account returns 404.

Request body

namestring
Up to 255 characters.
emailstring
A valid email address, up to 255 characters. Stored in lowercase.
phonestring
Up to 50 characters, or null.
addressstring
Up to 1000 characters, or null.

Delete a customer

DELETE/v1/customers/{id}

Deletes a customer and returns 204 No Content. Their invoices stay, no longer linked to the customer.

Requires the customers:write permission.

Path parameters

idstringRequired
The customer ID. An ID from another account returns 404.

Wallets

Wallets are your own addresses that receive payments. Each one sets the assets it accepts and the fees added on top of every payment.

List wallets

GET/v1/wallets

Lists all your wallets, newest first, with their accepted assets and fees. This list is not paginated and has no next_cursor.

Requires the wallets:read permission.

Add a wallet

POST/v1/wallets

Adds a receiving wallet and returns 201 Created with it.

Requires the wallets:write permission.

Request body

familystringRequired
Chain family of the address: evm, tron or bitcoin.
addressstringRequired
A valid address for the family, up to 100 characters. Each address can be added once per family.
labelstring
Your own name for the wallet, up to 100 characters, or null.
activebooleanRequired
Only active wallets are offered at checkout.
fee_percentstringRequired
Percentage fee added to each payment, from 0 to 100 with up to 2 decimals.
fee_fixedstringRequired
Fixed USD fee added to each payment, from 0 to 10000 with up to 2 decimals.
underpayment_tolerancestringRequired
USD shortfall still accepted as paid, from 0 to 100 with up to 2 decimals.
assetsarrayRequired
At least one network:coin pair the wallet accepts, from the wallet's own chain family: ethereum:usdt, ethereum:usdc, ethereum:eth, bsc:usdt, bsc:usdc, polygon:usdt, polygon:usdc, arbitrum:usdt, arbitrum:usdc, optimism:usdt, optimism:usdc, base:usdc, avalanche:usdt, avalanche:usdc, tron:usdt, bitcoin:btc. Sending assets replaces the whole list.

Update a wallet

PATCH/v1/wallets/{id}

Changes only the settings you send. Every field is optional, and null clears the label. The family and address cannot change.

Requires the wallets:write permission.

Path parameters

idstringRequired
The wallet ID. An ID from another account returns 404.

Request body

labelstring
Your own name for the wallet, up to 100 characters, or null.
activeboolean
Only active wallets are offered at checkout.
fee_percentstring
Percentage fee added to each payment, from 0 to 100 with up to 2 decimals.
fee_fixedstring
Fixed USD fee added to each payment, from 0 to 10000 with up to 2 decimals.
underpayment_tolerancestring
USD shortfall still accepted as paid, from 0 to 100 with up to 2 decimals.
assetsarray
At least one network:coin pair the wallet accepts, from the wallet's own chain family: ethereum:usdt, ethereum:usdc, ethereum:eth, bsc:usdt, bsc:usdc, polygon:usdt, polygon:usdc, arbitrum:usdt, arbitrum:usdc, optimism:usdt, optimism:usdc, base:usdc, avalanche:usdt, avalanche:usdc, tron:usdt, bitcoin:btc. Sending assets replaces the whole list.

Remove a wallet

DELETE/v1/wallets/{id}

Removes a wallet and returns 204 No Content. While payments still wait for transfers to it you get 422. Set active to false now and remove it once they finish.

Requires the wallets:write permission.

Path parameters

idstringRequired
The wallet ID. An ID from another account returns 404.

Branding

Branding sets the name, colours, images and support contact your customers see at checkout, on invoices and in invoice emails.

Get the branding

GET/v1/branding

Fetches the branding. name is what customers see: custom_name when you set one, otherwise your account name. primary_foreground is the readable text colour on primary_color.

Requires the branding:read permission.

Update the branding

PATCH/v1/branding

Changes only the fields you send and returns the branding. Every field is optional, and null clears a text field. Upload images with the images endpoint. Here you can only remove them.

Requires the branding:write permission.

Request body

namestring
Display name, up to 60 characters.
primary_colorstring
Hex colour such as #4f46e5.
background_colorstring
Hex colour such as #f8fafc.
support_emailstring
A valid email address, up to 255 characters.
support_urlstring
An http or https URL, up to 255 characters.
remove_iconboolean
true deletes the current icon. Must be true or false, not null.
remove_logoboolean
true deletes the current logo. Must be true or false, not null.

Upload branding images

POST/v1/branding/images

Uploads the icon, the logo or both as multipart/form-data and returns the branding. An upload replaces the current image, and the text branding stays as it is.

Requires the branding:write permission.

Request body

iconfile
PNG, JPG or WebP, up to 1 MB and at least 64 × 64 pixels. Required when logo is not sent.
logofile
PNG, JPG or WebP, up to 2 MB and at least 32 pixels high. Required when icon is not sent.

Reports

Read revenue figures, the dashboard overview and search your account, the same data the dashboard shows.

Get a revenue report

GET/v1/reports

Revenue for a date range compared with the period just before it: volume, payment count, average, conversion and exception rate in basis points, fees, a time series and breakdowns by status, asset and network. Amounts are USD. A range that includes today can lag by a few minutes.

Requires the reports:read permission.

Query parameters

fromstring
First day as YYYY-MM-DD, not after today. Defaults to the 30 days ending on to. The range can span at most 731 days.
tostring
Last day as YYYY-MM-DD, on or after from and not after today. Defaults to today.
granularitystring
Series bucket size: day, week or month. Defaults to day up to 31 days, week up to 180 days, month beyond.

Get the dashboard summary

GET/v1/dashboard

The dashboard overview in one call: what needs your attention, whether a wallet and an API key are set up, the 8 latest payments and the revenue report for the period.

Requires the reports:read permission.

Query parameters

periodstring
Report period ending today: 7d, 30d or 90d. Defaults to 30d.

Search the account

GET/v1/search

Finds up to 5 payments and 5 wallets. Payments match by ID, order ID, customer name or email, wallet address or transaction hash, and wallets by address or label. Each result links to it in the dashboard.

Requires the payments:read permission.

Query parameters

qstringRequired
The search term, 2 to 255 characters.

Billing

NoCustPay charges its fee from a prepaid USD balance. Check the balance, read its history, set the low-balance email alert and start top-ups. Billing amounts are exact 6-decimal strings.

Get the balance

GET/v1/billing/balance

Returns the balance and the floor it may fall to, the fee rate in basis points, the billing status (healthy, low, on_credit or paused) and whether the account accepts new payments right now.

Requires the billing:read permission.

List billing activity

GET/v1/billing/transactions

Lists balance changes, newest first, 25 per page: top-ups, bonuses and the fee charged on each payment. Fees are negative amounts. Pass next_cursor back as cursor to get the next page.

Requires the billing:read permission.

Query parameters

activitystring
all (the default), top_ups for top-ups and bonuses, or fees for fees and fee adjustments.
cursorstring
The next_cursor from the previous page.

Update the low-balance alert

PATCH/v1/billing/alert

Sets when we email you about a low balance. Every field is optional and a field you leave out keeps its value. Returns the alert.

Requires the billing:write permission.

Request body

thresholdstring
Email when the balance drops below this many USD, from 0 to 100000 with up to 2 decimals.
enabledboolean
false stops the alert emails.

Start a top-up

POST/v1/billing/top-ups

Starts a top-up and returns 201 Created with a checkout_url. Open it and pay to add the funds. The balance grows once the payment arrives. You can make 10 top-up attempts a minute per account, failed ones included, then you get 429 with a Retry-After header (seconds until you may try again). The X-RateLimit-Limit and X-RateLimit-Remaining headers describe the general API budget, not the top-up limit. While adding funds is unavailable you get 422 with "Adding funds is not available yet."

Requires the billing:write permission.

Request body

amountstringRequired
USD to add, from 5.00 to 100000 with up to 2 decimals.

Webhook secret

Every webhook is signed with your account secret. Read or rotate it here. These endpoints are REST only, the MCP server never exposes the secret.

Get the webhook secret

GET/v1/webhooks

Returns the signing secret you verify X-Webhook-Signature with, and the events we send.

Requires the webhooks:read permission.

Rotate the webhook secret

POST/v1/webhooks/secret

Replaces the signing secret and returns the new one. Every webhook sent after this, retries included, is signed with the new secret, so switch your server to it right away.

Requires the webhooks:write permission.

Request format

When a payment's status changes we send a POST to its webhook_url with a JSON body: id (event ID),event, created_at and data, the full payment object.

Headers: X-Webhook-Event and X-Webhook-Signature. Respond with any 2xx within 10 seconds.

Verify signatures

Compute the HMAC-SHA256 of the raw request body with your webhook signing secret and compare it to X-Webhook-Signature in constant time. Reject the request if they differ. Find the secret on the Webhooks page or with GET /v1/webhooks.

Retries

If your endpoint fails, times out or its host does not resolve yet, we retry 3 times with growing delays. Every retry has the same event id, so store the ids you processed and ignore duplicates. Hosts that resolve to a private or internal address are never called.

  1. #1 +1m
  2. #2 +2m 9s
  3. #3 +3m 21s

Events

payment.paidThe exact amount arrived. Fulfil the order.
payment.underpaidLess than the amount arrived. The payment needs your review.
payment.overpaidMore than the amount arrived. The payment needs your review.
payment.expiredThe payment window closed without a transfer.
payment.cancelledYou cancelled the payment in the dashboard or the customer cancelled it at checkout.

Connect an AI agent

The MCP server lets AI agents run your whole account: payments, invoices, customers, wallets, branding, reports and billing. Chat apps and coding agents sign in here and you pick the permissions, just like an API key. Agents that can't sign in may send an API key as a Bearer token instead. Either way, the permissions decide which tools appear. Image uploads and the webhook secret stay REST-only.

Approve access in your browser. No key needed.

  1. Run the command. Add --scope user to use it in every project.
  2. In Claude Code, run /mcp, choose nocustpay and sign in.
Terminal
claude mcp add --transport http nocustpay https://mcp.nocustpay.com/mcp