Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleDisbursement Reconciliation Step 3 .1 - Create Entry and Output Buckets

Step 3 - Disbursement Entry Looping/Bucketing

1. Create Entry and Output Buckets

We will start by splitting our disbursemnetEntries into two “buckets”:

  1. EventEntries - This "bucket" will contain any disbursementEntry that is not associated with an entry (such as a rollover of funds) OR is an entry not associated with a fee and is tied to the triggering entry.

    1. Pull all disbursemnetEntries where disbursemnetEntry.entry is null ORdisbursemnetEntry.entry.isFee is 0. This can be done in a single API request or multiple:

      Multiple API Requests example:

      Code Block
      GET /disbursementEntries
      SEARCH entry[equals]=0
      
      OR
      
      GET /disbursementEntries
      SEARCH entry[isFee][equals]=0

      Single API Request example:

      Code Block
      GET /disbursementEntries
      SEARCH or[0][entry][equals]=0&or[0][entry][isFee][equals]=0

  2. FeeEntries- This "bucket" will contain any disbursementEntry that is associated with a fee that was triggered due to the originating event such as a fee related to a captured transaction.

    1. Pull all disbursemnetEntries where disbursemnetEntry.entry.isFee is 1

      Code Block
      GET /disbursementEntries
      SEARCH entry[isFee][equals]=1

We will also initialize three output “buckets” based on the different type of events:

  1. OutputTxnEvents

  2. OutputOtherFees

  3. OutputOther

Expand
titleDisbursement Reconciliation Step 3.2 1 - Loop through EventEntries
2

Step 3.1 Loop through EventEntries

We will loop through the EventEntries obtained in step 1 and add them to their proper “bucket” based on the EventTypeEvent Type. An entry is created and is a record of the movement of funds. In order to get details on the event itself such as the transaction that triggered the capture or refund fee we will want to reference the disbursementEntries.entry

The EventType Event Type will be based on the disbursemnetEntry.event.

In this example, we provide an example of how to get detailed event data.

EventType Event Type = 7 (Capture) or 21 (ECSale)

You can get the full transaction data by expanding the eventId within the entry or by querying the txns endpoint with the transaction associated with the disbursement.entry.txn.

Expanding the EventId:

Code Block
GET /entries?expand[eventId][]

Querying Txn Endpoint:

Code Block
GET txns
Search: id[equals]=<disbursementEntry.entry.txn>

Using the data collected from disbursementEntries in '1 EventEntries' and the transaction data pulled above this will need to be pushed to an OutputTxnEvents “bucket”:

Entry

Description

Fields

Event ID

The event that triggered the movement of funds and is associated with the disbursementEntry.

disbursemnetEntry.eventId

Event Type

The type of event that triggered the event (i.e - Capture, ECSale, etc.)

disbursemnetEntry.event

Event Amount

The total amount of the disbursementEntry, this is displayed to the cent in the API. (e.g - 500 = $5.00)

disbursemnetEntry.amount

Txn ID

The transaction associated with the disbursementEntries.entry.txn that triggered the event.

txn.id

Txn Amount

The transaction approved amount. This can differ from the txn.total such as in the event of a partial approval or partial reversal.

txn.approved

Txn Cardholder

The cardholder name that initiated the transaction. This is only populated if supplied on the transaction or associated with a customer such as if a transaction.

txn.first + txn.last

Fee Amount

This is a placeholder for fees associated with the transaction, which will be retrieved in Step 3: Loop through FeeEntries.

0

Event Net

The net amount of the event that moved funds and created a disubursementEntry.

disbursemnetEntry.amount

Note

A fee on a txn resource is only populated if the fee was submitted on the initial transaction. This field txns.fee is used for reporting purposes and is not charged on the transaction unless a Fee Listener is set up. For more information on a Fee Listener please reference this document: How to Create & Configure Custom Fees

Traditional fees set up in the system will always be represented as an entry associated with the txn.

EventType Event Type = 8 (Refund) or 22 (ECRefund)

Similar to above to get data for refunds you will get the transaction details associated with the entry by expanding the eventId or querying the txn endpoint using the transaction associated with the disbursementEntries.entry.txn. Additionally, we will expand the related transaction forTxn, which is the original transaction that is being refunded.

Expanding the EventId:

Code Block
GET /entries?expand[eventId][fortxn][]

Querying Txn Endpoint:

Code Block
GET txns?expand[fortxn][]
Search: id[equals]=<disbursemnetEntry.entry.txn>

Using the data collected from disbursementEntries in ‘1 EventEntries’ and the transaction data pulled above this will need to be pushed to the OutputTxnEvents bucket:

Entry

Description

Fields

Event ID

The event that triggered the movement of funds and is associated with the disbursementEntry.

disbursemnetEntry.eventId

Event Type

The type of event that triggered the event (i.e - Capture, ECSale, etc.)

disbursemnetEntry.event

Txn ID

The transaction associated with the disbursementEntries.entry.txn that triggered the event.

txn.id

Txn Amount

The total amount of the disbursementEntry, this is displayed to the cent in the API. (e.g - 500 = $5.00)

disbursemnetEntry.amount

Txn Cardholder

The cardholder name that initiated with the original transaction and is associated with the refund transaction. This is only populated if supplied on the transaction or associated with a customer such as if a transaction.

txn.first + txn.last or txn.fortxn.first + txn.fortxn.last

Fee Amount

This is a placeholder for fees associated with the transaction, which will be retrieved in Step 3: Loop through FeeEntries.

0

Event Net

The net amount of the event that moved funds and created a disubursementEntry.

disbursemnetEntry.amount

EventType Event Type = 11 (Chargeback) or 20 (Arbitration)

Similar to a transaction in order to get all the information related to a chargeback, and not just the details of the entry, we will expand the eventId or query the chargebacks endpoint using the chargeback associated with the disbursement.entry.chargeback.

Expanding the EventId:

Code Block
GET /entries?expand[eventId][txn][]

Querying Txn Endpoint:

Code Block
GET chargebacks?expand[txn][]
Search: id[equals]=<disbursementEntry.entry.chargeback>

Using the data collected from disbursementEntries in ''1 EventEntries and the chargeback data pulled above this will also need to be pushed to the OutputTxnEvents bucket:

Event

Description

Fields

Event ID

The event that triggered the movement of funds and is associated with the disbursementEntry.

disbursementEntry.eventId

Event Type

The type of event that triggered the event (i.e - Chargeback.)

disbursementEntry.event

Event Amount

The total amount of the disbursementEntry, this is displayed to the cent in the API. (e.g - 500 = $5.00)

disbursementEntry.amount

Txn ID

The transaction associated with the disbursementEntries.entry.chargeback that was issued a chargeback.

chargeback.txn.id

Txn Amount

The transaction approved amount for the original transaction issued the chargeback.

chargeback.txn.approved

Txn Cardholder

The cardholder name that initiated with the original transaction and is associated with the transaction that was issued the chargeback.

chargeback.txn.first + chargeback.txn.last

Fee Amount

This is a placeholder for fees associated with the chargeback, which will be retrieved in Step 3: Loop through FeeEntries.

0

Event Net

The net amount of the event that moved funds and created a disubursementEntry.

disbursemnetEntry.amount

Other EventTypeEvent Type

For any EventType Event Type that is not listed within EventEntries above, we will push to an OutputOther “bucket”. These can be grouped by event type.

  • Event Type: disbursemnetEntry.event

  • Event Net: disbursemnetEntry.amount

Expand
titleDisbursement Reconciliation Step 3.2 - Loop through FeeEntries

Step 3.2: Loop through FeeEntries

Now we will loop through the disbursementEntries collected from Step 2 FeeEntries and add them to the proper “bucket” based on the disbursemnetEntry.event. In order to get information such as the txn that triggered the interchange or associated with the chargeback we will want to reference the disbursementEntry.entry.originalEventId.

The originalEventID associated with an entry is a reference to the underlying event that triggered the money movement. These are primarily used for events where the entry.eventId points to a related record (such as an assessment for an interchange entry) but does not indicate the original event that triggered the assessment (i.e - The transaction that triggered the assessment and then the interchange fee schedule).

These will be events 13 (assessments), 26 (profit share), & 47 (entry refund).

In this example, we provide an example on how to get detailed event data.

Info

In the future adding ?expand[originalEventId][] to the request will get all the details in a single API call. At this time you will need to obtain the originalEventId and then query the associated endpoint.

EventType Event Type = 13 (Interchange)

In order to get data on assessments and find the original transaction, you will reference the disbursement.entry.originalEventId. You can also expand the eventId to get information on the assessment.

Getting Data on the Assessment:

Expanding the EventId:

Code Block
GET /entries?expand[eventId][]

Querying Assessments Endpoint:

Code Block
GET assessments
Search: id[equals]=disbursemnetEntry.eventId

Finding Original Transaction:

Code Block
GET txns
Search: id[equals]=<disbursementEntry.entry.originalEventId>

In the assessments endpoint if the entry.originalEventId or assessment.eventId matches a transaction ID obtained when creating the OutputTxnEvent bucket, then you should increment the FeeAmount and EventNet for the record created by the disbursementEntry.amount.

If the assessments.eventId does not equal a transactional event retrieved in Step 2 then this should be pushed to the OutputOtherFees “bucket”.

Entry

Description

Fields

Entry ID

The event that triggered the movement of funds and is associated with the disbursementEntry.

disbursemnetEntry.entry.id

Event Type

The type of event that triggered the event (i.e - Fee.)

disbursemnetEntry.event

Event ID

The ID of the event that triggered the assessment event.

assessment.eventId

Amount

The negative amount that made up the assessment total that was incurred

disbursemnetEntry.amount

Event Net

The net amount of the event that moved funds and created a disubursementEntry.

disbursemnetEntry.amount

EventType Event Type = 6 (Auth), 7 (Capture), 8 (Refund), 11 (Chargeback), 20 (Arbitration), 21 (ECSale), 22 (ECRefund), 23 (ECReturn), 24 (Settlement)

Similar to the above if any of the fees associated to these events match a transaction ID obtained when creating the OutputTxnEvents bucket, then increment If disbursemnetEntry.eventId matches the EventId of an element in the OutputTxnEvents bucket, then you should increment the FeeAmount and EventNet for the record created by the disbursementEntry.amount.

If not the fees do not equal a transactional event retrieved in Step 2 then this should be pushed to the OutputOtherFees bucket.

Event

Description

Fields

Entry ID

he event that triggered the movement of funds and is associated with the disbursementEntry.

disbursemnetEntry.entry.id

Event Type

The type of event that triggered the event (i.e - Transaction, Chargeback, etc.)

disbursemnetEntry.event

Event ID

The ID of the event that triggered the fee event.

disbursemnetEntry.eventId

Amount

The negative amount that made up the fee total that was incurred.

disbursemnetEntry.amount

Event Net

The net amount of the event that moved funds and created a disubursementEntry.

disbursemnetEntry.amount

Other EventTypeEvent Type

Any other fee not associated to the EventTypes Event Types listed above should be pushed to the OutputOtherFees bucket:

Event

Description

Fields

Entry ID

The event that triggered the movement of funds and is associated with the disbursementEntry.

disbursemnetEntry.entry.id

Event Type

The type of event that triggered the event (i.e - boarding, NOC, etc.)

disbursemnetEntry.event

Event ID

The ID of the event that triggered the fee event.

disbursemnetEntry.eventId

Amount

The negative amount that made up the fee total that was incurred.

disbursemnetEntry.amount

Event Net

The net amount of the event that moved funds and created a disubursementEntry

disbursemnetEntry.amount

...