DreamX AI SHOP / PARTNER API
Integrate DreamX AI SHOP into Your Store
Read products and stock, purchase using your own DreamX AI SHOP wallet balance, then send the actual delivery result to your buyer. From registration to signed calls, complete the integration by following the steps below.
First Open Your Own Supply Account
- Register and verify your email.Open the Member Center and fill in your email, password, and verification code as required by the page, and read and agree to the site agreement. The supported email scope is as shown in the live notice on the registration page.
- Submit an API application after logging in.Go to the 'API Integration' page to submit an application. Supply permissions are reviewed manually by the site owner; successful registration does not mean supply permissions have been granted.
- Save the Key / Secret after approval.Generate a Secret on your own API page and save the full value safely right away. The page normally only shows a masked value; after regenerating, the old Secret becomes invalid immediately and you need to update the store server configuration at the same time.
- API review charges no activation fee; prepare your purchase balance.On the 'Wallet' page, view your balance and top up using the methods actually available. Purchases use your balance, not the payment information of your buyers in downstream stores.
- Connect First, Then Import.Use ping to test the connection, then check a small number of products for their SKU, account quote, stock, quantity limits, and buyer form. Placing a formal order enters the real purchasing process.
Apply separately for API supply and hosted sub-sites.To use DreamX AI SHOP as the supply source for your own store, simply apply for the supply API on this page; this will not automatically open a reseller sub-site, nor will it automatically pass review.
First confirm your store program
| Store Program | Integration Method | Current Status |
|---|---|---|
| Dujiao / Dujiao-Next | Select dujiao-next supply protocol, enter this site's root address and your own Key / Secret. | Versions supporting the protocol in this document can use it; when placing an order you must send a stable downstream_order_no。 |
| Yiciyuan / AcgFaka 3.8.5 | Select a native Yiciyuan shared store, and for the address enter https://your-domain.com/api/v1, using your own app_id and dedicated app_key. | CompatibleLocal Automatic Card Keys, each SKU is listed independently as a product. Manual, task, mapped-purchase and buyer-form products do not enter this catalogue.View the specific configuration and recovery rules。 |
| Old Dujiao Digital Card / Other Programs with the Same Name | Confirm whether the server side supports Dujiao-Next 1.0 and the idempotency rules in this document. | Similar names do not guarantee API compatibility; adaptation is required when there is no corresponding protocol. |
What this page describes isYour Store Purchases from DreamX AI SHOP. The fact that the DreamX AI SHOP back end can connect to an external supply site means DreamX AI SHOP can purchase from it; it does not mean that site's store program can in turn purchase from DreamX AI SHOP.
Configure Dujiao Like This
In your Dujiao-Next back end, add a new upstream connection and select dujiao-next, then import products after completing the connection test. Actual menu names may vary by version.
| Configuration Item | Fill In Content |
|---|---|
| Supply Site Root Address / Base URL | https://your-domain.com. Enter the root domain; do not append it again /api/v1/upstream。 |
| Protocol | dujiao-next / Dujiao-Next 1.0 |
| API Key / API Secret | The credentials provided on your own Member Centre → API Integration page; do not use the backend admin key or a channel Bot key. |
| Currency / Available Balance | Call POST /api/v1/upstream/ping read; the actual response prevails. |
| Unique Purchase Order Number | Use the purchase order number persistently saved by your own store, as downstream_order_no; retries of the same order keep the original number. |
If the connection test succeeds but creating an order returns invalid_order_key, first check whether your version sends downstream_order_no. Older clients only provide trace_id does not meet the purchasing idempotency requirements.
Request Headers & Signature
The business endpoints below all use three signed request headers. The Secret participates in signing on your server side and is not sent directly as a parameter; a member login JWT or Bearer Token is not used.
| Request Headers | Content |
|---|---|
Dujiao-Next-Api-Key | The original text of this account's API Key. |
Dujiao-Next-Timestamp | Unix timestamp in seconds; the deviation between client and server must not exceed 60 seconds. |
Dujiao-Next-Signature | The lowercase hexadecimal string of the HMAC-SHA256 result. |
body_md5 = lowercase_hex(MD5(the actual request body bytes sent))
sign_string = METHOD + "\n" + PATH + "\n" + TIMESTAMP + "\n" + body_md5
signature = lowercase_hex(HMAC_SHA256(API_SECRET, sign_string))
METHOD: uppercase, e.g. GET, POST
PATH: /api/v1/upstream/products, excluding the domain, ? and query parameters
MD5 of an empty request body: d41d8cd98f00b204e9800998ecf8427e
The separator is an actual newline, with no extra trailing newlineSpaces, field order and Unicode encoding in JSON all affect the signature. Serialize once first, then useThe same UTF-8 bytessign and send. An empty request body and {} are different; the signature must not include the query string.
Read Products, Quotes & Stock
| Method & Full Path | Response / Purpose |
|---|---|
POST /api/v1/upstream/ping | ok / site_name / protocol_version / user_id / balance / currency / member_level |
GET /api/v1/upstream/categories | categories array; category names are multilingual objects,parent_id is the parent category. |
GET /api/v1/upstream/products | items / total / page / page_size / includes_inactive |
GET /api/v1/upstream/products/:id | the specified product; the successful response field is product; the id here is the product ID. |
List parameters:page Starting from 1;page_size Default 50, Maximum 50;updated_after Use a URL-encoded RFC3339 time, such as 2026-11-06T00:00:00+08:00;include_inactive=true Delisted status can be synced; not included by default. A delisted product's details may still return 200, please check is_active。
| Key Fields | Processing Rules |
|---|---|
id / skus[].id | The product ID is used for queries; purchasing must use skus[].id As sku_id. Persistently store the product and SKU mappings. |
price_amount | An amount string with two decimal places. Accounts assigned a valid non-default reseller tier are priced in order by SKU-specific price → product general reseller price → tier discount → regular selling price; if no separate product price is configured, the price will not become zero. Other approved API accounts retain the original premium supply price rules. In addition, there is original_price / member_price available for display. An actual order will re-verify the current identity, specification, and price, and the purchase amount is paid from this account's wallet. |
min_purchase_quantity / max_purchase_quantity | Keep and validate quantity limits; the specific specifications are still subject to this site's order validation. |
skus[].stock_status / stock_quantity | A negative number is unlimited; 0 is out_of_stock; 1–20 are low_stock; 20 and above is in_stock. Discontinued products and SKUs can no longer be sold. |
title / description / content | Multilingual object;description is readable plain text,content Is rich-text detail content and must be rendered safely. Images may use relative paths. |
fulfillment_type / manual_form_schema | Keep the delivery type and buyer form definitions. Do not treat all products as form-free, instantly delivered card keys. |
Product stock is a snapshot; products mapped to a further upstream source may use cached stock. If reading fails or it returns stock_unavailable , keep the last valid snapshot and retry later; do not treat an API fault as a product deletion, a price of zero, or stock being cleared. A stock snapshot does not guarantee the item can still be purchased afterwards.
Buyer Form:The Dujiao-Next purchasing endpoint will receive manual / auto / upstream of the product manual_form_data, according to the product's manual_form_schema Validate the required fields and save. Please pass the raw JSON object, not a JSON string; do not omit required information such as the invite code or account just because the product is delivered automatically. Whether a mapped product can be delivered further upstream also depends on the corresponding supplier's form and delivery capabilities. The Yiciyuan synchronous delivery protocol still does not support products with buyer forms or Muse automatic boost products.
Purchasing & Preventing Duplicate Charges
POST /api/v1/upstream/orders Creates a real purchase order; the system attempts to pay using this account's wallet balance, which may deduct funds immediately and trigger delivery. There is no deduction-free test mode; use ping for connection testing.
| JSON Fields | Requirements |
|---|---|
sku_id | Required, a valid SKU ID returned by this site. |
quantity | Required, integer ≥ 1, and must also meet the product quantity limits. |
downstream_order_no | Required: the unique purchase number persistently saved by your store. After trimming leading and trailing whitespace it must not be empty, at most 64 UTF-8 bytes, with no control characters. |
manual_form_data | JSON object, fields correspond to manual_form_schema; when the product declares a required field, it must be provided, and the field value is still subject to server-side validation such as length and format. |
callback_url | Optional, a public HTTP/HTTPS address, HTTPS recommended; must not point to a local machine or an internal network. |
trace_id | Optional, request tracking number; does not replace the unique purchase number. |
{
"sku_id": 900001,
"quantity": 1,
"downstream_order_no": "EXAMPLE-SHOP-ORDER-001",
"manual_form_data": {"account": "example account"},
"callback_url": "https://your-shop.example/api/v1/upstream/callback",
"trace_id": "attempt-1"
}- The idempotency scope is API Credentials + downstream_order_no. When retrying the same business operation, keep the original order number, SKU, quantity, buyer form and callback address unchanged; only modify
trace_iddoes not constitute a new purchase. - Modifying the purchase content under the same number returns
409 idempotency_conflict. Changing the order number will be treated as a new transaction and may result in another charge. - Timeout, lost response, or
503 payment_outcome_unknownwhen, first use the one in the responseorder_idCheck the original order. If you didn't get the ID, you can useOriginal Number & Original ParametersRetry creation to recover the original order's result; you cannot change the number and re-purchase. - will not be returned while payment is unconfirmed
ok:true. Topping up the balance does not mean the original order will automatically attempt the charge again; first check the original order and wallet transactions. ok:trueindicates that payment for this order has been confirmed, but delivery still needs to be checked; HTTP 200 may also returnok:false, the business fields must also be checked at the same time.
Subject to the actual delivery result
GET /api/v1/upstream/orders/:id Use this site's digital order_id Query the current account's orders, returns status / amount / refunded_amount / currency / refund_records / procurement_status and other fields.
| Order Status | Processing Method |
|---|---|
pending_payment | Payment not yet confirmed: no delivery, and no second purchase will be created. |
paid / fulfilling | Paid, awaiting or in fulfillment; check the order at low frequency or wait for the callback. |
partially_delivered | Partially delivered; continue checking subsequent results and do not mark the whole order as complete. |
delivered / completed | Delivery completed, and at the same time verify fulfillment。 |
partially_refunded / refunded | Combined with local refunded_amount / refund_records handling, to avoid duplicate refunds. |
canceled | The original order is cancelled and is no longer considered a successful purchase. |
{
"ok": true,
"order_id": 900002,
"order_no": "EXAMPLE-ORDER-900002",
"status": "delivered",
"amount": "10.00",
"refunded_amount": "0.00",
"currency": "CNY",
"refund_records": [],
"fulfillment": {
"type": "auto",
"status": "delivered",
"payload": "EXAMPLE-DELIVERY-CONTENT",
"delivery_data": {},
"delivered_at": "2026-11-06T12:00:00+08:00"
}
}The delivery content is in fulfillment.payload, may be a card key, operating instructions or a task result;delivery_data is an additional structure. When not yet delivered fulfillment may not exist, and must not be treated as 'an empty card key has been issued'. Task-type and manually processed products in particular need to wait for actual delivery.
POST /api/v1/upstream/orders/:id/cancel Only eligible unpaid orders can be cancelled. The current API has no separate entry point for proactively requesting a refund for a paid order;procurement_status is only a further-upstream purchase status; it does not mean your account has received a refund.
Receiving & Verifying Order Callbacks
Can be provided at purchase callback_url. This site uses the Key / Secret of that API credential, sent as POST JSON order.status_changed or order.fulfilled event. Verify the signature first, then check your own purchase number and this site's order ID, and update idempotently by order.
Callback Signature PATH Is Fixed As /api/v1/upstream/callback。Even if the receiving URL you enter uses a different path, verify the signature using this fixed value; this is what distinguishes callbacks from ordinary business requests. Verify the signature using the raw bytes received, check the timestamp in seconds, and allow a deviation of no more than 60 seconds.
{
"event": "order.fulfilled",
"order_id": 900002,
"order_no": "EXAMPLE-ORDER-900002",
"downstream_order_no": "EXAMPLE-SHOP-ORDER-001",
"status": "delivered",
"fulfillment": {
"type": "auto",
"status": "delivered",
"payload": "EXAMPLE-DELIVERY-CONTENT",
"delivery_data": {}
},
"timestamp": 1793923200
}Returned after successful processing HTTP 200 & JSON {"ok":true}, returning only the text success does not count as success. Failures are retried up to 5 attempts in total, with retry intervals of 30 / 60 / 120 / 300 seconds; a single request times out after about 15 seconds and does not follow redirects. The receiving address should return the response directly.
Callbacks may be duplicated, out of order, or arrive later than the order lookup result; do not ship or refund repeatedly because of a callback replay. Callbacks contain no refund details; after receiving a status change, you can look up the original order again to verify the amount and records. You can also continue to look up orders at a low frequency without a callback.
Copyable Server-Side Examples
The following code runs only on your own server side. Take XINGXUAN_API_KEY and XINGXUAN_API_SECRET Set it as a private environment variable; do not put the secret key in front-end scripts, URLs, logs, or public repositories. When the example is run directly, it only calls ping and does not create a purchase order.
import hashlib, hmac, json, os, time
from urllib import request, error, parse
BASE = "https://your-domain.com"
class NoRedirect(request.HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
return None
def signed_request(method, target, payload=None):
method = method.upper()
parts = parse.urlsplit(target)
if parts.scheme or parts.netloc or not parts.path.startswith("/api/v1/upstream/"):
raise ValueError("Expected a relative Xingxuan API path")
body = b"" if payload is None else json.dumps(
payload, ensure_ascii=False, separators=(",", ":")
).encode("utf-8")
timestamp = str(int(time.time()))
message = "\n".join([method, parts.path, timestamp, hashlib.md5(body).hexdigest()])
signature = hmac.new(
os.environ["XINGXUAN_API_SECRET"].encode("utf-8"),
message.encode("utf-8"), hashlib.sha256
).hexdigest()
return request.Request(BASE + target, data=body if body else None, method=method,
headers={"Content-Type": "application/json",
"User-Agent": "Xingxuan-Upstream-Client/1.0",
"Dujiao-Next-Api-Key": os.environ["XINGXUAN_API_KEY"],
"Dujiao-Next-Timestamp": timestamp,
"Dujiao-Next-Signature": signature})
def call(method, target, payload=None):
req = signed_request(method, target, payload)
try:
with request.build_opener(NoRedirect()).open(req, timeout=30) as response:
return response.status, json.loads(response.read())
except error.HTTPError as exc:
try:
data = json.loads(exc.read())
except (ValueError, UnicodeDecodeError):
data = {"ok": False, "error_code": "non_json_response"}
return exc.code, data
except error.URLError:
# A purchase may already exist. Keep its original order key.
return None, {"ok": False, "error_code": "transport_error"}
if __name__ == "__main__":
status, data = call("POST", "/api/v1/upstream/ping")
print(status, data)
function xingxuanSign(string $secret, string $method, string $path,
int $timestamp, string $body = ''): string {
$path = parse_url($path, PHP_URL_PATH);
$message = strtoupper($method) . "\n" . $path . "\n"
. $timestamp . "\n" . md5($body);
return hash_hmac('sha256', $message, $secret);
}
// $body = json_encode($payload,
// JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
// Send the same $body as the HTTP request body; do not json_encode it again.
// For callback signature verification, pass the fixed path /api/v1/upstream/callback.
Keep the original purchase identity if it fails
| HTTP / error_code | Processing |
|---|---|
401 · missing_auth_headers / invalid_timestamp / timestamp_expired / invalid_signature | Check the three request headers, server time, the raw body bytes, and the signature path. After fixing them, still use the original business order number. |
403 · invalid_api_key / user_disabled | Check manual review, credential switches, account status and whether the Secret has been reset. |
400 · invalid_order_key / sku_unavailable / product_unavailable / bad_request | Check the unique purchase number, SKU, quantity, form and product status. See Section 05 for form support limits. |
402 · insufficient_balance | Verify the balance and the original order; do not bypass the original order's status by retrying with a different purchase number. |
409 · insufficient_stock / idempotency_conflict / legacy_order_exists / cancel_not_allowed | Handle according to the specific error. For idempotency conflicts, check the original request; if a legacy order already exists, query by the returned ID and do not create another. |
503 · payment_outcome_unknown | The purchase payment result is pending verification. Save the response order ID and the original purchase number, and check the original order first; do not place a new order to buy again. |
503 · stock_unavailable; 429; network timeout or 5xx | Retry with backoff. The catalog keeps valid snapshots; keep the original number and original parameters for purchasing, and after obtaining the order ID, inquire on the original order. |
200 · ok:false / order_canceled | The original order has been cancelled. HTTP success does not equal business success; always check ok / status / error_code。 |
Simply record the unique purchase number, this site's order ID, status, and error code for verification. Do not log the Secret, full authentication headers, or the buyer's complete sensitive form data; for API failures, retry with increasing intervals to avoid frequent repeated calls.
Yiciyuan 3.8.5 Integration Instructions
According to the official lizhipay/acg-faka 3.8.5 Stable Versionverified; published on 2026-10-28; version verification date 2026-11-06. This explains the compatibility scope required for that version; other branches or third-party modified versions are not treated as official versions.
Compatibility Scope: Local Automatic Card Keys.This site provides a Yiciyuan shared-protocol compatible entry point, listing only automatic card keys from this site's local stock with no buyer form; each SKU is displayed independently as a product. Manual products, products mapped to external sources, Muse/task products and products with forms are not in this shared catalogue. Only card keys actually delivered will be returned as a successful purchase.
Shared Store Configuration
Add a shared store in the Yiciyuan backend and selectYiciyuan Native Sharing Protocol(Do not select another program's Open API or SharedStock plugin protocol), enter:
| Yiciyuan Configuration Items | What to enter |
|---|---|
| Store Address | https://your-domain.com/api/v1. This must be retained here /api/v1; Yiciyuan will automatically append /shared/... path. |
| Merchant ID / app_id | shown on the API Integration page in your own Member Center →Yiciyuan app_id(Digital credential ID), not an API Key, and not a member user ID. |
| Merchant Secret / app_key | shown on the page when generating a Secret, theYiciyuan Dedicated app_key, is a 64-character lowercase hexadecimal string. Do not enter the native 128-character Secret. |
| Currencies & Exchange Rates | This site's currency is as stated in the connection and quote responses; when both ends use RMB, select CNY with an exchange rate of 1. For different currencies, you must clearly configure the settlement exchange rate according to your own store's rules. |
First test the connection and balance, then read the shared catalog, select a small number of products to import, and set your own selling prices. An empty catalog means there are currently no products matching the scope above; do not fill it with incompatible products from the regular store catalog.
In Yiciyuan 3.8.5, the merchant key input limit is 64 characters, while this site's native Secret is 128 characters, so the two are provided separately. The dedicated app_key is calculated as follows:
app_key = lowercase_hex(SHA256(UTF8("xingxuan/acgfaka/v1\n" + NATIVE_SECRET)))
PHP:
$appKey = hash('sha256', "xingxuan/acgfaka/v1\n" . $nativeSecret);
Python:
app_key = hashlib.sha256(("xingxuan/acgfaka/v1\n" + native_secret).encode("utf-8")).hexdigest()
\n represents an actual newline (LF); do not write it as the two characters backslash and n.The dedicated app_key still carries purchasing and balance-use permissions — protect it the same as a Secret. It uses the same account's review status; after regenerating the native Secret, both native signing and the old Yiciyuan app_key become invalid immediately, and both connections need to be updated at the same time.
Correspondence Between the Two Protocols
| Yiciyuan 3.8.5 Native Shared Call | The corresponding capability already supported by this site |
|---|---|
POST /shared/authentication/connect | This site's full path is /api/v1/shared/authentication/connect, returns code/msg/data and data.shopName / balance / currency_code。 |
POST /shared/commodity/items、item | All full paths are prefixed with /api/v1. The list is a category tree; details follow code read, the product number is nova-sku-Numeric SKU Number。 |
inventory / inventoryState / stock / valuation | Returns stock, quantity limits, and member/tiered quotes by local SKU;valuation Returns the total price for the quantity in this purchase, not the unit price. Promotional discounts and the final settlement are still subject to the actual order. |
POST /shared/commodity/trade | Receive the original version's stable request_no, converted into a fixed purchase number in an independent namespace, reusing this site's native persistent idempotency and wallet payment flow, without building a separate charging system. |
Response data.secret | Only those actually delivered fulfillment.payload is the delivery result; paid, awaiting processing or a request timeout cannot be converted into a successful card key. |
The above 8 endpoints are all form POSTs, carrying app_id / app_key / sign; use the other-dimension MD5 parameter signature, and do not mix in the native HMAC request headers. The signature rule is: remove sign, sort by top-level parameter name, remove top-level parameters whose value is an empty string, and calculate md5(urldecode(http_build_query(params) + "&key=" + app_key))。The app_key itself is also among the signed parameters.The original program will complete these steps automatically.
item / stock / valuation Use code;inventory Use sharedCode;inventoryState / trade Use shared_code. The quantity field is num. Products have been expanded by SKU,race is empty,card_id is 0, and no additional SKU selection is passed; card-number pre-selection or buyer forms are not supported. API errors also return JSON code/msg/data, must check code, you cannot rely only on HTTP 200.
The delivery method determines the integration approach
When the original Yiciyuan receives a shared purchase, the secret then directly mark the local order as delivered. This site's compatibility entry point will wait for local card-key delivery after native payment, waiting up to about 10 more seconds, leaving processing and network headroom within the original's roughly 30-second HTTP request limit. Return code:200 when,data.secret is the actual delivered content.
When processing, timed out or disconnected, stop automatically re-purchasing.code:202 indicates the original order is still being processed,code:502 May indicate it has been marked as delivered but lacks a valid card key. Save data.order_id / order_no And the original request_no, check in the Member Centre or query via the native order-lookup endpoint; retrying with the same request number only restores the original order and does not charge again. Do not create another downstream order to test.
The original Yiciyuan may roll back the local order after a shared call error; when the buyer purchases again, a new order number is generated, thereby formingAnother genuine purchase. This site cannot automatically determine that two different request numbers belong to the same transaction. Unknown results must be manually checked against the original order; do not interpret an error message as meaning 'not yet charged'.
Native sharing calls do not support this site's asynchronous status callbacks. To sell manual, task-based, or other delayed-delivery products, downstream stores need a plugin that supports Dujiao-Next, persistently store the purchase number and order ID, and handle order inquiries, callbacks, and refunds; products with buyer fields must also first meet the form support scope described in Section 05. Such products fall outside the Yiciyuan native sharing compatibility scope covered on this page.
Official Protocol Verification Sources
Muse AI Ready-Made Account Dedicated Email Code API & White-Label Integration
For the Muse AI 1 billion / 31 billion ready-made accounts supplied by this site (@outlook.com Natively injected email), this site provides a password-free token code-receiving page (https://your-domain.com/a/{token}), a pure JSON code-receiving API, and a reseller white-label embedding solution, while also supporting extraction of 6-Digit Meta Login Verification Codeand 8-Digit Account Recovery Security Confirmation Code。
Standalone Code-Retrieval Integration Toolbox:You can also visit directly https://your-domain.com/api/v1/docs Use the online bulk code-retrieval domain replacer, or download a white-label code-retrieval single page in one click whitelabel.html Deploy it under your own domain.
Method A: Nginx Reverse-Proxy White-Label Binding (Recommended for Resellers)
Add the following two reverse-proxy blocks to your own domain's Nginx configuration, and you can take the card key's https://your-domain.com/a/xxxx Directly replace with https://your-domain.com/a/xxxx, customers only ever see your domain:
location ^~ /a/ {
proxy_pass https://your-domain.com/a/;
proxy_ssl_server_name on;
proxy_set_header Host your-domain.com;
proxy_set_header X-Real-IP $remote_addr;
}
location ^~ /api/v1/code/ {
proxy_pass https://your-domain.com/api/v1/code/;
proxy_ssl_server_name on;
proxy_set_header Host your-domain.com;
proxy_set_header X-Real-IP $remote_addr;
}Method B: Pure JSON verification-code reading API (for calling from a custom frontend or TG bot)
| API Items | Description |
|---|---|
| Request Method & Path | GET https://your-domain.com/api/v1/code/{token_or_email}(No authentication header required,{token_or_email} You can pass the dedicated encrypted Token at the end of the card-key code-receiving link, or the bound email) |
| Cross-Origin Support | Returns by default Access-Control-Allow-Origin: *, can be called directly from a front-end web page or back-end script |
| Response Fields | ok: true、email(masked or the corresponding email),code(the latest 6–8 digit verification code),subject(email subject),receivedAt(receipt time ISO string) |
{
"ok": true,
"email": "ExampleUser123@outlook.com",
"code": "839201",
"subject": "Your Meta confirmation code is 839201",
"receivedAt": "2026-11-11T08:30:12Z"
}Muse AI Invite Code Automatic Boost Top-Up & Real-Time Order Lookup API
A. Store Wallet Purchase: Order Directly by Invite Code
Stores already connected to the Dujiao-Next supply API can purchase using the method in this section Muse Invite Code Auto-Boost. The product 1537, variant 2422 Currently automatic delivery: keep auto type, pass in manual_form_data.invite_code, after successful payment it is executed by the existing boost queue. Each item corresponds to one boost; the purchase quantity must comply with the product limits.
The request is POST /api/v1/upstream/orders, useSection 04 · HMAC Signature Request Headers. The following is an example of the request body format (contains real SKUs; sending it may incur a charge, so please use the customer's real invite code and your persistently saved unique purchase number):
{
"sku_id": 2422,
"quantity": 1,
"downstream_order_no": "YOUR-SHOP-ORDER-001",
"manual_form_data": {"invite_code": "A1B2C3"}
}invite_code is 6 English letters or digits. Orders will be rejected if it is missing, the length does not match, or it contains other characters; repeated retries must retain the original request and purchase number, and changing the invite code under the same purchase number will return an idempotency conflict. Insufficient balance will not start a boost. Do not test connectivity by placing an actual order; please use POST /api/v1/upstream/ping。
Use GET /api/v1/upstream/orders/:id Look up the overall status of this account's orders. The current purchase lookup API does not provide per-completion counts or queue positions; completed deliveries can be read fulfillment.delivery_data. The card-key lookup API below is used for redemption tasks for purchased card keys; it does not look up by store order ID and cannot substitute for placing a purchase order.
B. OpenV1 Standard Multi-Card Merged Submission Protocol (Recommended for Reseller / Platform Integration)
All OpenV1 endpoints uniformly use the top-level boolean field ok: true / false Determination result; supports combining multiple card keys under the same customer invite code via codes ArraySubmit Multiple Cards Merged in One Go(to avoid splitting orders for a single invite code triggering the anti-concurrency lock). Submission error 100% Zero Code Deduction; when it stops midway upon reaching the invite limit, only the successfully completed uses are settled, and unused uses are automatically retained in the card key.
| API Functions | Methods & Addresses | Core Parameters / Description |
|---|---|---|
| Check the Remaining Uses of a Card Key | GET https://your-domain.com/open/v1/cdks/{cdk} | Back { "ok": true, "data": { "code", "status", "total_uses", "used_uses", "remaining_uses" } } |
| Combined Submission of Multiple Boosts | POST https://your-domain.com/open/v1/boost-requests | Sent as JSON codes(array of card-key strings, supports merging 1–30 times),invite_code(6-digit invite code),external_id(optional idempotency number; if not provided uses automatically creates a combined order based on the total available uses of the card keys) |
| Check Task Progress in Real Time | GET https://your-domain.com/open/v1/boost-requests/{request_id} | Back { "ok": true, "data": { "request_id", "status", "uses", "progress": { "total", "completed", "failed", "remaining" } } } |
// POST https://your-domain.com/open/v1/boost-requests
{
"codes": ["M1T8XXXXXXXXXXXX", "M1T8YYYYYYYYYYYY", "M1T8ZZZZZZZZZZZZ"],
"invite_code": "AB12CD",
"external_id": "partner_20261122_001"
}
// Response (200 OK):
{
"ok": true,
"data": {
"request_id": "REDEEM-20261122-XXXXXXXXXXXXXXXX",
"status": "queued",
"invite_code": "AB12CD",
"uses": 3,
"external_id": "partner_20261122_001",
"progress": { "known": true, "total": 3, "completed": 0, "failed": 0, "remaining": 3 }
}
}C. Purchased Boost Card Keys: Built-In Compatible Redemption & Progress Inquiry
If you purchased Muse AI boost card keys wholesale from this site (M1... or NV1-... format; each card or copy corresponds to +1 billion Tokens, stackable up to 30 times to reach a full-level master account of 31 billion), except for having the customer go to https://your-domain.com/muse Besides self-service redemption, you can also call the following public API directly from your own card-selling site or bot to submit top-ups for customers and check progress in real time:
1. Submit Card Key & Invite Code for Built-In Direct Top-Up
| Parameter Name | Type | Required | Description |
|---|---|---|---|
POST Address | https://your-domain.com/api/muse-pool/public/redeem(Content-Type: application/json) | ||
inviteCode | string | is | The customer's 6-digit uppercase alphanumeric Muse invite code (e.g. A1B2C3) |
voucherCode | string | is | Top-up card keys purchased from this site; multiple keys from the same series can be submitted in bulk, separated by spaces or line breaks. Please request the M series and NV series separately; do not mix them in a single submission. |
// POST https://your-domain.com/api/muse-pool/public/redeem
// Request Body:
{
"inviteCode": "A1B2C3",
"voucherCode": "NV1-8F9A2B4C6D1E"
}
// Response (200 OK):
{
"ok": true,
"message": "Redemption successful! Queued for the built-in automatic top-up queue",
"order": {
"ticket": "2B113FF6",
"inviteCode": "A1B2C3",
"uses": 10,
"done": 0,
"status": "queued"
}
}2. Check Invite Code or Card-Key Top-Up Progress in Real Time
| Parameter Name | Type | Required | Description |
|---|---|---|---|
POST Address | https://your-domain.com/api/muse-pool/public/query | ||
q(JSON Request Body) | string | is | the customer's 6-digit invite code (A1B2C3), ticket number (ticket) or a top-up card key |
Request Headers Content-Type: application/json, request body {"q":"original card key or lookup content"}. A successful response contains a separate read-only query_token; subsequent requests use {"query_token":"QRY1_…"}. Read-only credentials cannot be redeemed; after 30 days, you can re-verify using the original credentials. Do not put card keys or inquiry credentials in URLs or logs; responses must not be cached, and inquiry results will not echo redeemable card keys.
{
"ok": true,
"order": {
"ticket": "2B113FF6",
"inviteCode": "A1B2C3",
"uses": 30,
"done": 18,
"status": "running"
}
}