Order push configuration

5 min read

1. How to push orders

1. What is order push

Duomai Alliance supports the initiative to push the main traffic promotion effect orders to the main traffic platform.

2. Fill in the push address

After the traffic master accesses the Domai Alliance, fill in the "Order Push Address" on the Domai Alliance website and wait for review. Domicile Alliance will construct a test push during the review, so please fill in the push address correctly.
Log in to Domicel Alliance, My Tools-》Order Push Service (Version 2.0, as shown below). Enter the push address to receive the order in the push address input box of the corresponding media, and click "Submit".

3. Review the push address

After submitting the review, please wait patiently for the staff review, and contact customer service staff if necessary. Domicile Alliance will do a test push to verify the interface during the review.

If the push address is approved, Domic will push the order data in real time after the promotion effect order is generated (some special merchants do not support real-time return of orders, such as the next day, one hour, etc., please consult the docking media).
If the push fails, Duo Mai retries the push 3 times with an interval of 30 seconds.

Order push does not contain order product details. If you need order product details, you can initiate an "Order Details Query" request. View "Order Details" API document.
4. Schematic diagram of the push process

5. Matters needing attention
The status of Domic's initiative to push orders includes: create, confirm settlement, settlement, and invalid. When the above states occur, they will actively push to the main traffic platform.
The three statuses of confirmation settlement, settlement, and invalidation of Domic’s orders are currently marked with confirmation of settlement, settlement, and invalidation when the Domic’s alliance completes the settlement process through .

Example: IQIYI member CPS promotion, from order creation to settlement, the settlement order data is not updated in real time. IQIYI will provide Domai settlement order data in the following month. The merchant does not provide real-time order status information.

If the traffic owner needs the original order status (creation, payment, return, etc.) of the e-commerce platform, please use the Domai order details query API. Merchants that currently support real-time order status updates will have status updates, such as Jingdong and Taobao.

Two, push data

Domicile Alliance will initiate a Get request to the push address and send the order data in the form of request parameters. Each time an order is pushed, the push verification parameter checksum will be added to the parameters at the same time, see below for instructions.

1. Push parameter description

The parameters are all lowercase characters, and the parameter value is UTF8 encoding

ParameterDescription
idPush ID
ads_idPromotion Plan ID
ads_namePromotion plan name
site_idMedia ID
link_idPromotion plan link ID
euidFeedback tag value of the order
order_snOrder number
order_timeOrder Placement Time
orders_priceOrder amount, when the order status is 1 or 2, order_price represents the confirmed order amount
siter_commissionOrder commission, when the order status is 1 or 2, siter_commission means confirmation commission, other status values ​​are order estimated commission
currencyISO 4217 Alpha-3 Code: CNY, USD, etc
statusOrder Status -1 Invalid 0 Unconfirmed 1 Confirmed 2 Settlement View Order Status Description
checksumPush data verification parameters, checksum=MD5 (arranged in ascending order of the first letter of the parameters, "parameter value" spliced ​​string + interface key hash), the spliced ​​parameter values ​​do not include checksum and id parameter values ​​
2. Receiving request safety verification instructions

Request parameters may increase or decrease according to demand. For the receiver, we recommend verifying the checksum value. The verification logic and code examples are as follows:

After receiving the request

  1. First extract checksum, id
  2. Sort the remaining data according to the first letter of the array index
  3. Sort the array data according to value1 + value2 + value3 + . . . Concatenate in order to get string
  4. Verify that the checksum is equal to md5( string + hash)

PHP code example:

$hash =''; // interface key
$query = $_REQUEST;
$checksum = $query['checksum'];
$id = $query['id'];
unset($query['checksum'],$query['id']);
ksort($query);
$localsum = md5(join('', array_values($query)).$hash);

//If $localsum == $checksum is a legal push

Three, response requirements after receiving the request

If the push is successful, please output the following value from the receiver: 1 means that the push is successful and the order has been successfully placed in the warehouse. 0 means the push was successful, but the order already exists. -1 means push failed.
If the recipient does not feedback any data, we also consider the push to fail.

Fourth, review the test push of the push address

In order to review the validity of the filled-in interface, we will construct a test push during the review. The pushed data is as follows:

ParameterValue
ads_id0
ads_nameTest Activity
site_id0
link_id0
euid
order_sn0
order_time0000-00-00 00:00:00
orders_price0.00
siter_commission0.00
currencyCNY
status-1

After receiving the above information, please output 0 or 1 through the interface. By default, the interface does not receive data. For direct access, please output -1 or no output.