# 08. Webhook

# 1 Setting

# Webhook Configuration Requirements

# 1. Protocol Requirements
  • Supported Protocols: HTTPS
  • Encryption: TLS 1.2 or TLS 1.3 recommended for secure transmission
  • Request Method: POST
  • Content Type: Content-Type: application/json
# 2. Response Specifications
  • Success Status Code: 200 OK
  • Timeout: Response must be returned within 3 seconds
    (Avoid long-running or complex business logic to ensure prompt response)
  • URL Validation: The callback URL must be a public HTTPS address. Local addresses such as localhost and 127.0.0.1 are not supported.
  • Failure Message: If URL validation fails, the message field will return the concrete reason directly.

# 1.1 Message Setting(POST)

# URL

https://developers.cjdropshipping.com/api2.0/v1/webhook/set

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/webhook/set' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "product": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "stock": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "order": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "logistics": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "makeup": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "privateOrder": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "dispute": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    },
                    "wallet": {
                        "type": "ENABLE",
                        "callbackUrls": [
                            "https://your-host/api2.0/"
                        ]
                    }
                }'
Parameter Definition Type Required Length Note
product Product Message object Y 200 Product Message Setting
- type Product Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
stock Stock Message object Y 200 Stock Message Setting
- type Stock Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
order Order Message object Y 200 Order Message Setting
- type Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
logistics Logistics Message object Y 200 Logistics Message Setting
- type Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
makeup Makeup Bill Message object N 200 Makeup bill message setting (created/canceled/paid notifications)
- type Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
privateOrder Private Order Message object N 200 Private order (SY order / private inventory order) message setting (status-change notifications)
- type Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
dispute Dispute Message object N 200 Dispute message setting (created / canceled / refused / refund completed / reissue agreed)
- type Message type string Y 200 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL
wallet Wallet Notification object N Wallet billing record notification setting (new records, amount or status changes). Only the account of the current token can be subscribed. We recommend setting it in a separate request: if it is sent together with other topics, a wallet error can fail the whole request or leave it only partly saved. See "6 Wallet Notifications" below
- type Message type string Y 20 ENABLE,CANCEL
- callbackUrls callback url string[] Y 1 Only one callback URL is supported, and it must be a reachable public HTTPS URL; also required when cancelling

Dispute messages cover less than the dispute query endpoints

Dispute messages are only pushed for disputes on orders that can be resolved to a store, whereas Query dispute messages / Reply dispute cover all disputes under your account.

As a result you may find a dispute that the API can read and reply to, but never delivers a webhook for. That is expected behaviour, not a delivery failure. Do not treat webhooks as a complete list of your disputes — reconcile periodically against the dispute list endpoint.

Also note that a new reply from CJ support does not trigger this message — it is only pushed when the dispute status changes. To detect "the other side replied", use the updateDate field returned by the dispute list endpoint.

# Result

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": true,
    "requestId": "97367e0f-cf3a-4c9b-acea-a36fb56f81b8",
    "success": true
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object interface data return
requestId requestId string 48 Flag request for logging errors
success whether the call succeeded boolean 1 true-success, false-failed

error

{
    "code": 1607001,
    "result": false,
    "message": "Please do not use domain names such as localhost, 127.0.0.1",
    "data": null,
    "requestId": "a18c9793-7c99-42f9-970b-790eecdceba2",
    "success": false
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object interface data return
requestId requestId string 48 Flag request for logging errors
success whether the call succeeded boolean 1 true-success, false-failed

# 2 Product Subscription

# 2.1 Subscribe Products(POST)

Subscribe specific products or enable subscribe-all mode for product/variant/stock webhook notifications.

Note: Subscribing specific products and subscribing all products are mutually exclusive.

  • If productIds is provided, only the specified products will be subscribed, and subscribe-all will be automatically disabled.
  • If only subscribeAll=true is provided (without productIds), all previously subscribed specific products will be cleared.

subscribeAll Restriction

  • Before July 2026, only users registered before June 2026 may subscribe to all products(subscribeAll=true)
  • After July 2026, subscribeAll=true will no longer be available for any user; you must specify product IDs to subscribe

# URL

https://developers.cjdropshipping.com/api2.0/v1/webhook/product/subscribe

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/webhook/product/subscribe' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "productIds": ["1952652478987366401", "1952652478987366402"],
                    "subscribeAll": false
                }'
Parameter Definition Type Required Length Note
productIds Product ID list string[] N max 100 Product IDs to subscribe. Cannot exceed subscription limit based on user level
subscribeAll Subscribe all products boolean N true=enable all products subscription, false=disable. Mutually exclusive with productIds

# Result

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": {
        "successProductIds": ["1952652478987366401"],
        "failProductIds": ["1952652478987366402"],
        "subscribeAll": false
    },
    "requestId": "97367e0f-cf3a-4c9b-acea-a36fb56f81b8",
    "success": true
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object
- successProductIds Successfully subscribed product IDs string[]
- failProductIds Failed product IDs (already subscribed, not exist, etc.) string[]
- subscribeAll Whether all-products subscription is enabled boolean
requestId requestId string 48 Flag request for logging errors
success whether the call succeeded boolean 1 true-success, false-failed

error

{
    "code": 1606010,
    "result": false,
    "message": "Product webhook is not enabled",
    "data": null,
    "requestId": "a18c9793-7c99-42f9-970b-790eecdceba2",
    "success": false
}

Error Codes:

Code Message
1606010 Product webhook is not enabled
1606011 Subscription limit exceeded
1606012 Product is not subscribable
1606013 Product subscription failed

Subscription Limits by User Level:

Level Max Subscriptions
lv1 1000
lv2 2000
lv3 3000
lv4 5000
lv5 10000

# 2.2 Unsubscribe Products(POST)

Remove specific products from the subscription list.

# URL

https://developers.cjdropshipping.com/api2.0/v1/webhook/product/unsubscribe

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/webhook/product/unsubscribe' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "productIds": ["1952652478987366401", "1952652478987366402"]
                }'
Parameter Definition Type Required Length Note
productIds Product ID list string[] Y max 100 Product IDs to unsubscribe

# Result

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": true,
    "requestId": "97367e0f-cf3a-4c9b-acea-a36fb56f81b8",
    "success": true
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data boolean 1 true=success
requestId requestId string 48 Flag request for logging errors
success whether the call succeeded boolean 1 true-success, false-failed

# 2.3 Query Subscribed Products(GET)

Query the list of subscribed products with pagination support.

# URL

https://developers.cjdropshipping.com/api2.0/v1/webhook/product/subscribe/list

# CURL

curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/webhook/product/subscribe/list?pageNum=1&pageSize=20&sku=CJJJJTJT00784&shopId=123456' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Parameter Definition Type Required Length Note
pageNum Page number int N Default: 1, min: 1
pageSize Page size int N Default: 20, min: 1, max: 200
sku Product SPU string N 21 Optional filter by SPU
productId Product ID string N 50 Optional filter by product ID
shopId Shop ID string Y Must be one of your own stores (or a store authorized to you). Another user's store, or a store that does not exist, returns 1600006

# Result

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": {
        "pageSize": 20,
        "pageNumber": 1,
        "totalRecords": 50,
        "totalPages": 3,
        "content": [
            {
                "productId": "1952652478987366401",
                "sku": "CJJJJTJT00784",
                "productName": "Wireless Bluetooth Headphone",
                "productImage": "https://cdn.cjdropshipping.com/xxx.jpg",
                "status": true,
                "reason": null,
                "createAt": "2026-04-01 10:30:00"
            }
        ]
    },
    "requestId": "97367e0f-cf3a-4c9b-acea-a36fb56f81b8",
    "success": true
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object Pagination wrapper
- pageSize Items per page int
- pageNumber Current page int
- totalRecords Total item count int
- totalPages Total page count int
- content Product list array
-- productId Product ID string 50
-- sku Product SPU string 21
-- productName Product name string
-- productImage Product image URL string
-- status Subscription status boolean true=active, false=inactive
-- reason Inactive reason string 255 e.g. "Product delisted"
-- createAt Subscription time string Format: yyyy-MM-dd HH:mm:ss
requestId requestId string 48 Flag request for logging errors
success whether the call succeeded boolean 1 true-success, false-failed

# 3 Notification Rules

# 3.1 Product/Variant Notification Filtering

When a product or variant changes, the webhook notification is sent based on user's subscription:

  1. If user has subscribeAllProducts=true → notification is sent
  2. If user has subscribed the specific product → notification is sent
  3. Otherwise → notification is skipped

# 3.2 Stock Notification Filtering

Stock change notifications follow the same product subscription filtering rules. Only users who subscribed the corresponding product will receive stock change notifications.

# 3.3 Auto-Close Mechanism

  • Webhook success/failure counts are recorded per hour per topic
  • If the success rate in each of the previous 2 complete hours is below 80% (configurable), the webhook topic will be automatically closed
  • Auto-closed webhooks require manual re-activation
  • Close reason is recorded in the system

# 3.4 Private Inventory Outbound Order Notification

Private inventory outbound orders reuse the Order message (ORDER) topic; once the order webhook is enabled you receive them without a separate subscription:

  • A messageType=INSERT message is pushed when the private inventory outbound order is created (regular orders are not pushed on INSERT);
  • Subsequent status/payment/shipment changes are pushed as UPDATE, same as regular orders;
  • The order message params carries privateOutboundOrder=true for these orders, false for regular orders;
  • For the order message body fields, see Start - Webhook Order message.

# 3.5 Trigger Points by Topic

The tables below list when you will receive a push for each topic. Changes that are not listed (internal fields, version columns, statistics columns, etc.) do not trigger a push.

Delayed merge

Product, variant, stock and logistics use delayed merged delivery: multiple changes to the same record inside a merge window are combined into a single message instead of one message per change. The current window is about 2 minutes for product/variant and about 5 minutes for stock/logistics (a server-side tuning parameter that may change — do not rely on its exact value). Order, makeup bill, private order and wallet are pushed in real time.

# product

Trigger type messageType
Product created PRODUCT INSERT
Key product fields changed, and the product is still pending-listing / approved PRODUCT UPDATE
After the change the product is no longer pending-listing / approved (delisted, rejected, removed, etc.) PRODUCT DELETE
Variant created VARIANT INSERT
Key variant fields changed, and the variant is on sale VARIANT UPDATE
After the change the variant is no longer on sale VARIANT DELETE
  • "Key product fields" are: category, product name (CN/EN), SKU, main image, sell price, description, listing status, property 1/2/3, English property, supplier, product type, product visibility. Only these fields trigger a push; params.fields lists the field names that changed within the merge window.
  • "Key variant fields" are: variant English name, length, width, height, weight, image, sell price, spec value 1/2/3.
  • A variant change that only affects the sell price is currently not pushed (when no other key field changes together with the price); product-side platform-wide repricing campaigns are not pushed either. Use the query APIs as the source of truth for price.
  • A physical row deletion produces no push. DELETE means "this product/variant is no longer sellable to you", not that the record was deleted.
  • Product subscription filtering (see 3.1) is applied before the push.

# stock

Trigger type messageType
A variant stock record is created, or the stock quantity changes STOCK INCREASE
A variant stock record is deleted STOCK REDUCE
  • Only changes to variant, product, warehouse, available quantity and actual quantity trigger a push.
  • messageType only indicates the source event (insert/update vs delete); it does not indicate the direction of the stock change. Use storageNum per warehouse in the payload as the authoritative quantity.
  • Product subscription filtering (see 3.2) is applied before the push.

# order

Trigger type messageType
The order changes from incomplete to complete (successfully connected) ORDER ORDER_CONNNECTED
A private inventory outbound order is created ORDER INSERT
Order status, payment status, dispute, payment time, completion time, postage or outbound time changed ORDER UPDATE
Fulfillment status, production status or abnormal status of a store order changed ORDER UPDATE
Tracking number replaced, or manual re-push, for a store order ORDER UPDATE
  • Regular orders are not pushed on creation; only private inventory outbound orders push INSERT (see 3.4).
  • Order deletion is not pushed.

# logistics

Trigger type messageType
The logistics tracking record is created for the first time LOGISTIC INSERT
Tracking number, logistics channel, logistics status, tracking events or logistics service provider (trackingProvider) changed LOGISTIC UPDATE
  • Precondition: order number, logistics status and tracking number must all have a value; otherwise nothing is pushed.
  • A change of the internal version column alone is not pushed.

# makeup, privateOrder, wallet

The trigger points for these three topics are described in "4 Makeup Bill Message", "5 Private Order Message (PrivateOrder)" and "6 Wallet Notifications" below.

# 4 Makeup Bill Message

After subscribing, the following makeup-bill changes are pushed to the registered makeup callback URL:

messageType Trigger params.status
INSERT Makeup bill created CREATED
CANCEL Makeup bill canceled CANCELED
PAID Makeup bill paid (completed) PAID

# 4.1 Payload Example

{
    "messageId": "f3c2a1d09e8b4c5da6b7c8d9e0f1a2b3",
    "type": "MAKEUP",
    "messageType": "PAID",
    "params": {
        "orderId": "BT2606061320024499900",
        "relationOrderId": "SD2606060858539645300",
        "payOrderId": "2605260000000001",
        "amount": 12.35,
        "reason": "Postage difference",
        "type": 1,
        "diffUseType": 0,
        "status": "PAID",
        "createDate": "2026-06-04 10:00:00",
        "paymentDate": "2026-06-04 12:00:00"
    }
}

Order number notes: orderId is the makeup bill number, always BT-prefixed (e.g. BT2606061320024499900), same as orderCode in the makeup list; relationOrderId is the original CJ order being made up — its type depends on the original order (private inventory outbound SD…, dropshipping/direct, etc.) and can be used to look up the original order via the order query API.

Field Type Description
messageId string Unique message ID; use it as an idempotency key on the consumer side
type string Business type, always MAKEUP
messageType string INSERT created / CANCEL canceled / PAID paid
params.orderId string Makeup bill number, BT prefix, same as orderCode in the makeup list, e.g. BT2606061320024499900
params.relationOrderId string Original CJ order number being made up; type varies (private inventory outbound SD…, dropshipping/direct, etc.), e.g. SD2606060858539645300
params.payOrderId string Makeup payment order number (returned after payment)
params.amount number Makeup amount in USD
params.reason string Makeup reason (English)
params.type int 1 = makeup
params.diffUseType int 0=order makeup 1=Balance Top-up 2=Repayment 3=Transfer Shipping Fee
params.status string CREATED / CANCELED / PAID
params.createDate string Create time yyyy-MM-dd HH:mm:ss
params.paymentDate string Payment time (returned when PAID)

# 4.2 Signature Verification

The request carries a sign header: sign = Base64( HmacSHA256( secret = your openId string, message = raw JSON request body ) ). Compute HmacSHA256 over the raw body with your openId as the secret, Base64-encode it, and compare with the sign header.

# 4.3 Response Requirements

Same as other topics: return 200 OK within 3 seconds; failed pushes are not retried (messages are not resent); continuous failures trigger the auto-close mechanism (see 3.3).

# 5 Private Order Message (PrivateOrder)

After subscribing the privateOrder topic, status changes of private orders (SY order / private inventory order, order number prefixed with SY) are pushed to the registered callback URL. Only SY orders are pushed (dropshipping/deposit orders are excluded).

messageType Trigger
UPDATE SY order status changes (e.g. awaiting payment → paid → awaiting dispatch → dispatched → completed/canceled)

# 5.1 Payload Example

{
    "messageId": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
    "type": "PRIVATE_ORDER",
    "messageType": "UPDATE",
    "params": {
        "orderId": "SY2606061320024499900",
        "orderNumber": "shop_order_123",
        "status": "SHIPPED",
        "orderType": 2,
        "createDate": "2026-06-04 10:00:00",
        "paymentDate": "2026-06-04 12:00:00",
        "deliveryDate": "2026-06-05 09:00:00",
        "completeDate": null
    }
}
Field Type Description
messageId string Unique message ID; use it as an idempotency key on the consumer side
type string Business type, always PRIVATE_ORDER
messageType string UPDATE - status change
params.orderId string Private order number. Number rule: fixed SY prefix + 19-digit number (snowflake id), e.g. SY2606061320024499900
params.orderNumber string Store order number
params.status string Order status name, see 5.2
params.orderType int Order type: 2=stock-up (private inventory order / SY order). The private-order webhook currently only pushes SY orders, so orderType is always 2
params.createDate string Create time yyyy-MM-dd HH:mm:ss
params.paymentDate string Payment time (returned when paid)
params.deliveryDate string Dispatch (outbound) time (returned when shipped)
params.completeDate string Completion time (returned when completed)

# 5.2 status values

status Description
WAIT_PAY Awaiting payment
PAYMENT_INCOMING Payment incoming
PAID Paid, pending
WAIT_SHIPMENT Awaiting dispatch
INTERCEPTING / INTERCEPT Intercepting / intercepted
SHIPPED Dispatched
COMPLETED Completed
OVER Closed
CANCELLED Canceled
REFUND_COMPLETE Dispute refund completed
RESEND_OVER Dispute resend completed

# 5.3 Signature & Response

Same as other topics: sign = Base64( HmacSHA256( secret = your openId string, message = raw JSON request body ) ); return 200 OK within 3 seconds; failed pushes are not retried (messages are not resent); continuous failures trigger the auto-close mechanism (see 3.3).

# 6 Wallet Notifications

After you subscribe to the wallet topic, a notification is pushed to your registered wallet callback URL whenever a new billing record is created in your CJ wallet, or the amount or status of an existing record changes. The data comes from the same billing record table as My CJ → Wallet → Billing History, but notifications do not apply the page's type filtering or status mapping, so you may receive more records than the page shows (see 6.5).

messageType When
CREATED A new billing record is created
UPDATED The amount (amount, fee, balance before, balance after) or status of an existing record changes; changes to other fields are not pushed

# 6.1 How to subscribe

  • Add a wallet object to the "1.1 Message Setting" request body, in the same format as other topics (type + callbackUrls). type = ENABLE turns it on and CANCEL turns it off (case-insensitive); an unrecognized value is treated as cancel.
  • A wallet subscription belongs to the API account (openId) of the token you use, and can only be set with that account's own token. When the request contains wallet, the platform first checks that wallet notifications are available and that the token belongs to that account; if this check fails, the whole request fails and the other topics in the same request are not saved either. The errors are Wallet notifications are not enabled, Authenticated account is required and Wallet account ownership mismatch.
  • wallet is processed after the other topics in the same request: if the wallet part fails (callbackUrls is an empty array or contains only empty strings, the URL is invalid, or the URL test fails), the topics before it in the same request have already been saved; but if wallet has no callbackUrls, or its type is empty or longer than 20 characters, the whole request fails at parameter validation and nothing is saved.
  • When you enable or cancel it, the platform first sends a test message to your callback URL to check that it is reachable. It must return 200 OK within 3 seconds, otherwise the setting fails — so include the callback URL when cancelling too. The test message has messageId = wallet-registration-check, type = WALLET, messageType = CREATED, an openId at the top level, and only three fields in params: id (always test), currency and amount (0). It is not a real transaction: recognize it by messageId, return 200 and do not book it.
  • A successful setting takes effect within about 10 seconds.
  • If you have several API accounts, every account that has enabled the wallet subscription receives its own copy: same messageId, each signed with that account's openId. Real notifications do not contain the openId in the body, so if several accounts share one callback URL you cannot tell from the body which account a message belongs to. We recommend using a different callback URL for each account.

# 6.2 Payload Example

{
    "messageId": "5b0f3c2e-8a1d-3e4f-9c7b-2d6e8f1a4b3c",
    "messageType": "CREATED",
    "params": {
        "id": "2100000000000000001",
        "orderId": "SD2610230000000000001",
        "type": "4",
        "status": "1",
        "createDate": 1792742400000,
        "amount": 12.35,
        "feeAmount": 0.0,
        "balanceBefore": 120.5,
        "balanceAfter": 132.85,
        "currency": "USD",
        "eventTime": 1792742399000
    },
    "type": "WALLET"
}
Field Type Description
messageId string Unique message ID, generated from the message content; unchanged when the same message is delivered again. Use it as an idempotency key on the consumer side
messageType string CREATED - new record / UPDATED - amount or status changed
type string Business type, always WALLET
params.id string Billing record ID; the same as the id returned by "Query Billing History"
params.orderId string The related number recorded on the billing record; depending on the transaction type it may be an order number, a sub-order number, a dispute number, etc., so it cannot always be used to query an order. Omitted when there is none, and may be an empty string
params.type string Transaction type code (internal payment code, not the same code set as tradeType in "Query Billing History"); see 6.3
params.status string Record status: 0 Pending, 1 Success, 2 Failed, 3 Frozen, 4 Failed(Canceled), 5 / 6 Pending (withdrawal in progress); a payment cancelled by the customer is pushed as 2 (in Billing History, order payment, deposit, CJ PRIME and store purchase records then show Failed(Canceled))
params.createDate number Record creation time, UTC milliseconds; the same instant as createDate returned by "Query Billing History"
params.amount number Transaction amount in USD; the same as copeMoney in "Query Billing History" (all values observed so far are non-negative). Whether this record changed your wallet balance, and in which direction, is determined by comparing balanceBefore and balanceAfter; the transaction type code is only a reference
params.feeAmount number Fee, the raw value recorded on the billing record (all values observed so far are 0)
params.balanceBefore number Balance before the transaction, USD. It is the combined wallet balance recorded when the payment system wrote this record: for most records it is available + frozen + non-withdrawable + gift card balance, while some (such as wallet balance payments) also include the credit loan amount; the calculation differs by transaction. Same basis as Current Balance in Billing History and afterTransactionMoney in "Query Billing History", and different from amount returned by "Get Balance" (available balance only)
params.balanceAfter number Balance after the transaction, USD; same basis as balanceBefore
params.currency string Always USD
params.eventTime number When this change was written to the billing record, UTC milliseconds, second precision; for CREATED it is usually within 1 second of createDate, for UPDATED it is the time of this change

Fields in params that have no value (null) are omitted entirely; parse them as optional. Some records do not carry balances (e.g. payments made directly with PayPal, a bank card or other third-party channels, and refunds returned to them); balanceBefore and balanceAfter are then omitted. Do not calculate the balance by adding up the messages you receive — a message may be delivered more than once, or be missing if your callback failed. Messages are not guaranteed to arrive in order: the CREATED and UPDATED of one record may arrive in reverse order. Overwrite by params.id and keep the one with the later eventTime; for several changes within the same second, check the status and amount with "Query Billing History"; the API converts balances for records with a display currency and does not return internal types 10–16 (see 6.5).

# 6.3 Transaction Type Codes (params.type)

Code Meaning Shown in Billing History / "Query Billing History" API as
1 Top-up Top-up (tradeType 2)
2, 6, 9, 18, 19, 20, 29 Order payments (including resend shipping fee, bill payment, customization orders, problem parcels, etc.); 9 is also used when affiliate profit is withdrawn into the wallet (money in) Order Payment (1)
3 Withdrawal Withdrawal (6)
4 Order refund Order Refund (7)
5 Sold-out refund Order Refund: Sold Out (8)
7 Benefit Charging Benefit (4)
8 Balance deduction System Deduction (10)
17 Gift card top-up Top-up with Gift Card (3)
21 Deposit payment Deposit (5)
22 Deposit refund Deposit Refund (12)
23 System refund System Refund (9)
26 CJ membership CJ PRIME (13)
30 Order shipping cost payment Order Payment-Shipping Cost (14)
31 Paid sourcing Paid Sourcing (15)
32 Customization payment Paid Customization (16)
33 Freight payment Freight Payment (17)
34 Paid services Paid Services (18)
35 AI credits top-up AI Credits Top-up (19)
36 Credit loan Credit Loan (20)
37 Store sale Store Purchase (21)
10–16, 24, 25, 27, 28 Internal types No corresponding type; 10–16 are not shown in Billing History

When the payment method is system refund, Billing History shows the type name as System Refund, so params.type alone cannot fully restore the type name shown on the page.

# 6.4 Signature & Response

  • Same as other topics: sign = Base64( HmacSHA256( secret = your openId string, message = raw JSON request body ) ). Use the openId you received when you obtained the token for that API account (the body does not contain it).
  • Return 200 OK within 3 seconds; only 200 counts as success. Failed pushes are not retried (messages are not resent); continuous failures trigger the auto-close mechanism (see 3.3).
  • The same message may be delivered more than once (same messageId). Deduplicate by messageId and make your processing idempotent.

# 6.5 Filling Gaps and Reconciliation

To fill gaps, pull records by time range with the "Query Billing History" API. Records can be matched by id, but the two differ in these ways:

  • The API does not return internal types 10–16, and shows statuses 5 and 6 as 0;
  • The API does not return the fee or the balance before the transaction, so these two cannot be filled from it;
  • If the record carries a display currency, the API converts balances to that currency; notifications carry the original USD values;
  • For payments linked to an original order (such as makeup payments), the API returns the original order number as cjOrderId, while the notification's orderId is the number recorded on the billing record;
  • The API filters by record creation date; to catch later status changes of an older record, query by its creation date.