Merchant API — Overview
The Merchant API lets your backend server interact with DPT programmatically using an API key instead of a user session. Use it to automate payments, manage customers, run payroll, and issue cards to your users.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://api.dpt.xyz |
| Test | https://api-test.dpt.xyz |
Use the test environment for development and integration testing — it runs against a sandbox with no real funds. Switch to production when you're ready to go live.
Authentication
Every request must include your API key in the Authorization header:
Authorization: Bearer dptb_your_api_key_hereAPI keys are scoped to a single business. You do not need to pass a business ID in the URL — it is derived from the key itself.
Getting an API Key
- Go to Dashboard → API Keys
- Click Create API Key, give it a name
- Copy the key immediately — it is shown once only
Keys are prefixed with dptb_. Store them securely (environment variables, secret managers). Never commit keys to source control.
Revoking a Key
From the dashboard, navigate to API Keys and click the revoke button next to any key. Revocation takes effect immediately.
Request Format
- All request bodies must be JSON
- Set
Content-Type: application/jsonon requests with a body
POST /v1/checkouts HTTP/1.1
Authorization: Bearer dptb_...
Content-Type: application/json
{ "title": "Order #1234", "amount": 10000, "currency": "USDC" }Response Format
All responses are JSON. Successful responses return the created or fetched resource directly. Errors return:
{
"error": "Human-readable error message"
}HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success with body |
204 | Success, no body (DELETE, some POST) |
400 | Bad request — check your parameters |
401 | Missing or invalid API key |
403 | API key does not have access to the resource |
404 | Resource not found |
422 | Validation error |
500 | Server error |
Amounts and Currencies
All monetary amounts are in the smallest unit of the currency:
- USDC / USDT: amounts are in micro-units (1 USDC = 1,000,000)
- USD (fiat): amounts are in cents (1 USD = 100)
Currency codes follow ISO 4217 for fiat and ticker symbols for crypto (e.g. USDC, USDT, ETH).
Rate Limits
- 1000 requests per minute per API key
- 10 concurrent requests per API key
Exceeding limits returns 429 Too Many Requests.
Available Resource Groups
| Doc | Resources |
|---|---|
| Checkouts | Payment links, refunds |
| Invoices | Invoice creation and lifecycle |
| Customers | Customer records |
| Payroll | Payroll runs and disbursements |
| Cardholders | Managed users and card issuance |
| Webhooks | Event delivery and security |
