Check the payment status of the specified order, confirm if the order has been completed.
Points to note
- This interface uses the GET method
- Order ID parameter must be provided
- The user needs to log in for verification (to check if the order belongs to the current user)
- Return the payment status information of the order
- Only the current user's own orders can be queried
Request address
{ๅๅๅฐๅ}/api/payment/check
Description:{ๅๅๅฐๅ}Replace it with your domain name, such ashttps://en.anqicms.com/api/payment/check
Request Syntax
GET {ๅๅๅฐๅ}/api/payment/check
Request Headers
This interface also involves common request headers. For more information, please refer toCommon Request Headers (Common Request Headers).
Request parameters
| Field name | Type | Required | Description |
|---|---|---|---|
| order_id | string | Is | Order ID |
Response header
This interface only involves public response headers. For more information, please refer toCommon Request Headers (Common Request Headers).
Return parameters
| Field name | Type | Description |
|---|---|---|
| code | int | Error code |
| msg | string | Error description |
Usage Example
Request example
GET /api/payment/check?order_id=202211232209080046 HTTP/1.1
Host: www.anqicms.com
Response example (payment successful)
{
"code": 0,
"msg": "ๆฏไปๆๅ"
}
Example response (not paid)
{
"code": -1,
"msg": "ๆชๆฏไป"
}
error code
| Error code | Description |
|---|---|
| 0 | OK (order paid) |
| -1 | Error, the reason is in the msg (such as not paid) |
| 1001 | Not logged in |
| 1002 | Unauthorized (order does not belong to the current user) |
| 200 | API request OK |