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.
-
Obtain a workspace API key
Section titled “Obtain a workspace API key”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>. -
Check workspace account balances:
Section titled “Check workspace account balances: GET /v1/accounts”GET /v1/accountsEnsure 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"}]} -
Set up webhooks for asynchronous events:
Section titled “Set up webhooks for asynchronous events: POST /v1/webhooks”POST /v1/webhooksRegister 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"}' -
Send a test webhook event:
Section titled “Send a test webhook event: POST /v1/webhooks/{id}/test”POST /v1/webhooks/{id}/testVerify 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" -
Retrieve the offers catalog:
Section titled “Retrieve the offers catalog: GET /v1/offers”GET /v1/offersGet 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}} -
Inspect the offer input schema:
Section titled “Inspect the offer input schema: GET /v1/offers/{id}”GET /v1/offers/{id}Retrieve full details for an offer, noting the
order_input_schemafield: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}} -
Create an order:
Section titled “Create an order: POST /v1/orders”POST /v1/ordersProvide
offer_idand theinputpayload matching theorder_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 Acceptedwith initial statuspending:{"id": "019818bc-1285-7c55-9477-5020aebf7782","offer_id": "01981de8-7cb4-7f54-8672-57eb8ee8b47e","status": "pending","price": "1.0958","currency": "USD"} -
Check order status:
Section titled “Check order status: GET /v1/orders/{id}”GET /v1/orders/{id}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" -
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_requestedwebhook. 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"}' -
Confirm delivery or file a dispute
Section titled “Confirm delivery or file a dispute”Once goods are delivered, an
order.receipt-requestedwebhook arrives (containingdelivered_atandauto_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"}'