Skip to main content
Elim Asia

Placing & paying for Taobao/1688 orders through Elim

Who this guide is for

You are a business owner (or an operations team) — a purchasing agent, an order company, or a cross-border platform — integrating the Elim API so that your customers’ orders flow straight from your web/app to Taobao/1688 without manual work. This guide walks through one full order lifecycle: from checking the wallet, creating the order, and paying, to the goods being delivered — with the points you must verify at each step.

Scope: Multiple markets are supported. Payment is unified in VND, USD, or RMB (CNY) — you top up the wallet in one of these three currencies and every order is normalized to the same unit regardless of market.

Need a quick lookup of endpoints, parameters, status values, error codes? See the Order API Reference.

The big picture

Elim is a technology platform that handles order fulfilment and payment for your system — it does not sell retail, does not take end customers directly, and is not a parallel purchasing service. You still own your selling price, policies, and customers; Elim only creates orders on the platform and pays sellers on your behalf. Because money does not go straight from the customer to Taobao/1688, funds flow through three parties:

PartyRole
You (the agent)Top up the purchasing wallet, create orders, send payment requests, track orders
ElimThe infrastructure layer: holds the wallet, approves payment requests, creates orders and pays sellers on the platform, pushes order updates back to your system
Taobao / 1688Processes the order, ships from the warehouse, handles delivery

An order has two separate statuses

Do not merge them into one — they change independently:

  • status — the order’s progress on the platform (Taobao/1688): creating → pending_payment → paid → shipped → completed, or cancelled (cancelled before payment), or closed (paid, then closed by the platform after a refund).
  • payment_status — the payment progress between you and Elim: unpaid → requested → approved → paid, or rejected, or refunded.

A valid example: an order can be status = shipped while payment_status = paid from earlier — two different timelines.

The lifecycle of an order

   YOU                          ELIM                        PLATFORM
   │                            │                           │
1. Preview the order ───────────┼───────────────────────────┤
2. Create the order ───────────►│                           │ status: pending_payment
   payment_status: unpaid       │                           │
3. Send payment request ───────►│ hold (freeze) funds in wallet │
   payment_status: requested    │                           │
                                │ 4. Approve the request     │
                                │    payment_status: approved│
                                │ 5. Pay the platform ──────►│ status: paid → shipped
                                │    deduct wallet funds     │
   payment_status: paid ◄───────┤                           │
6. Receive webhook updates ◄────┤◄──────────────────────────┤ status: completed

Steps 4 and 5 are performed by Elim — you do not call an API for these two steps, you only wait and receive the result.

Prerequisites

  • API credentials (JWT or API Key) — see Authenticating API requests.
  • A purchasing wallet with enough available balance for the order value. Topping up happens outside the system (a bank transfer to Elim); see Step 1.
  • product_ref and sku_ref for each item — taken from product search / details.
  • A valid shipping address in China (usually your own transit warehouse), written in Chinese.

Step 1 — Check the wallet balance

The purchasing wallet converts every top-up (VND, USD…) into CNY. Before creating an order, confirm the wallet has enough funds.

GET /v1/purchasing/wallet

You get back:

FieldMeaning
balanceTotal CNY balance
frozen_balanceThe portion held for orders that have a payment request sent but not yet completed
available_balanceThe amount you can actually use = balance − frozen_balance

Always compare available_balance (not balance) with the order value. Funds held for another order cannot be spent again.

Top up when short: bank-transfer to Elim following the top-up instructions (VND/USD). After Elim confirms receipt, the balance is credited to the wallet at the prevailing exchange rate. See the rates currently applied:

GET /v1/purchasing/exchange-rates

Step 2 — Preview the order

Preview gives you the estimated total and the stock availability of each SKU. This step does not create an order and does not deduct money.

POST /v1/orders/preview
{
  "platform": "alibaba",
  "receiver_address": {
    "name": "Nguyen Van A",
    "phone": "02812345678",
    "mobile": "13800138000",
    "address": "广州市天河区体育西路123号",
    "province": "广东省",
    "city": "广州市",
    "area": "天河区"
  },
  "line_items": [
    { "product_ref": "734467086498", "sku_ref": "5578084256927", "quantity": 2, "price": 15.5 }
  ]
}

Points to verify before moving on:

  1. unavailable_items must be empty. If it has elements (out of stock, wrong SKU, discontinued), do not create the order — deal with those items first, then preview again.
  2. total_amount (goods amount + domestic China shipping fee) matches your expectation.
  3. Keep the preview_token from the response — the token is single-use and expires after 10 minutes. Send it along in the create-order step to lock in the price you just saw.

Step 3 — Create the order

Resend exactly the payload you previewed (same platform, address, item list, quantities), adding the preview_token and an idempotency_key that you choose.

POST /v1/orders
{
  "platform": "alibaba",
  "receiver_address": { "...": "identical to the preview step" },
  "line_items": [
    { "product_ref": "734467086498", "sku_ref": "5578084256927", "quantity": 2, "price": 15.5 }
  ],
  "preview_token": "c5f75ec1-9f8d-4bf6-9de2-048d50fef349",
  "idempotency_key": "checkout-2026-08-25-001",
  "remark": "Note for the seller"
}

idempotency_key is required (up to 128 characters; missing → 400). If a request is repeated with the same key and the same content (flaky network, the user clicking twice), Elim returns the same order instead of creating a duplicate. The same key with different content → 409 IDEMPOTENCY_KEY_PAYLOAD_MISMATCH. Use a new key for every real checkout.

client_order_id (your own code, optional) is stored but not returned in the response and cannot be filtered on — keep your own mapping to data.id.

Reading the response:

FieldMeaning
data.idInternal order ID in the form ORD0000000123 — use it for every later operation
statuspending_payment if creation succeeded
data.order_list[]Shop + product details from the platform — use them to build a receipt for the customer

After creation, the order is at payment_status = unpaid. The goods are not processed by the platform until payment completes.

If status = "unknown": the platform refused to create the order (for example the product cannot be ordered). Stop the payment flow, check the order details, and fix the cause before creating it again with a new key.

If the request returns an error or times out: the outcome may be unclear (status = route_unknown). Do not create a new order with a different key — resend with the exact same idempotency_key or check GET /v1/orders to avoid ordering twice.

Service fee: total_amount in the preview is goods + shipping on the platform side. Elim adds a service fee when you send the payment request in the next step — leave room in the wallet for it.

Step 4 — Confirm the order & send a payment request

This is the order confirmation step from your side: you commit that this order is correct and ready to be paid. Elim holds (freezes) the corresponding amount in the wallet — the money is not fully deducted yet, but can no longer be used for other orders.

POST /v1/purchasing/orders/{id}/request-payment

The response tells you exactly what is held:

FieldMeaning
frozen_amountTotal held = goods amount + domestic shipping fee + service fee
goods_amount_cnyGoods amount (CNY) as reported by the platform
shipping_fee_cnyDomestic China shipping fee
service_fee_cnyElim’s service fee for order fulfilment

The order moves to payment_status = requested.

If the wallet is insufficient

You get a 400 with the details of how much is missing:

{
  "error": "insufficient_balance",
  "current_balance": 120.00,
  "available_balance": 90.00,
  "required": 286.50,
  "deficit": 196.50
}

Top up the deficit in CNY (Step 1), then call request-payment again.

Withdrawing the request

Still at requested and want to cancel (for example the customer changed their mind)? Call:

POST /v1/purchasing/orders/{id}/cancel-payment-request

The held funds are released back into the wallet, and the order returns to payment_status = unpaid. Once Elim has approved, this method can no longer withdraw it — you then have to go the refund route.

Step 5 — Elim approves and pays the platform

Elim performs these two tasks. You do not call an API — just watch payment_status:

payment_statusMeansWhat you do
requestedThe request is waiting for Elim’s reviewWait
approvedElim approved and is paying the platformWait
paidPayment completed; funds deducted from the walletDone — move on to tracking delivery
rejectedElim rejected the request; the held funds were returned to the walletRead the reason in rejection_reason, fix it, then resend the request

When platform payment completes, the order reaches payment_status = paid and the platform status starts to advance (paid → shipped). The platform_payment_status field tells you the platform-side result: success is fine; failed means the platform refused payment — Elim has returned all the held funds to the wallet (an order_refund transaction, reference_type = platform_payment_failed), the order returns to payment_status = unpaid, and you can resend the request. unknown means the result is unclear: the order stays approved while Elim reconciles — wait, do not resend.

If the final order price (goods + domestic shipping) is lower than the amount held (seller price change, discount, bargaining), Elim automatically refunds the difference to the wallet (reference_type = platform_discount) and the order’s total_amount_cny decreases accordingly.

You do not need to poll constantly. The neatest way to learn of this milestone is to register a webhook in the next step.

Step 6 — Receive order updates via webhook

Instead of polling for order status, register a webhook so Elim proactively calls your system whenever an order or payment changes status.

6.1. Register the receiving endpoint

POST /v1/webhooks
{
  "url": "https://your-system.example/webhooks/elim",
  "events": ["order.updated", "payment.updated"],
  "is_active": true
}

The response returns a secret — shown exactly once. Store it somewhere safe; you need it to verify signatures. If you lose it, regenerate it with POST /v1/webhooks/{id}/rotate-secret.

  • order.updated — sent when the order status (status) changes, when the order total changes, or when the platform confirms payment.
  • payment.updated — sent when the payment status (payment_status) changes, including automatic refunds.
  • Each account may have at most 5 active webhooks. There is no webhook for per-line-item refund requests — see Refunds.

6.2. Handling each call from Elim

Every request carries a snapshot of the order in data.order (id, status, payment_status, platform_payment_status, total_amount_cny, updated_at). What you do:

  1. Deduplicate: the same event may arrive multiple times (retries keep the same evt_... id). Store the ids you have processed and skip if already seen.
  2. Verify the signature in the X-Elim-Signature header = HMAC-SHA256(secret, "{X-Elim-Timestamp}.{raw_body}"):
import { createHmac, timingSafeEqual } from 'node:crypto';

function verifyElimWebhook(secret: string, timestamp: string, rawBody: string, signature: string) {
  const expected = `sha256=${createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex')}`;
  return timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}

Reject requests whose X-Elim-Timestamp is too old (for example more than 5 minutes off).

  1. Look up data.order.id and update the order status in your system.
  2. Return HTTP 2xx. Otherwise, Elim retries up to 3 times (spaced 60 seconds, then 300 seconds).

Full payload structure, header list, and retry policy: see the Webhook Reference.

6.3. If you have not set up webhooks

Query the status directly at any time:

GET /v1/orders/{id}

On every call, Elim automatically syncs the latest status from the platform before returning — you do not need to hammer it, just call when needed (the customer opens the order, or presses refresh).

Step 7 — Track the order and shipping

Order list (filter + pagination):

GET /v1/orders?page=1&size=20&platform=taobao&status=shipped&payment_status=paid

You can filter by platform, status, payment_status, internal_order_id, platform_order_id, created_from, created_to.

line_items in the list are a snapshot taken when the order was created — they may differ from the current state on the platform. When the customer opens the details, always call GET /v1/orders/{id} to get the latest version.

Order details — the structure differs by platform:

PlatformItem listShipping information
1688products[]logistics.logistics_info[] — embedded in the order details
Taobaoline_items[]Call GET /v1/orders/{id}/logistic-detail?package_id=<number> separately

The platform field is already present in the list response — save it so you know which layout to display before opening the details.

Domestic China shipping tracking (Taobao requires package_id; 1688 optional):

GET /v1/orders/{id}/logistic-detail?package_id=12345

package_id is an integer taken from the Taobao order details response (not the ORD... ID).

Step 8 — Cancel and refund

Cancelling an order

POST /v1/orders/{id}/cancel

Elim forwards the cancellation request to the platform and the platform decides; Elim does not block by status. In your interface, only allow cancelling when status is creating or pending_payment; at paid, shipped… the platform usually refuses.

OutcomeWhat you do
status = cancelledDone. Calling the endpoint again is safe (already_cancelled: true)
{ "message": "Internal order cancelled, no external order to cancel" }The order had no platform code yet — cancelled at Elim, nothing left to cancel
success: false, status = cancellation_failedThe platform refused the cancellation. The order is unchanged; if you need to return goods/money, use the refund route below
Error or status = cancellation_pendingOutcome unclear — call GET /v1/orders/{id} after a few minutes, and do not cancel repeatedly

If funds are held (requested / approved) and the order is cancelled on the platform → Elim automatically releases the funds, and payment_status returns to unpaid.

Refunds

Cancelling an order that is already paid does not automatically refund to the wallet. Take the appropriate route below.

SituationHow the money returns
The platform refuses paymentAutomatic, all held funds — reference_type = platform_payment_failed
The final order price is lower than the held amountAutomatic, the difference — reference_type = platform_discount
Defective / missing / undelivered goodsSend a per-line-item refund request POST /v1/refunds, the seller approves, Elim credits the wallet — reference_type = refund_request
You need to refund an entire paid orderContact Elim to perform it — reference_type = order, payment_status = refunded

Refund request workflow (Taobao/1688):

  1. GET /v1/refunds/options — get the valid reasons, amount range, and maximum number of images.
  2. (1688, when the reason needs evidence) POST /v1/refunds/evidence — upload an image and get a URL.
  3. POST /v1/refunds — send the request. Each line item can have only one open request.
  4. Track GET /v1/refunds/{id}: status (seller side), then customer_refund_status. Money only enters the wallet when customer_refund_status = credited. There is no webhook for this step, so poll periodically.
  5. (1688, returns) when awaiting_return: POST /v1/refunds/{id}/return-shipment to declare the tracking number.

Wallet reconciliation: GET /v1/purchasing/wallet/transactions?type=order_refund — use reference_type and reference_id to match each amount to an order or an RF... request. Status details, fields, and error codes: Refund Reference.

End-to-end verification

  • GET /v1/purchasing/wallet → available_balance ≥ the expected order value.
  • Preview returns unavailable_items: [] and total_amount matches your expectation.
  • Create order returns data.id in the form ORD... and status = pending_payment.
  • request-payment returns the correct frozen_amount; the wallet’s frozen_balance increases accordingly.
  • payment_status advances requested → approved → paid; platform_payment_status = success.
  • You receive order.updated / payment.updated at the webhook endpoint, and the signature matches.
  • GET /v1/orders/{id} correctly shows both status and payment_status, along with shipping information.

Handling common errors

HTTPSituationHow to handle
400Missing idempotency_keyAlways send a unique key for every order creation
409IDEMPOTENCY_KEY_PAYLOAD_MISMATCHThe key was already used with different content — use a new key
400insufficient_balanceTop up exactly the deficit in CNY, then resend the payment request
400Cannot request payment: current status is "..."The order is no longer at unpaid — check the current payment_status
400Invalid platform ID formatRe-check product_ref / sku_ref
401JWT expiredGet a new token, see Authentication
403Calling an order that does not belong to your accountOnly act on orders you created yourself
404Order does not existRe-check the ORD... ID
422LINE_ITEM_SKU_NOT_RESOLVABLE (Taobao)sku_ref does not belong to the product — retrieve it again from the product details
429Rate limit exceededWait ~60 seconds then retry; space out your calls
5xxSystem error or the platform is temporarily unresponsiveRetry later; do not create a duplicate order. If it persists, send the Elim team the order ID (ORD...) and the time it occurred

Error responses have the form { statusCode, message, error }. message is sometimes in Vietnamese and can be shown directly to end users.