Create an invoice
create_invoiceCreate a USDT or USDC invoice and get its payment link to send the buyer. Set the price in USD or another currency, add a reference to avoid duplicates, and set an expiry.
Instructions
Creates a Stablevoy invoice the buyer pays in USDT or USDC and returns its payment link, checkoutUrl. Needs a store key (npx stablevoy-mcp login). Give the price as amountUsd, or as amount with currency when the merchant prices in another currency, for example "49.99" and "EUR". Such a price is turned into US dollars once, at creation, with the store's own rate or the ECB reference rate, and the invoice shows both in price. Send that link to the buyer yourself; Stablevoy does not email it. Give a reference (for example "acme-october") whenever you can: the same price and reference return the same invoice instead of a second one. returnUrl is an https page the buyer goes back to after paying. expiresInMinutes, 15 to 10080, is how long the buyer has; left out, the store default applies. After expiresAt the payment page tells the buyer not to pay, and money that still arrives is marked paid_late. To change the price of an unpaid invoice, cancel it with cancel_invoice first. Check the result later with get_invoice. Pass store when several stores are connected. A failure comes back as an error with its code and what to do, for example rate_limited with the seconds to wait.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store | No | Store id or exact store name from list_stores. Needed only when several stores are connected. | |
| amount | No | Price in currency as a decimal string, for example "49.99" for EUR or "1500" for JPY. Goes with currency, instead of amountUsd. | |
| currency | No | ISO 4217 code of amount, for example "EUR". 30 currencies are supported; another one gives currency_not_supported with the list. | |
| amountUsd | No | Price in US dollars as a decimal string, for example "250" or "19.99". Leave it out when you give amount and currency. | |
| reference | No | Your reference for this invoice, sent back in webhooks, 1 to 200 characters. | |
| returnUrl | No | https address the buyer returns to after paying. | |
| expiresInMinutes | No | How long the buyer has to pay, 15 to 10080 minutes; leave it out for the store default. Use a day or more for an invoice sent by email. |