A crypto payment API that pays your own wallet
Add Bitcoin, USDT and USDC checkout to your app, store or platform with a few REST calls. Create an invoice, send the customer to the hosted payment page and get a signed webhook when the payment is confirmed. Start in the sandbox for free.
What you get
- Sandbox and live keys.
pch_test_keys for building,pch_live_keys for real payments. - Invoices. Create, get, list and cancel. Each one returns a
pay_urlfor the hosted payment page. - Signed webhooks. HMAC-SHA256 signatures, an event log and one-click resend.
- Safe retries.
Idempotency-Keysupport so a network retry never creates a duplicate invoice. - Subscriptions. Endpoints for recurring billing, with webhooks for every cycle.
- Tooling. An OpenAPI 3.1 spec, a Postman collection, and examples in Node.js, PHP and Python.
Test the whole flow in five minutes
- Sign up, open API Keys in your dashboard and generate a key with the environment set to Test.
- Create an invoice with
POST /api/v1/invoices. - Mark it paid with
POST /api/v1/invoices/{id}/simulate, or click through the sandbox payment page like a customer. - Receive the signed webhook and verify the signature on your server.
- Switch to a live key when you're ready to take real payments.
Invoice statuses you can rely on
Invoices move from awaiting_payment to payment_detected, confirming and paid. Partial payments show as underpaid, and unpaid invoices expire. Stablecoin payments are matched by their exact amount and confirmed on-chain, like Bitcoin. See USDT and USDC payments.
Questions merchants ask
Is there a sandbox?
Yes. Test keys start with pch_test_ and create test invoices whose payments you can simulate. Nothing is charged, emailed or watched on the blockchain, and you don't need a wallet to start.
Where do API payments go?
Straight to your own wallet. Jamesinvoicing is non-custodial and never holds the funds.
Which coins can customers pay with?
The hosted payment page offers Bitcoin plus the other coins you accept in your settings, including USDT and USDC on the networks you have switched on.
How do I know an invoice was paid?
Your server receives a webhook signed with HMAC-SHA256 in the X-JamesInvoicing-Signature header. You can also fetch the invoice, check the event log and resend any event.
Are retries safe?
Yes. Send an Idempotency-Key header or reuse your order_id and a repeated request returns the original invoice instead of creating a second one.
What are the rate limits?
About 2 requests per second sustained from one IP address, with bursts up to 120, and 5 requests per second per key.
Can I create subscriptions through the API?
Yes. The subscriptions endpoints create, update, pause, resume and cancel recurring billing, and each cycle invoice is a normal API invoice.