history
Using history model methods a merchant can get:
- Billing history - method history.invoice
- The history of created incoming payment orders - method history.code
- The history of created outpayment orders - method history.payout
- The history of created currency convertation orders - method history.convert
- The history of created funds transfer orders - method history.transfer
- Merchant transactions history - method history.statement
- The history of merchant crypto addresses - method history.address
- The history of created Host-to-Host payments - method history.card_h2h
endpoint
Queries for the model's methods are sent to endpoint https://api.any.money/.
history.invoice
A method for displaying a list of invoice and payin type orders created by the merchant. The result is returned in the form of a sorted in the creation date descending list of orders of the invoice type. For each of them, a parameters representation is available.
Input method arguments
| Param | Required | Description |
|---|---|---|
| count | no | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| first | no | first object number in the method response sample. It begins the count argument counting. default="0" |
| in_curr | no | filter by the credit currency |
| out_curr | no | filter by the debit currency |
| payway | no | filter by the payment payway |
Caution!
If a payment system other than the typed merchant type is transmitted, the method will return empty orders list
Method response data
- count
- current responses sample size
- data
- invoice type orders representation array
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- in_curr and/or out_curr currencies are not found
- EParamInvalid
- wrong argument value transmitted
- EParamPaywayInvalid
- wrong payway transmitted
- EParamType
- incorrect argument data type
history.code
A method to display a list of incoming code payment orders linked to a merchant.
Search filters are combined by logical AND.
The result is returned in the descending form the creation date sorted list for coderedeem type orders with parameters representation.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| count | no | "100" | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| first | no | "25" | first object number in the method response sample. It is begins the count argument counting. default="0" |
| in_curr | no | "UAH" | filter by the credit currency |
| out_curr | no | "GBP" | filter by the debit currency |
| payway | no | "anycash" | filter by the payment payway |
Method response data
- count
- current responses sample size
- data
- coderedeem type order representations array
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- in_curr and/or out_curr currencies are not found
- EParamInvalid
- wrong argument value transmitted
- EParamPaywayInvalid
- wrong payway transmitted
- EParamType
- incorrect argument data type
history.payout
A method for displaying a list of out payment orders linked to a merchant.
Search filters are combined by logical AND.
The result is returned in the descending form the creation date sorted list of payout type orders with parameters representation.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| count | no | "38" | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| first | no | "10" | first object number in the method response sample. It is begins the count argument counting. default="0" |
| in_curr | no | "UAH" | filter by the credit currency |
| out_curr | no | "USD" | filter by the debit currency |
| payway | no | "anycash" | filter by the payment payway |
Method response data
- count
- current responses sample size
- data
- payout type order representations array
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- in_curr and/or out_curr currencies are not found
- EParamInvalid
- wrong argument value transmitted
- EParamPaywayInvalid
- wrong payway transmitted
- EParamType
- incorrect argument data type
history.convert
Method for displaying filtered currency convertation orders (convert type),
Search filters are combined by logical AND. If none of them is set, the method will return a list of merchant's convertation operations in all currencies.
The result is returned in the descending form the creation date sorted list for convert type orders with parameters representation.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| count | no | "199" | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| first | no | "03" | first object number in the method response sample. It is begins the count argument counting. default="0" |
| in_curr | no | "UAH" | filter by the credit currency |
| out_curr | no | "GBP" | filter by the debit currency |
Method response data
- count
- current responses sample size
- data
- convert type order representations array
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- in_curr and/or out_curr currencies are not found
- EParamInvalid
- first, count arguments wrong values
- EParamType
- transmitted wrong data type for first, count arguments
history.transfer
Method for displaying a list of funds transfer orders linked to a merchant.
Search filters are combined by logical AND.
The result is returned in the descending form the creation date sorted list of the transfer type orders with parameters representation.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| count | no | "100" | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| first | no | "13" | first object number in the method response sample. It is begins the count argument counting. default="0" |
| in_curr | no | "USD" | filter by the credit currency |
| out_curr | no | "UAH" | filter by the debit currency |
Method response data
- count
- current responses sample size
- data
- transfer type order representations array
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- in_curr and/or out_curr currencies are not found
- EParamInvalid
- first, count arguments wrong values
- EParamType
- transmitted wrong data type for first, count arguments
history.statement
Method for search and display funds movements at merchant accounts.
Search filters are combined by logical AND.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| begin | no | "123456789" | period start filter (timestamp). default="0" |
| count | no | "132" | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| curr | no | "UAH" | payment currency name |
| end | no | "234567890" | period end filter (timestamp). default="now" |
| externalid | no | "127" | filter by order's externalid parameter |
| filter_amount | no | ">123.4" | filter by the amount of funds movement with the condition operand. Possible operands: (+, -, <, <=, >, >=, =, !=). when only a number or a number with an operand is transmitted "+" or "-", a system uses logic "=". Operands "+" or "-" can be transmitted without an amount, it will mean only positive or negative values, accordingly |
| filter_fee | no | ">13.4" | filter by the fee for funds movement. In its currency with the condition operand. Possible operands: (+, -, <, <=, >, >=, =, !=). when only a number or a number with an operand is transmitted "+" or "-", a system uses logic "=". Operands "+" or "-" can be transmitted without an amount, it will mean only positive or negative values, accordingly |
| first | no | "32" | first object number in the method response sample. It begins the count argument counting. default="0" |
| group | no | "inpay" | order type filter (possible types: "inpay", "outpay", "convert") |
| ord_by | no | "amount" | sort objects ("amount" - by amount, "ctime" - by creation time, "mtime" - by modification time) |
| ord_dir | no | false | direction of sorting results, if transmitted ord_by: (false=high->low, true=low->high). default=false |
Feature of the begin, end argument's pair processing
For the begin argument a system will always assign the smaller value from the transmitted pair, and for the end it will always assign the largest. Regardless of the names they were transferred with
Method response data
Orders list in the JSON array fotmat
- count
- current responses sample size
- data
- founded objects representations in the JSON format
- amount - the sum of merchant balance change indicated in the account funds movement
- balance - balance state right after execution of requested funds movement
- ctime - creation time (timestamp) of funds movement at the merchant account
- curr - balance currency
- externalid - external order ID
- fee - fee amount in the balance currency
- model - the model, which the payment relates to
- oid - ID of the funds movement at the merchant's accounts
- other_curr - the currency of the order, according to which the funds movement at the merchant accounts is formed
- payway - payway name
- tp - order type, formed the funds movement at the merchant accounts
- masspay_lid - masspay ID, in case of a single payment it will be
null
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- curr currency is not present in a system
- EParamInvalid
- wrong argument value transmitted
- EParamType
- incorrect argument data type
- EStateCurrencyInactive
- curr currency is inactive (disabled)
history.address
Method returns a list of cryptoaddress direct replenishment orders and their parameters. The method's response contains only the replenishments orders were initiated by users not by the system (payin and autopayin types only).
Search filters are combined by logical AND.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| addr_id | yes | "4356" | cryptoaddress ID |
| begin | no | "123456789" | period start filter (timestamp). default = "0" |
| count | no | "99" | the size of the method responses sample (the value cannot exceed "200"). default = "20" |
| end | no | "234567890" | period end filter (timestamp). default = "now" |
| first | no | "5" | first object number in the method response sample. It begins the addresses JSON array and count argument counting. default="0" |
| out_curr | no | "USD" | results filter by the debit currency |
| status | no | "done" | filter by current order state ("unfinished", "done", "fail") |
| tp | no | "autopayin" | filter by order type ( "payin", "invoice" and "autopayin") |
Method response data
Orders list in the JSON array fotmat
- count
- current responses sample size
- data
- founded order representations in the JSON object format
- first
- number of the first order in the method responses sample
- page
- current responses page
- page_total
- total response pages
- total
- total orders found matching filters query
Exceptions
- EParamCurrencyInvalid
- transmitted out_curr is not found
- EParamInvalid
- first, count, begin, end, tp, status arguments wrong values transmitted
- EParamType
- addr_id, is_autoconvert, first, count, begin, end, status arguments wrong type data transmitted
- EStateCurrencyInactive
- transmitted out_curr is inactive (disabled)
history.card_h2h
Method for displaying a payments list of type card_h2h created by the merchant. The result returns as a payments list sorted in descending order by the creation date.
Input method arguments
| Param | Required | Type | Example | Description |
|---|---|---|---|---|
| count | no | str | "10" |
expected number of payments. The default is "20". Value cannot exceed "200" |
| currency | no | str | "UAH" |
payment currency |
| first | no | str | "5" |
payment number from which the count parameter starts. Default is "0" |
Method response data
| Param | Required | Type | Example | Description |
|---|---|---|---|---|
| account_amount | yes | str | "145.50" |
an amount credited to the merchant's account in the payment currency excluding fees |
| amount | yes | str | "150.75" |
amount of payment |
| ctime | yes | bigint | 1652701264396 |
payment creation time (timestamp) |
| currency | yes | str | "UAH" |
three-letter payment currency code (according to ISO 4217) |
| yes | str or null | "[email protected]" |
a payer's email specified while creating the payment. Will be null if email wasn’t specified | |
| externalid | yes | str | "1234567890" |
payment ID set by the merchant |
| fee_amount | yes | str | "5.25" |
fee amount in payment currency |
| lid | yes | int | 47893 |
payment ID in the AnyMoney system |
| merchant_payfee | yes | str | "0.55" |
a part of the total fee amount for the payment paid by the merchant. Value in the range [0..1] accurate to two decimal places |
| owner | yes | int | 26 |
merchant ID who created the deposit |
| status | yes | enum | "wait" |
current payment status, one of the following: wait, done, fail, expired |
| tp | yes | str | "card_h2h" |
payment type (will always be card_h2h) |
| acs_url | no | str | "https://any.money/form/uxcERpIwkYLicBZGHr6jczDcLnCgQQBd6yPEOQd8bV_wyrTbPo2q2YRwVaBtb_P6m4_R" |
a URL to which the payer should be redirected for 3DS authentication. Returns only for payment in wait status |
| card_mask | no | str | "582703******3202" |
a masked card number used for the payment. Returns only if the payment was successfully completed (status done) |
| card_token | no | str | "4929a4cf-c2иe-5da9-b210-161b553a03a8" |
a card token used for the payment. Returns only if the payment was successfully completed (status done) and if "return_card_token": true was specified while creating |
| ftime | no | bigint | 1655134605974 |
payment finalization time (timestamp). Returns only for finalized payments in statuses done, fail, expired |
Exceptions
- EParamType
- Invalid data type
- EParamCurrencyInvalid
- Invalid payment currency specified
- EParamInvalid
- Invalid value of the passed parameter