Transactions

You can use data from the Transactions endpoints to calculate key metrics, such as:

  • Transaction volumes
  • Average transaction volume
  • Average transaction value
  • Returns
  • Payouts

Overview

Details of all financial transactions recorded in the commerce or point of sale system are added to the Transactions data type. For example, payments, service charges, and fees.

From the Transactions endpoints you can retrieve:

  • A list of all the transactions for a company:
    GET /companies/{companyId}/connections/{connectionId}/data/commerce-transactions.
  • The details of a specific transaction:
    GET /companies/{companyId}/connections/{connectionId}/data/commerce-transactions/{transactionId}.

Data model

Field

Type

Description

id

string

Identifier of the transaction, unique to the company.

totalAmount

decimal

Amount of the transaction in the base currency of the commerce or point of sale system.

currency

string
See currency

Currency of the transaction.

transactionSourceRef

reference type

Reference to an event that triggered a new transaction linked to the original, or source, transaction. For example, a card payment that pays for an order will be linked to that order.

type

string

Types of transaction:

  • Unknown

  • FailedPayout — Failed transfer of funds from the seller's merchant account to their bank account.

  • Payment — Credit and debit card payments.

  • PaymentFee — Payment provider's fee on each card payment.

  • PaymentFeeRefund — Payment provider's fee that has been refunded to the seller.

  • Payout — Transfer of funds from the seller's merchant account to their bank account.

  • Refund — Refunds to a customer's credit or debit card.

  • Transfer — Secure transfer of funds to the seller's bank account.

Note: the following types are available but are in the process of being deprecated. After August 31st 2021, only the types above will be available and any pre-existing data will be re-mapped to one of the above types.

  • Adjustment — Corrects or modifies a previous transaction.

  • Advance — Cash advance on the seller's future sales supplied by the payment provider.

  • AdvanceFee — Payment provider's fee on a cash advance.

  • AdvanceDownpayment — Repayment on the cash advance.

  • AdvanceFeeDownpayment — Repayment of the fee on a cash advance.

  • Cashback — Rebate given to the seller by the payment provider against payment fees.

  • FrozenFunds — Funds in the seller's merchant account that have been frozen by the payment provider.

  • InvoicePayment — Payment against an electronic invoice that has been sent to the customer, and is handled by the payment provider.

  • InvoicePaymentFee —Payment provider's fee for handling the payment processing for electronic invoices.

  • Referral — Payment that can be tracked back to a customer referral.

createdDate

string
See date

Date on which the transaction was first recorded in the commerce or point of sale platform.

modifiedDate

string
See date

Date the transaction was last updated in the Codat system.

sourceModifiedDate

string
See date

Date the transaction was last changed in the commerce or point of sale platform.

Example data

{
   "transactions":[
      {
         "id":"62fce855-4aff-41b0-8607-54e1cf4d35a4",
         "totalAmount":-18.42,
         "currency": "GBP",
         "type":"Refund",
         "transactionSourceRef":{
            "Id":"5bb8f0cb-168f-41ad-ab62-cd511a7e5282",
            "Type":"Order"
         },
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2019-05-28T00:44:17",
         "sourceModifiedDate":"2019-05-28T00:44:17"
      },
      {
         "id":"d499e1e4-4c99-4454-a121-e45513d1bf2c",
         "totalAmount":24.695,
         "currency": "GBP",
         "type":"Payment",
         "transactionSourceRef":{
            "id":"cced057a-8087-4f53-8645-5a54608b3136",
            "type":"Order"
         },
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2019-10-18T17:19:07",
         "sourceModifiedDate":"2019-10-18T17:19:07"
      },
      {
         "id":"23054bf1-20ec-43e0-95ad-582cc48dc013",
         "totalAmount":10.71,
         "currency": "GBP",
         "type":"Payment",
         "transactionSourceRef":{
            "id":"cced057a-8087-4f53-8645-5a54608b3136",
            "type":"Order"
         },
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2019-10-18T17:19:07",
         "sourceModifiedDate":"2019-10-18T17:19:07"
      },
      {
         "id":"bc478aeb-2e7c-461a-9465-0b7b96455b34",
         "totalAmount":17.59,
         "currency": "GBP",
         "type":"Payment",
         "transactionSourceRef":{
            "id":"383c8987-3ddb-407f-8efb-17019c9f6bdf",
            "type":"Order"
         },
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2020-11-09T18:25:48",
         "sourceModifiedDate":"2020-11-09T18:25:48"
      },
      {
         "id":"68ba5bef-0cc4-4f63-9d2f-002315d1e907",
         "totalAmount":12.76,
         "currency": "GBP",
         "type":"Payment",
         "transactionSourceRef":{
            "id":"383c8987-3ddb-407f-8efb-17019c9f6bdf",
            "type":"Order"
         },
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2020-11-09T18:25:48",
         "sourceModifiedDate":"2020-11-09T18:25:48"
      }
   ]
}

Did this page help you?