Merchants can download historical statements through this API. The zip file contains 2 statements: transaction statement and settlement statement. To understand the content of the statements, please read Statement Parameters.
- PayBy immediately starts to generate the statement of the previous day at the settlement cut-off time (the default is 00:00) set by the merchant, usually within 10 minutes. It is recommended that merchants obtain the statements after half an hour.
- The currency of the amount involved in the statement is "Dirham".
The language in which the response message will be used, currently only English is supported.
Example value: en
Content-Type String Required
The media type. Required for operations with a request body. The value is
Example value: application/json
sign String Required
Requests should be signed using private-key cryptography. This allows the payment gateway to verify that an incoming request is really from your application.
Partner-Id String Required
The merchant id of your account.
Example value: 200001200101
requestTime Timestamp Required
If the request time is more than 15 minutes away from the current time, the request will be rejected. This parameter is used to prevent repeated requests for orders that should have been cancelled due to timeouts.
Example value: 1581493898000
statementDate String Required
The statement of which day you will download. Format: YYYYMMDD.
Example value: 20200120
There are two cases, succeed to obtain the file and fail to obtain the file.
If the request succeeded, the data will be returned as a compressed .zip file. If failed, the standard format of response will be returned.
Case1: Succeed to obtain the file
The file name.
The path to download the file.
Case2: Fail to obtain the file
sign String Required
When PayBy sends response, PayBy will use its own private key to sign the message, and the merchant uses PayBy 's public key to verify the signature. If the verification is passed, it proves that the response was sent by PayBy and not faked by others.
applyStatus Enum Required
The result of the request. The possible values are:
SUCCESS- Application successful.
FAIL- Application failed. Check the
msgfor exact reason.
ERROR- Application error. The signature verification failed. Please check whether the private key used for the signature and the public key uploaded on the PayBy portal are one key pair.
code String Required
Example value: 0
Description of this code.
No special meaning, PayBy internally used to locate the error.