Documentation
Build with JagPay
Accept crypto payments and send payouts with a small REST API. This guide covers everything from your first API key to signed payouts and webhooks.
How it works#
- Step 1Create a paymentYour server calls the API with the order and amount. You get back a payment with a hosted checkout link.
- Step 2Customer paysThe customer opens the link, picks a coin and network, and sends funds to a deposit address made for this payment only.
- Step 3JagPay confirmsWe watch the chain, wait for confirmations and credit your balance (minus the fee).
- Step 4You get notifiedA signed payment.paid webhook hits your server. Fulfil the order.
Payouts work the other way round: your server asks JagPay to send funds from your balance to any wallet, and we tell you by webhook once it's confirmed on-chain.
Quickstart#
- 1Sign in and create a project. Each project has its own balances, API keys and settings.
- 2Create an API key in Settings → API keys and store it as
JAGPAY_API_KEYon your server. How to create a key - 3Create your first payment and send your customer to its
payment_url:
curl -X POST https://www.jagpay.io/api/v1/payments \ -H "Authorization: Bearer $JAGPAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "order_id": "order_4821", "order_name": "Annual plan", "amount": "250.00", "currency": "USD", "accepted_currencies": ["BSC_USDT", "ETH_USDT", "TRON_USDT"], "fee_payer": "customer" }'Use a testnet code like BSC_TESTNET_USDT while you build: everything works the same with test coins. See Testing.
Base URL#
All endpoints live under one base URL and speak JSON over HTTPS:
https://www.jagpay.io/api/v1
Authentication & API keysCreate an API key · Authenticate requests · ResponsesPaymentsThe payment object · Statuses · Create a paymentPayoutsBefore you start · The payout object · Signing requestsWebhooksSetup · Events · Verify signaturesBalances & ledgerList balances · List ledger entries · Auto-settleTokens & networksCurrency codes · Amounts · NetworksTestingTestnets · Go-live checklist
