Check if the order has been paid interface

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