listTransactions
Syntax
listTransactions( from='-24h', to='now' , search=[], sort_by='date', sort_order='asc', $page_no=1, $page_size=1000 )
Returns a list of transactions (payments, returns, chargebacks).
The function will return all transactions where you get a commission for. This includes e.g. payments, refunds and chargebacks from joint venture sales.
If you only want to return transaction of your vendor or affiliate sales, use the parameter search[role] - see below.
Access rights
Read access or full access required.
Arguments
from – Point of time. Filters for creation date of the transaction. Example values are:
- “2014-02-28 23:11:24”
- "2021-10-08T07:20:11-05:00" (Iso 8601 format)
- “now” for now
- “-3d” for the point of time exactly before 3 days
- “start” for the first available date (that means the creation date of the Digistore24 account)
Default value for ‘from' is ‘-24h', so the point of time 24h ago
to – Point of time -see ‘from'
search – Array with the following possible elements:
- role: Search for purchases with a certain role. Possible values:
- vendor
- affiliate
- other
Separate multiple values by commas, e.g.:
search[role]=vendor,affiliate - product_id: Single product-ID or multiple product-ID's separated by comma. Finds purchases, where the main product fits those product-ID's.
- first_name
- last_name
- email: searches for buyers with this data Example: search[first_name]=helm finds purchases with buyer first name Wilhelm, Wilhelmine or Helmut
- has_affiliate: Boolean – searches for purchases with/without affiliate
- affiliate_name: search for the name of the affiliate
- pay_method: searches for purchases with single payment method or multiple payment methods. Multiple values are separated by comma. For the possible payment methods see api-function: getGlobalSettings() – there value of type[pay_method]
- billing_type: searches for purchases with single billing type (i.e. subscription, single payment). Multiple values are separated by comma. For the possible values see api-function: getGlobalSettings() – there value of type[search_billing_type]
- transaction_type: search by transaction type (payment, refund, chargeback, refund_request) Multiple values are separated by comma. For the possible values see API-function: getGlobalSettings() – there values of type[search_transaction_type]
- currency: searches for purchases with single currencies (i.e. EUR). For the possible values see api-function: listCurrencies().
- purchase_id: Searches purchases with this order-ID. Separate multiple order-ID's with commas.
Note: you probably want to use from=start, when using search criteria, because the search only happens in the defined timeframe.
sort_by – returns the sorting of the list. Possible values are:
- date (Standard) – sorted by date of the payment
- earning – sorted by amount of the earning
- amount – sorted by gross amount of the payment
The sort value "product_name" is deprecated and will be removed in the future.
sort_order – possible values are
- asc (Standard) – the sorting is ascending (that means the smallest value is at the beginning)
- desc – the sorting is descending (that means the biggest value is at the beginning)
page_no – Page number, that should be shown. The numbering starts with 1.
page_size – Number of entries on a page. Default is 500.
Return data
purchase_list: List with orders
For purchases, where you are the affiliate, the campaignkey, click_id and the sub_ids are also returned:
[click_id] => some_click_id
[sub_ids] => Array
(
[sid1] => a_sub_id
[sid2] => some_other_sub_id
[sid3] =>
[sid4] =>
[sid5] =>
)
An example of a complete data set:
Array
(
[api_version] => 1.020
[current_time] => 2018-02-16 20:47:05
[result] => success
[data] => Array
(
[from] => 2018-02-15 20:47:05
[to] => 2018-02-16 20:47:05
[page_size] => 3
[page_no] => 2
[page_count] => 2
[summary] => Array
(
[amounts] => Array
(
[EUR] => Array
(
[count] => 5
[total_amount] => 39.27
[vat_amount] => 6.27
[earned_amount] => 25.65
)
)
[count] => 5
)
[transaction_list] => Array
(
[0] => Array
(
[renew_url] => https://www.digistore24.com/renew/VAD38V67/FSW5BFN7
[receipt_url] => https://www.digistore24.com/receipt/20/BAD18V62/FSW5BFN7
[invoice_url] => https://www.digistore24.com/invoice/BAD18V62/0/FSW5BFN7.pdf
[are_customforms_filled_out] => N
[is_canceled_now] => N
[is_canceled_later] => N
[is_cancelable_now] => Y
[is_cancelable_later] => N
[can_cancel_before] =>
[vendor_name] => root
[vendor_email] => neise@digistore24.com
[salesteam_name] =>
[custom] =>
[other_amounts] => 0.00
[other_vat_amounts] => 0.00
[users_share] => 0.00
[vendor_id] => 1
[id] => 13197784
[amount] => 39.27
[currency] => EUR
[number_of_installments] => 0
[vat_country] => DE
[vat_amount] => 0.00
[vat_rate] => 0.00
[created_at] => 2018-02-15 22:18:32
[transaction_created_at] => 2018-02-15 22:19:03
[transaction_amount] => 0.00
[transaction_currency] => EUR
[transaction_pay_method] => test
[transaction_pay_method_msg] => Test-Zahlung
[buyer_id] => 5276572
[salesteam_id] =>
[main_product_id] => 20
[main_product_name] => Ihr Weg in die Selbstständigkeit
[merchant_name] => some_vendor
[affiliate_name] =>
[affiliate_id] => 0
[campaignkey] =>
[tracking_param] =>
[first_billing_interval] =>
[other_billing_intervals] =>
[have_rebilling] => Y
[is_refundable_now] => Y
[is_rebilling_stoppable_now] => Y
[billing_type] => single_payment
[billing_type_msg] => Einmalzahlung
[billing_status] => paying
[billing_status_msg] => Zahlungen aktiv
[commission_reason] => merchant_share
[commission_reason_msg] => Vendor-Anteil
[transaction_type] => payment
[transaction_type_msg] => Zahlung
[line_no] => 4
[can_see_order_details] => Y
[purchase_id] => BAD18V62
[earned_amount_of_transacation] => 0.00
[earned_amount_of_purchase] => 0.00
[affiliate_amount] => 0.00
[merchant_amount] => 0.00
[buyer] => Array
(
[id] => 5276572
[created_at] => 2018-02-15 22:18:32
[email] => michael@somedomain.de
[first_name] => Michael
[last_name] => Meier
)
)
[1] => Array
(
[renew_url] => https://www.digistore24.com/renew/VCERDWYK/3VBFSNKV
[receipt_url] => https://www.digistore24.com/receipt/20/VCERDWYK/3VBFSNKV
[invoice_url] => https://www.digistore24.com/invoice/VCERDWYK/0/3VBFSNKV.pdf
[are_customforms_filled_out] => N
[is_canceled_now] => N
[is_canceled_later] => N
[is_cancelable_now] => N
[is_cancelable_later] => N
[can_cancel_before] =>
[vendor_name] => some_vendor
[vendor_email] => neise@digistore24.com
[salesteam_name] =>
[custom] =>
[other_amounts] => 0.00
[other_vat_amounts] => 0.00
[users_share] => 25.65
[vendor_id] => 1
[id] => 13197785
[amount] => 39.27
[currency] => EUR
[number_of_installments] => 0
[vat_country] => DE
[vat_amount] => 6.27
[vat_rate] => 0.00
[created_at] => 2018-02-15 22:19:43
[transaction_created_at] => 2018-02-15 22:19:46
[transaction_amount] => 39.27
[transaction_currency] => EUR
[transaction_pay_method] => test
[transaction_pay_method_msg] => Test-Zahlung
[buyer_id] => 5276573
[salesteam_id] =>
[main_product_id] => 20
[main_product_name] => Ihr Weg in die Selbstständigkeit
[merchant_name] => some_vendor
[affiliate_name] =>
[affiliate_id] => 0
[campaignkey] =>
[tracking_param] =>
[first_billing_interval] =>
[other_billing_intervals] =>
[have_rebilling] => N
[is_refundable_now] => Y
[is_rebilling_stoppable_now] => Y
[billing_type] => single_payment
[billing_type_msg] => Einmalzahlung
[billing_status] => completed
[billing_status_msg] => Vollständigt bezahlt
[commission_reason] => merchant_share
[commission_reason_msg] => Vendor-Anteil
[transaction_type] => payment
[transaction_type_msg] => Zahlung
[line_no] => 5
[can_see_order_details] => Y
[purchase_id] => VCERDWYK
[earned_amount] => 25.65
[affiliate_amount] => 0.00
[merchant_amount] => 25.65
[buyer] => Array
(
[id] => 5276573
[created_at] => 2018-02-15 22:19:43
[email] => claus@somedomain.com
[first_name] => Claus
[last_name] => Smith
)
)
)
)
)