close
    Contents

    Commissions Report

    Report Overview

    The Commissions Report is intended for our Partners to obtain an overview of their FlexCommissions payouts. Partners can get information relating to commissions being paid or that have been paid.

    Report Columns

    The response will be a JSON-formatted response which will consist of a collection of Commission records. The fields of each Commission are summarized in the table below.

    Field Description
    row_id The id of the commission
    payout_id The payout id of the commission
    amount Commission amount
    start_datetime Commission payout start date
    end_datetime Commission payout end date
    expected_settlement_date Expected date the Commission payout will be recieved by Partner
    statement_id The statement id associated with the payout
    status The status of the payout

    More detailed information about these fields can be found in our API specification which can be found at: https://dev.na.bambora.com/docs/references/payment_APIs/v1-0-5/

    Getting Started

    The Commissions Report API is accessed via the URL https://api.na.bambora.com/v1/reports/commissions

    In addition, you will need to use your Merchant ID and Reporting API Access Passcode from your Bambora Channel Partner account. See the "Authentication" section below for more details on how to generate your access passcode to use in the request to the Merchant Report API.

    API Requests

    Request Headers

    Requests to the merchant endpoint should include two request headers: a Content-type header with the value application/json and a Authorization header which is outlined in the next section.

    Authentication

    All requests to the Merchant Report require authentication in the form of an Authorization header. This header contains the value Passcode <YOUR API ACCESS PASSCODE> which is an encoded version of your Merchant ID and your Reporting API Access Passcode. Note that your Reporting API Access Passcode can be found in the Portal under administration > account settings > order settings.

    <YOUR API ACCESS PASSCODE> is created by concatenating your Merchant ID to your Reporting API Access Passcode (separated by a colon), and then base 64 encoding the result.

    As an example, if your Merchant ID is 123456789, and your Reporting API Passcode is fd36d245a3584434b904096525547f17, then using Javascript your API Access Passcode could be generated by doing:

    merchantID = "123456789";
    reportingAPIPasscode = "fd36d245a3584434b904096525547f17";
    
    // base 64 encode the two values concatenated with a colon
    yourAPIAccessPassCode = btoa(merchantID + ":" + reportingAPIPasscode);
    

    In this example yourAPIAccessPassCode would be MTIzNDU2Nzg5OmZkMzZkMjQ1YTM1ODQ0MzRiOTA0MDk2NTI1NTQ3ZjE3 which is the value used when making a call to the Merchant Report API.

    Alternatively, for convenience, you can also use the form which does the same calculation.

    It is worth noting that while this process obfuscates/obscures your Reporting API Passcode it is not an encrypted value, so this value should be treated with equal sensitivity/security as your Reporting API Passcode itself.

    Parameters

    The Commissions Report can accept parameters to control the data returned by the endpoint: commissions, which is supplied as part of the URL

    If no parameters are passed the data returned will be for all the commissions of the Channel Partner requesting the report.

    Example

    An example request to get commission passing with parameters is illustrated below. All parameters are optional.

    Request

    curl --location --request GET 'https://api.na.bambora.com/v1/reports/commissions/?report_days=180&from_date=2022-09-14&to_date=2022-12-14&filter_by=status&filter_value=approved&start_row=1&end_row=4&version=2' \
    --header 'Authorization: Passcode <YOUR API ACCESS PASSCODE>' \
    --header 'Content-Type: application/json'
    

    Replace <YOUR API ACCESS PASSCODE> with your API passcode.

    If you wish to retrieve information for all of your commissions then the request would be:

    curl --location --request GET 'https://api.na.bambora.com/v1/reports/commissions' \
    --header 'Authorization: Passcode <YOUR API ACCESS PASSCODE>' \
    --header 'Content-Type: application/json'
    

    Response

    {
        "data": [
            [
                {
                    "row_id": 1,
                    "payout_id": 26,
                    "amount": 1.15,
                    "start_datetime": "2022-01-08T08:00:00",
                    "end_datetime": "2022-11-28T07:59:59",
                    "expected_settlement_date": "2022-12-08T00:00:00",
                    "statement_id": 1003119006,
                    "status": "Approved"
                },
                {
                    "row_id": 2,
                    "payout_id": 28,
                    "amount": 2.25,
                    "start_datetime": "2022-11-28T08:00:00",
                    "end_datetime": "2022-12-02T07:59:59",
                    "expected_settlement_date": "2022-12-09T00:00:00",
                    "statement_id": 1003119006,
                    "status": "Approved"
                }
            ]
        ]
    }