Skip to main content

Payments list

Swagger - detailed payment API.

Payments List Request Body Interface:

{
"publicKey": "string",
"hash": "string",
"fromId": "string", // optional
"take": "number", // optional
"type": "string", // optional: PAY_IN, PAY_OUT
"status": "string", // optional: PENDING, NEED_CHECK, FAILED, SUCCESS
"currencyCode": "string", // optional
"createdAtFrom": "number",
"createdAtTo": "number"
}

Table Describing All Fields in the Request Body:

FieldTypeRequiredDescription
publicKeyStringYesPublic key issued during merchant registration on the FirstPay platform (the key is provided as a file; the entire contents must be included).
hashStringYesEncoded request body string. For instructions on how to generate it, see the "Authorization" section.
fromIdUUIDNoKeyset pagination id.
takeNumberNoPagination take.
typeEnum: PAY_IN, PAY_OUTNoPayment type.
statusEnum: PENDING, NEED_CHECK, FAILED, SUCCESSNoPayment status.
currencyCodeStringNoCurrency code.
createdAtFromNumberYesTimestamp of the creation date interval from.
createdAtToNumberYesTimestamp of the creation date interval to.

Table of returned responses:

codeResponse bodyDescription
200PaymentsUpon a successful request, payments data is returned.
400{"error": "some text here..."}An error occurs if the request body and query parameters could not be parsed (most likely due to incorrect formatting).
401{"error": "NO_LOGIN"}An error occurs if the publicKey field is missing in the request body.
401{"error": "NO_TOKEN"}An error occurs if the hash field is missing in the request body.
401{"error": "NO_KEY"}An error occurs if an invalid publicKey is provided.
401{"error": "UNAUTHORIZED"}An error occurs if there is a validation error with the publicKey and hash.
404{"error": "NOT_FOUND"}An error occurs if the specified payment does not exist in the system.
500{"error": "some text here..."}An error occurs when the server fails to process the request due to an unexpected or non-standard situation.

Payments list Fields Description

The interface of the payments array element is similar to the payment interface.

Payments Interface:

{
"payments": [],
"total": "number",
"totalSucceed": "number",
"totalFailed": "number",
"amounts": [{
"total": "bigint",
"currencyCode": "string"
}],
"nextId": "string"
}

Table Describing All Fields:

FieldTypeDescription
paymentsArrayPayments array.
totalNumberPayments total count.
totalSucceedNumberSucceed payments total count.
totalFailedNumberFailed payments total count.
amountsArrayAn array of amount sums by currency.
totalBigIntAmount sum.
currencyCodeStringCurrency code.
nextIdStringId for fromId keyset pagination.