This document is intended for third-party developers (hereinafter referred to as: isv) or self-developed developers who access the refund and return API to develop Tmall merchant refund and return management functions. Merchant.
This document will cover API calling scenarios and precautions. The refund and return APIs of Tmall and the bazaar will be unified into a large set of interfaces open to the public; API permissions are applied through the certificate center, and the processing time is generally 5 Within working days.
2. Calling process
3. Refund status changes
The status of the refund order is OK The Status obtained in the Refund data structure will change according to the changes in the refund operation.
Regarding the changes in the refund order status, please refer to the Tmall refund and return process above. The following list is only for description. The existing refund order status:
API | ##Description | Description |
##WAIT_SELLER_AGREE | The buyer has applied for a refund and is waiting for the seller’s approval
| Status when the buyer submits the refund application
|
WAIT_BUYER_RETURN_GOODS
| The seller has agreed to refund and is waiting for the buyer to return the goods | When the refund application includes a return, the seller agrees to the return (Backend or taobao.rp.returngoods.agree) The status after |
## WAIT_SELLER_CONFIRM_GOODS | The buyer has returned the goods and is waiting for the seller to confirm receipt | Refund application Including returns, the status after the buyer uploads the return logistics information |
SELLER_REFUSE_BUYER | The seller refuses to refund | When the seller refuses to return the goods or refuses to refund the money |
SUCCESS | ##Refund successful | Status after the seller agrees to the refund operation in batches |
CLOSED | Refund Closed | The refund application times out or the status after the seller forces the shipment to apply for a refund for an unshipped order |
4. FAQ
1. Operation instructions for batch consent refund (taobao.rp.refunds.agree)
taobao.rp The .refunds.agree interface only allows sub-account authorized calls, and the market supports batches (within 20 transactions, total amount within 6,000), and Tmall supports within 30 transactions, with total amount within 10,000. This interface is divided into two stages. The first time without the Code parameter, the system will send the verification code to the mobile phone registered by the sub-account user represented by the current authorization. The second time with the Code parameter (the content of the parameter is the verification code), the consent is executed. If the refund payment operation is successfully called, the Alipay payment will be made directly to the buyer.
The sub-account currently used to call the API must authorize the refund operation permission in the sub-account background and set specific operation limits.
Input parameter refund_infos description
For the market, the information included is as follows: RefundId (refund order ID), Fee (refund amount), Version (obtained through Refund data structure)
For Tmall, the included data includes refund ID|its corresponding amount|corresponding version number list|refund stage (onsale\aftersale), where the amount is in units, and the ID and amount are separated by "|" symbols , multiple orders are separated by ","
Format:
RefundId1|Fee1|Version1|Refund_phase,RefundId2|Fee2|Version2|Refund_phase...
Example:
192242532288979|6000|12312|onsale,192242532298979|6000|32112|onsale
Determine whether the refund is successful
When success is true, not necessarily All are successful. ISV needs to get the results one by one to determine whether they are successful.
2. How to know whether there is a return?
Judged by Refund.has_good_return, true means both refund and return, false means only refund
3. How to obtain the refund_phase and refund_version of the refund order
You can query through The interface is obtained from Refund
4. What is the impact of the seller's operation of the refund order after the buyer modifies the refund application?
After the buyer modifies the refund application, the refund_version of the refund will change. The refund_version will be checked during the payment operation. During the operation, the Refund information of the specific refund order can be queried through the taobao.refund.get interface.
5. Tmall currently does not support the operation of refund messages;
6. Currently, it does not support the refund operation by calling the refund interface only once, because the interface call will directly make the payment. For Alipay, refunds must be completed by obtaining text messages for security reasons.
7. Currently, only the sub-account authorization operation is allowed for refund operation requirements, that is, using the SessionKey or AccessToken obtained through sub-account authorization to call taobao.rp.refunds.agree. How to use sub-account authorization reference:
//open.taobao.com/doc/detail.htm?spm=a219a.7386797.0.0.dXrNao&id=101141
Special attention and guarantee are required This sub-account has the authority points of Customer Service - Sales and After-sales Management - Refund Agree (the market requires Transaction Management - Sub-account Refund during Sales - Sub-account Refund Agree).
8. The sandbox does not support debugging of refund consent
9. The error_code list returned by the refund consent interface is:
Number | ##Meaning |
10000 | ##The second verification SMS was sent successfully
|
10001
| Failed to send two-step verification text message
|
10002
| Second verification code has been issued within 5 minutes before
|
10003 | ##Verification SMS code failed |
10004 | ##SMS verification code timeout (15 minutes)
|
10005
| ##No SMS verification code entered
|
10006
| Please get the verification code first |
20000 | The number of refund requests exceeds the limit |
20001 | The amount requested for refund exceeds the limit |
##30000 | Illegal refund number |
##30001 | Refund does not exist
|
30002 | Tmall order
|
40000 | ##Operation successful |
40001 | Operation failed |
40002 | Partial operation failed |
40003 | Operation failed system exception |
50000 | Non-sub-account |
##60000 | The refund form version has changed |
##60001
| The applied amount is inconsistent with the actual amount
|
##99999 | Other exceptions
| 5. Involving API
API document link:
//open.taobao.com/doc/api_cat_detail.htm?scope_id=11527&category_id=102
##API | ##Function Description |
##taobao.user.seller.get
| Query merchant Information
|
#taobao.refunds.receive.get Query the refund list |
| ##taobao.refund.get
Query a single refund |
#taobao.rp.returngoods.refuse | Reject return |
#taobao.rp.returngoods.agree
| Agree to return
|
#taobao.rp.returngoods.refill
| Tmall merchant backfills the refund logistics order number |
taobao.rp.refund.review | ##Refund order mark |
##taobao.refund.refuse
| Refuse Refund |
##taobao.rp.refunds.agree ##agree to refund in batches |
| ##FAQ
There is no FAQ about this document