Charges

The charges object represents charges against transactions raised by a merchant acquirer. It includes details such as the booking reference, transaction details, and any associated metadata like card type and country.


Charge Model

Properties

  • Name
    booking
    Type
    object
    Description

    Details about the booking, including the Felloh booking ID and your reference.

  • Name
    charges
    Type
    object
    Description

    Details about the charges, including amount, currency, and rate.

  • Name
    metadata
    Type
    object
    Description

    Metadata related to the transaction, such as card type and country type.

  • Name
    transaction
    Type
    object
    Description

    The transaction model that the charge relates to.

<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;booking&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;ce9c7525-ec4e-44cd-a400-f2b6c8a5e1a9&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;ABC-1234&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;charges&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2013&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;rate&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;0.85&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;metadata&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;level&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;PERSONAL&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;card_type&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;DEBIT&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;country_type&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;DOMESTIC&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;payment_brand&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;MASTER&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;transaction&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;a9832728-0107-11ed-b939-0242ac120002&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">130808</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;completed_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-03-31T04:01:14.000Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-03-31T04:00:10.149Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Fetch All

This endpoint retrieves all charges associated with an organisation within a specified date range.

Parameters

  • Name
    organisationrequired
    Type
    string
    Description

    The organisation ID that you want to fetch charges for. You can find the organisation you have access to by using the List all organisations method.

  • Name
    date_from
    Type
    date
    Description

    The starting date for fetching charges, in ISO 8601 format.

  • Name
    date_to
    Type
    date
    Description

    The ending date for fetching charges, in ISO 8601 format.

  • Name
    skip
    Type
    integer
    Description

    Pagination offset - see the pagination section for details.

  • Name
    take
    Type
    integer
    Description

    Number of records to return - see the pagination section for details.

Returns

Returns an array of Charge Models

Request

POST
/agent/charges
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">post</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token" style="color:#ce9178">&#x27;https://api.felloh.com/agent/charges&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">organisation</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;X9876&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">date_from</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;2020-02-01&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">date_to</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;2021-05-10&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">skip</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">10</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">take</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">20</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Content-Type&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;application/json&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;ce9c7525-ec4e-44cd-a400-f2b6c8a5e1a9&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;ABC-1234&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;charges&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2013&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;rate&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;0.85&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;metadata&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;level&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;PERSONAL&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;card_type&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;DEBIT&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;country_type&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;DOMESTIC&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;payment_brand&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;MASTER&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;transaction&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;a9832728-0107-11ed-b939-0242ac120002&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">130808</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;completed_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-03-31T04:01:14.000Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2024-03-31T04:00:10.149Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>          </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;cdd40f5c-9d82-44c2-92e3-b5d2cad364f6&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;count&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">1</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>