Alipay+ DocsAlipay+ Docs

getBillDetailUrlMPP Alipay+

POST /aps/api/v1/bills/getBillDetailUrl

The getBillDetailUrl API is used by the Mobile Payment Provider (MPP) to send a request to Alipay+ to get the URL with which the MPP redirects the user to the bill detail page rendered by the merchant. 

Note: In the following sections, the MPP is also known as PSP. For example, pspId refers to the ID that identifies an MPP. 

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Note:

Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:

  • If the data type of a field is Integer and its value is 20, set it as "20".
  • If the data type of a field is Boolean and its value is true, set it as "true". 

For optional parameters that are not required in your case, you can:

  • exclude it from the request body. 
  • set its value as null (without the double quotation marks).

Do NOT leave it empty by setting its value as ""; otherwise, an error might occur. 

Request parameters

authCode String  REQUIRED

The authorization code that is used by Alipay+ to construct the bill detail URL.  

More information about this field

  • Maximum length: 32 characters

referenceOrderId String  

The unique ID that is assigned by the merchant to identify an order.  

This parameter is required if the value of the paymentRequestId parameter is empty. 

More information about this field

  • Maximum length: 64 characters

referenceMerchantId String  

The unique ID that is assigned by Alipay+ to identify a merchant.

This parameter is required if the value of the paymentRequestId parameter is empty. 

More information about this field

  • Maximum length: 64 characters

paymentRequestId String  

The unique ID that is assigned by Alipay+ to identify a payment order.

This parameter is required if the values of the referenceMerchantId and referenceOrderId parameters are empty. 

More information about this field

  • Maximum length: 64 characters

Response parameters

result Result object REQUIRED

The result whether the MPP gets the bill detail URL.

For more information about how to handle the result of the getBillDetailUrl API, see the How to handle the result table in the More information section.

Show child parameters

acquirerId String  

The unique ID that is assigned by Alipay+ to identify an ACQP.  

This parameter is returned by Alipay+ if the value of the result.resultStatus parameter is S, which indicates that the MPP gets the URL successfully. 

More information about this field

  • Maximum length: 64 characters

pspId String  

The unique ID that is assigned by Alipay+ to identify an MPP.  

This parameter is returned by Alipay+ if the value of the result.resultStatus parameter is S, which indicates that the MPP gets the URL successfully. 

More information about this field

  • Maximum length: 64 characters

billDetailUrl String  

The URL with which the MPP redirects the user to the bill detail page rendered by the merchant.

This parameter is returned by Alipay+ if the value of the result.resultStatus parameter is S, which indicates that the MPP gets the URL successfully. 

More information about this field

  • Maximum length: 2048 characters
API Explorer

Request

Request Body

Response

Response Body

More information

How to handle the result

You might receive different results from Alipay+ . Follow the instructions below to handle the result.

result.resultStatus

result.resultCode

Request status

Actions

S

SUCCESS

The MPP gets the URL successfully.

Redirect the user to the bill detail page rendered by the merchant.

F

Multiple possible values exist, such as

ACCESS_DENIED,

PARAM_ILLEGAL, etc.

The MPP fails to get the URL.

Take actions according to the error message specified on the result.resultMessage parameter.

U

Multiple possible values exist, such as

UNKNOWN_EXCEPTION and

REQUEST_TRAFFIC_EXCEED_LIMIT.

The result whether the MPP gets the URL is in unknown status.

Use the same parameters to retry the getBillDetailUrl API request. It is recommended that you keep trying several times. If you keep receiving the same result indicating the unknown status, contact connect_support@service.alipay.com.

No result received after trying several times

The result whether the MPP gets the URL is in unknown status.

Contact connect_support@service.alipay.com.

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

Redirect the user to the bill detail page rendered by the merchant. 

ACCESS_DENIEDFAccess is denied.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue.

INVALID_CLIENTFThe client is invalid.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue.

INVALID_SIGNATUREFThe signature is invalid.

Check whether the public key, signed message, and signature algorithm are as expected.

KEY_NOT_FOUNDFThe key is not found.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue.

MEDIA_TYPE_NOT_ACCEPTABLEFThe server does not implement the media type that is acceptable to the client.

Use a media type that is accepted by Alipay+.

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTPS method.

Ensure the HTTP method is POST.

NO_INTERFACE_DEFFAPI is not defined.

Check whether the request URL is correct. Ensure that the endpoint of the called API is correct.

PARAM_ILLEGALFIllegal parameters. For example, non-numeric input, invalid date.

Check whether the request parameters, including the header parameters and body parameters, are correct and valid. For more information about the parameters of each API, see the Structure section of the specific API reference topic.

PROCESS_FAILFA general business failure occurred. Do not retry.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue.

REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.

Reduce the frequency of API calls.

UNKNOWN_EXCEPTIONUAn API call failed, which is caused by unknown reasons.

Try to recall the API.