Invoices are the core payment primitive in Marlin. When you create an invoice, Marlin returns aDocumentation Index
Fetch the complete documentation index at: https://yanhgming.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
hostedCheckoutUrl your customer visits to pay and an unsignedTx you sign and submit to register the invoice on-chain. Supported stablecoins are USDC, PYUSD, and USDG.
POST /api/invoices
Create a new invoice for a customer. The customer is identified by their Solana wallet address and is automatically upserted — you do not need to create a customer record separately.Request body
The customer’s Solana wallet address (base58, 32–44 characters).
At least one line item. Maximum 50 per invoice.
Stablecoin to request payment in. One of
USDC, PYUSD, or USDG.Tax in basis points applied to the subtotal (0–10000). 100 bps = 1%.
Optional internal note attached to the invoice (max 500 characters).
ISO 8601 datetime string for the payment due date, e.g.
"2026-06-01T00:00:00Z".Customer email address. Marlin sends an invoice notification email to this address when the invoice is created.
Display name for the customer (max 100 characters).
Response — 201 Created
The created invoice object.
Base64-encoded unsigned Solana transaction. Sign this with your merchant wallet and submit it to register the invoice on-chain.
Convenience duplicate of
invoice.hostedCheckoutUrl.GET /api/invoices
List all invoices for your merchant account, ordered newest-first.Query parameters
Filter by invoice status. One of
Open, Paid, Cancelled, Expired.Free-text search across
onchainId, memo, customer label, and customer wallet address.Response — 200 OK
Returns an array of invoice objects. Each object has the same shape as theinvoice field in the create response, plus a nested customer object.
GET /api/invoices/:id
Retrieve a single invoice by its database ID.Path parameters
The invoice’s database UUID.
Response — 200 OK
Returns the invoice object, identical in shape to the create response, with an additionalhostedCheckoutUrl field.
POST /api/invoices/:id/void
Void an open invoice. You can only void invoices whose status isOpen. Once voided, the invoice status changes to Cancelled and the customer can no longer pay it.
Path parameters
The invoice’s database UUID.
Response — 200 OK
Returns the updated invoice object withstatus: "Cancelled".
Error cases
INVOICE_NOT_FOUND(404) — The invoice does not exist or does not belong to your account.INVOICE_NOT_OPEN(400) — The invoice is not inOpenstatus and cannot be voided.