Reseller
The reseller feature lets a merchant (the reseller) create checkouts, invoices, and customers on behalf of other merchants using its own API key. When the payment is collected, the proceeds are split: the target merchant receives amount − reseller_fee − platform_fee, the reseller earns reseller_fee, and DPT retains platform_fee.
This is useful for platforms, marketplaces, and aggregators that process payments for sub-merchants.
How It Works
- Reseller creates a connection to the target merchant via
POST /v1/reseller/connections, setting their commissionrateand optionalmin_fee/max_fee - The connection is immediately active — no approval needed from the target merchant
- Reseller creates checkouts/invoices/customers by passing
merchant_idin the request — DPT verifies the active connection - When payment arrives, DPT splits the funds:
gross = amount × rate / 10000, clamped to[min_fee, max_fee]if setplatform_fee = amount × platform_rate / 10000→ DPT's direct cut of the transactionreseller_fee = gross − platform_fee→ what the reseller actually receivesmerchant_net = amount − gross→ credited to the target merchant
- A
checkout.completedwebhook is sent to the target merchant's registered endpoint, includingreseller_fee,platform_fee, andreseller_id - The target merchant can revoke the connection at any time via dashboard or API — the reseller immediately loses access
Commission Rate
The commission rate is expressed in basis points (bps), where 10000 bps = 100%.
rate | Commission |
|---|---|
0 | 0% (no fee) |
100 | 1% |
200 | 2% |
500 | 5% |
10000 | 100% |
The rate is set on the connection and applies to all checkouts created through it. You can update it at any time via PUT /v1/reseller/connections/{id}. There is no per-checkout rate override.
Fee Caps (optional)
Set min_fee and/or max_fee (in 6dp units, same as all other amounts in the API) to cap the commission:
min_fee— fee is at least this amount (floor). e.g. always charge at least $1.00 =1000000max_fee— fee is at most this amount (ceiling). e.g. never charge more than $50.00 =50000000
When both are set: fee = clamp(amount × rate / 10000, min_fee, max_fee)
Connection Lifecycle
reseller merchant
| |
|-- POST /v1/reseller/connections --> | (status: active)
| |
|-- PUT /v1/reseller/connections/{id}->| (update rate / fee caps)
| |
|-- POST /v1/checkouts (merchant_id) ->| ✓ active connection required
| |
|-- DELETE /v1/reseller/connections/{id} (reseller removes)
| |
| DELETE ...reseller-connections/{id} --| (merchant revokes → status: revoked)Connection Object
{
"id": "uuid",
"reseller_id": "uuid",
"merchant_id": "uuid",
"status": "active | revoked",
"rate": 200,
"min_fee": null,
"max_fee": 50000000,
"created_at": "2026-03-26T10:00:00Z",
"updated_at": "2026-03-26T10:00:00Z"
}Reseller: Create or Update a Connection
POST /v1/reseller/connections| Field | Type | Required | Description |
|---|---|---|---|
merchant_id | uuid | ✓ | UUID of the merchant you want to resell for |
rate | integer | ✓ | Commission in basis points (0–10000) |
min_fee | integer | — | Minimum fee per transaction in 6dp (e.g. 1000000 = $1.00). Omit for no floor. |
max_fee | integer | — | Maximum fee per transaction in 6dp (e.g. 50000000 = $50.00). Omit for no ceiling. |
Idempotent — if a connection to the same merchant already exists, it is updated with the new values and reactivated.
curl -X POST https://api-test.dpt.xyz/v1/reseller/connections \
-H "Authorization: Bearer dptb_..." \
-H "Content-Type: application/json" \
-d '{
"merchant_id": "TARGET_MERCHANT_UUID",
"rate": 200,
"min_fee": 1000000,
"max_fee": 50000000
}'Reseller: Update a Connection
PUT /v1/reseller/connections/{connection_id}Update the commission rate and/or fee caps on an existing connection by ID. Only the reseller can call this endpoint.
| Field | Type | Required | Description |
|---|---|---|---|
rate | integer | ✓ | New commission rate in basis points (0–10000) |
min_fee | integer | — | New minimum fee per transaction in 6dp. Pass null to remove the floor. |
max_fee | integer | — | New maximum fee per transaction in 6dp. Pass null to remove the ceiling. |
The update takes effect immediately — the new rate applies to all checkouts created after the call. In-flight checkouts are unaffected.
curl -X PUT https://api-test.dpt.xyz/v1/reseller/connections/CONN_ID \
-H "Authorization: Bearer dptb_..." \
-H "Content-Type: application/json" \
-d '{
"rate": 300,
"min_fee": 1000000,
"max_fee": null
}'Returns the updated connection object.
Reseller: List Outgoing Connections
GET /v1/reseller/connectionsReturns all outgoing connections for the authenticated reseller (all statuses).
Reseller: Delete a Connection
DELETE /v1/reseller/connections/{connection_id}Permanently removes the connection. The reseller can no longer create checkouts for that merchant.
curl -X DELETE https://api-test.dpt.xyz/v1/reseller/connections/CONN_ID \
-H "Authorization: Bearer dptb_..."Merchant: List Incoming Connections
GET /v1/merchants/{id}/reseller-connections/incomingReturns all connections where this merchant is the target. Includes both active and revoked connections.
curl https://api-test.dpt.xyz/v1/merchants/YOUR_ID/reseller-connections/incoming \
-H "Authorization: Bearer dptb_..."Also available in the dashboard at Settings → Resellers.
Merchant: Revoke a Connection
DELETE /v1/merchants/{id}/reseller-connections/{connection_id}Sets status to revoked. The reseller immediately loses the ability to create checkouts for your account. The record is retained for audit purposes.
curl -X DELETE https://api-test.dpt.xyz/v1/merchants/YOUR_ID/reseller-connections/CONN_ID \
-H "Authorization: Bearer dptb_..."Note: Both the reseller (
DELETE /v1/reseller/connections/{id}) and the merchant (DELETE /v1/merchants/{id}/reseller-connections/{id}) can remove a connection. The reseller's delete permanently removes the record; the merchant's delete sets it torevokedfor audit purposes.
Creating a Checkout as a Reseller
Add merchant_id (target merchant) to the standard Create Checkout request. The commission rate is taken from the connection.
curl -X POST https://api-test.dpt.xyz/v1/checkouts \
-H "Authorization: Bearer dptb_YOUR_RESELLER_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_id": "TARGET_MERCHANT_UUID",
"title": "Order #5678",
"amount": 50000000,
"currency": "USDC"
}'The checkout is created under the target merchant. The reseller earns their connection rate when this checkout is paid.
Creating an Invoice as a Reseller
Add merchant_id to the standard Create Invoice request.
curl -X POST https://api-test.dpt.xyz/v1/invoices \
-H "Authorization: Bearer dptb_YOUR_RESELLER_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_id": "TARGET_MERCHANT_UUID",
"customer_email": "[email protected]",
"customer_name": "Acme Corp",
"currency": "USDC",
"line_items": [
{ "description": "Consulting — March", "quantity": 1, "unit_price": 200000000 }
]
}'Creating a Customer as a Reseller
Add merchant_id to the standard Create Customer request. The customer record is created under the target merchant.
curl -X POST https://api-test.dpt.xyz/v1/customers \
-H "Authorization: Bearer dptb_YOUR_RESELLER_KEY" \
-H "Content-Type: application/json" \
-d '{
"merchant_id": "TARGET_MERCHANT_UUID",
"name": "Alice Smith",
"email": "[email protected]"
}'Provision a Merchant (Reseller)
POST /v1/reseller/provisionCreate a DPT user account, a merchant, and a reseller connection in a single call. Use this when your platform is onboarding a new sub-merchant and you want to handle the entire signup flow server-side without requiring the end user to go through the standard registration.
Production only. User accounts are shared across test and production — there is no separate test registry. Calling this endpoint creates a real Firebase account and a real DPT user. Always use
https://api.dpt.xyzfor this endpoint;api-test.dpt.xyzis not supported.
KYB required. The reseller merchant calling this endpoint must have a
kyb_statusofapproved. Calls from merchants that have not completed KYB verification will be rejected with403.
Request body
User fields
| Field | Type | Required | Description |
|---|---|---|---|
email | string | ✓ | Email address for the new user account |
password | string | ✓ | Initial password (min 6 characters) |
full_name | string | — | User's display name |
Merchant fields
| Field | Type | Required | Description |
|---|---|---|---|
merchant_name | string | ✓ | Public-facing merchant / brand name |
legal_name | string | ✓ | Legal entity name |
country | string | ✓ | ISO 3166-1 alpha-2 country code (e.g. "US") |
btype | string | — | "company" (default) or "individual" |
website | string | — | Merchant website URL |
Reseller connection fields
| Field | Type | Required | Description |
|---|---|---|---|
rate | integer | ✓ | Commission in basis points (0–10000). See Commission Rate |
min_fee | integer | — | Minimum fee per transaction in 6dp. Omit for no floor |
max_fee | integer | — | Maximum fee per transaction in 6dp. Omit for no ceiling |
Response
{
"user_id": "uuid",
"merchant": {
"id": "uuid",
"name": "Acme Corp",
"legal_name": "Acme Corporation Ltd",
"country": "US",
"btype": "company",
"kyb_status": "draft",
"created_at": "2026-04-28T10:00:00Z"
},
"connection_id": "uuid"
}| Field | Description |
|---|---|
user_id | UUID of the newly created DPT user |
merchant | Full merchant object for the newly created merchant |
connection_id | UUID of the reseller connection (active immediately) |
Example
curl -X POST https://api.dpt.xyz/v1/reseller/provision \
-H "Authorization: Bearer dptb_YOUR_RESELLER_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "s3cr3tPass",
"full_name": "Alice Smith",
"merchant_name": "Acme Corp",
"legal_name": "Acme Corporation Ltd",
"country": "US",
"btype": "company",
"rate": 200,
"min_fee": 1000000,
"max_fee": 50000000
}'Error cases
| HTTP | Reason |
|---|---|
400 | Missing required fields, invalid country code, password too short |
409 | Email already registered |
403 | Reseller KYB not approved |
Finding Your Merchant ID
Your merchant ID is available in:
- Dashboard → Overview — shown in the top-right of the page header (click to copy)
- Dashboard → Settings → General — shown in the General section (click to copy)
Webhook Fields
When a reseller checkout is settled, the checkout.completed webhook includes additional fields:
| Field | Description |
|---|---|
reseller_fee | Amount credited to the reseller (gross − platform_fee) |
platform_fee | DPT's direct cut (amount × platform_rate / 10000). 0 if platform rate is not set |
reseller_id | UUID of the reseller merchant |
Merchant net = amount − gross (= amount − reseller_fee − platform_fee).
See Webhooks — checkout.completed for the full payload example.
