Getting payments
This page will show you how to get payments
Statements are a list of payments. For an explanation of the difference between payments and orders, see here.
This page explains how to get statements and has the following sections:
Orders can also be viewed from the orders section of our web app and you can create custom reports.
Getting the statement
You can get the account statement like this
curl {baseURL}/reports/yordexpay?accountId=yordex-pay-account-id
-H "Authorization:your-api-key"
-X GET
The accountId is mandatory. You will find how to get it here.
The following optional search parameters can be provided:
- startDate, endDate: to specify the date range; for example, &startDate=2021-10-01&endDate=2021-10-31 will return a statement for October
- cardId=card-id: will only return transactions for a specific card
- includeAccountTopUps=true: will include (true) or exclude (false) bank transfers into and out of the account
- includeCardTransactions=true: will include (true) or exclude (false) card payments
- includeTopUps=true: will include (true) or exclude (false) card top ups
The response looks like this
{
"content": [
{
"cardId" : "card-id",
"cardName": "VISA x6715",
"cardHolder": "user-id",
"cardHolderName": "John McAdams",
"customerUserId" : "customer-user-id",
"debitCredit": "DEBIT/CREDIT",
"amountInCents": 7869,
"currency": "GBP",
"date": "2021-09-19T18:11:04.624",
"sellerCompanyTradingName": "AMZNMktplace",
"description": "Printer for the office",
"orderType": "PO/EXPENSE",
"transactionId": "transaction-id",
"transactionStatus": "SETTLED/PENDING/DECLINED",
"settlementDate": "2021-09-19",
"balanceInCents": 583589,
"transactionNumber": 502,
"transactionSource": "CARD/ACCOUNT",
"mid": "merchant-id",
"mcc": "merchant-category",
"mccDescription": "merchant category description",
"orderId": "order-id",
"sellerId": "trader-id",
"eventId": "event-id",
"orderStatus": "APPROVED",
"eventStatus": "COMPLETED"
}
]
}
Let's look at this response in parts
The first few fields are copied from the card this payment was made on:
"cardId" : "card-id",
"cardName": "VISA x6715",
"cardHolder": "user-id",
"cardHolderName": "John McAdams",
"customerUserId" : "customer-user-id",
The next few fields have the payment information:
"debitCredit": "DEBIT/CREDIT",
"amountInCents": 7869,
"currency": "GBP",
"date": "2021-09-19T18:11:04.624",
debitCredit indicate if it was a payment (DEBIT) or refund (CREDIT).
The next few fields have information about who the payment was made to:
"sellerCompanyTradingName": "AMZNMktplace",
"description": "Printer for the office",
"orderType": "PO",
If the orderType is PO, the description will be taken from the order this payment is linked to.
If the orderType is EXPENSE, to suit accounting systems, the name of the retailer will be put in the description field and the name of the user who made the payment in the sellerCompanyTradingName.
The next few fields give housekeeping information about the transaction:
"transactionId": "transaction-id",
"transactionStatus": "SETTLED/PENDING/DECLINED",
"settlementDate": "2021-09-19",
"balanceInCents": 583589,
"transactionNumber": 502,
"transactionSource": "CARD/ACCOUNT",
The transactionId is a unique id for this transaction.
The transactionStatus indicates the status. A transaction is first PENDING before it becomes SETTLED. This settlement happens on the settlementDate. It can take 1 or 2 days for the transaction to be settled. If the transaction is DECLINED you will find the decline reason in the description field.
The balanceInCents is the balance of the account after this transaction. It will only be updated once the transaction is SETTLED. The transactionNumber is a consecutive number that you should use to order the transactions on a statement to make sure these balances display correctly.
The transactionSource indicates if it was a card payment (CARD) or bank transfer (ACCOUNT).
The next few fields give additional information about the merchant to whom the payment was made:
"mid": "mechant-id",
"mcc": "merchant category",
"mccDescription": "merchant category description",
mid stands for Merchant Identifier and is a unique identifier for this merchant. This field is defined by VISA or MASTERCARD. The mcc stands for Merchant Category Code and is a unique identifier for the type of merchant this is. This field is again defined by VISA or MASTERCARD. The mccDescription provides a human readable description of the mcc. More information about MIDs and MCCs can be found on the card rules page.
The last few fields provide information about the order that this payment is linked to:
"orderId": "order-id",
"sellerId": "trader-id",
"eventId": "event-id",
"orderStatus": "APPROVED",
"eventStatus": "COMPLETED"
This information is only provided for CARD transactions, not for ACCOUNT transactions.
Getting the account balance
How to get the account balance is described here.
Updated about 1 year ago