Skip to content
Dashboard

Quickstart (10 steps)

This guide walks you through every stage of integrating with the DanDanPay Reseller API (/v1): from issuing an access key to confirming delivery of your first order.


  1. Log in to the management dashboard at dash.dandanpay.net and create an API key for your storefront. Pass this key with all HTTP requests in the header Authorization: Bearer <API_KEY>.

  2. Check workspace account balances: GET /v1/accounts

    Section titled “Check workspace account balances: GET /v1/accounts”

    Ensure your USD account has sufficient available funds:

    Terminal window
    curl -X GET "https://api.dandanpay.net/v1/accounts" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Accept: application/json"

    Response example:

    {
    "results": [
    {
    "id": "019818ab-1000-7c55-9477-5020aebf7001",
    "slug": "reseller_balance_usd",
    "available": "500",
    "frozen": "0",
    "currency": "USD"
    }
    ]
    }
  3. Set up webhooks for asynchronous events: POST /v1/webhooks

    Section titled “Set up webhooks for asynchronous events: POST /v1/webhooks”

    Register endpoint URLs on your server for each event type:

    • order.status_updated — Order lifecycle status changed;
    • order.credentials_requested — Supplier requested 2FA code / login verification link;
    • order.receipt-requested — Goods delivered, awaiting customer confirmation.
    Terminal window
    curl -X POST "https://api.dandanpay.net/v1/webhooks" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "url": "https://api.myshop.com/webhooks/dandanpay",
    "event": "order.status_updated"
    }'
  4. Send a test webhook event: POST /v1/webhooks/{id}/test

    Section titled “Send a test webhook event: POST /v1/webhooks/{id}/test”

    Verify that your server successfully receives POST requests and returns HTTP 200 OK:

    Terminal window
    curl -X POST "https://api.dandanpay.net/v1/webhooks/123e4567-e89b-12d3-a456-426614174000/test" \
    -H "Authorization: Bearer YOUR_API_KEY"
  5. Retrieve the offers catalog: GET /v1/offers

    Section titled “Retrieve the offers catalog: GET /v1/offers”

    Get available catalog items filtered by brand or product:

    Terminal window
    curl -X GET "https://api.dandanpay.net/v1/offers?brand_slug=mlbb&limit=20" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Accept: application/json"
    {
    "results": [
    {
    "id": "01981de8-7cb4-7f54-8672-57eb8ee8b47e",
    "brand_slug": "mlbb",
    "brand_title": "Mobile Legends: Bang Bang",
    "product_slug": "crystals",
    "product_title": "Crystals",
    "offer_title": "50+50",
    "price": "1.0958",
    "currency": "USD",
    "disabled": false,
    "limited": true
    }
    ],
    "meta": {
    "total": 1,
    "page": 1,
    "limit": 20
    }
    }
  6. Inspect the offer input schema: GET /v1/offers/{id}

    Section titled “Inspect the offer input schema: GET /v1/offers/{id}”

    Retrieve full details for an offer, noting the order_input_schema field:

    Terminal window
    curl -X GET "https://api.dandanpay.net/v1/offers/01981de8-7cb4-7f54-8672-57eb8ee8b47e" \
    -H "Authorization: Bearer YOUR_API_KEY"
    {
    "id": "01981de8-7cb4-7f54-8672-57eb8ee8b47e",
    "price": "1.0958",
    "currency": "USD",
    "order_input_schema": {
    "type": "object",
    "required": ["game_user_key", "game_server_key"],
    "properties": {
    "game_user_key": { "type": "string" },
    "game_server_key": { "type": "string" }
    },
    "additionalProperties": false
    }
    }
  7. Provide offer_id and the input payload matching the order_input_schema:

    Terminal window
    curl -X POST "https://api.dandanpay.net/v1/orders" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "offer_id": "01981de8-7cb4-7f54-8672-57eb8ee8b47e",
    "input": {
    "game_user_key": "1919293471",
    "game_server_key": "6956"
    }
    }'

    The response returns 202 Accepted with initial status pending:

    {
    "id": "019818bc-1285-7c55-9477-5020aebf7782",
    "offer_id": "01981de8-7cb4-7f54-8672-57eb8ee8b47e",
    "status": "pending",
    "price": "1.0958",
    "currency": "USD"
    }
  8. Query current order status at any time:

    Terminal window
    curl -X GET "https://api.dandanpay.net/v1/orders/019818bc-1285-7c55-9477-5020aebf7782" \
    -H "Authorization: Bearer YOUR_API_KEY"
  9. Submit 2FA / OTP credentials (when requested)

    Section titled “Submit 2FA / OTP credentials (when requested)”

    If fulfillment requires account login, you will receive an order.credentials_requested webhook. Submit customer credentials via:

    Terminal window
    curl -X POST "https://api.dandanpay.net/v1/orders/019818bc-1285-7c55-9477-5020aebf7782/credentials" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "type": "otp",
    "code": "849201"
    }'
  10. Once goods are delivered, an order.receipt-requested webhook arrives (containing delivered_at and auto_confirm_at). Confirm successful delivery:

    Terminal window
    curl -X POST "https://api.dandanpay.net/v1/orders/019818bc-1285-7c55-9477-5020aebf7782/confirm-receipt" \
    -H "Authorization: Bearer YOUR_API_KEY"

    Or open a dispute if the customer did not receive the items:

    Terminal window
    curl -X POST "https://api.dandanpay.net/v1/orders/019818bc-1285-7c55-9477-5020aebf7782/dispute" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "reason": "Crystals have not been credited to the player account"
    }'