Create a Report

This endpoint allows you to request the generation of specific report types. The response from this endpoint provides an object containing:

  • The status of the report generation.
  • A report id.

Use the report id to download the report using the Download a Report endpoint after it is generated.

POST/reports

Header Parameters

X-Organization-Codestringrequired

Organization code associated to the request.

Body application/json

type"PAYOUTS" | "PAYMENTS" | "TRANSACTIONS" | "SETTLEMENTS_FEES" | "RECONCILIATION_OVERVIEW" | "COMMUNICATIONS" | "SETTLEMENT_PAYOUTS"required

The type of the report to run (MAX 255; MIN 3). SETTLEMENT_PAYOUTS is available for merchants on WHITELABEL’s new reconciliation engine.

user_codestring

The user identifier to associate with the report request.

start_datestring<date-time>required

Starting timestamp of data to be included in the report run (MAX 24; MIN 24; ISO 8601).

end_datestring<date-time>required

Ending timestamp of data to be included in the report run (MAX 24; MIN 24; ISO 8601).

merchant_reference_idstring

The unique identifier of the report at the merchant side (MAX 255; MIN 3).

account_idstring

Account identifier(s). Omit to include all accounts. For multiple accounts, send a comma-separated list. For the Settlement Payouts report, this is matched against the provider account name and, for merchants on WHITELABEL’s new reconciliation engine, also against the WHITELABEL account through the settlement batch. Providers whose payouts arrive through a separate endpoint (for example Pagar.me) return no rows when filtered this way.
Example: 19d28762-c714-4fb0-9ef6-4e1953ed334b, 91d82267-c714-4fb0-9ef6-4e1953ed334b

acquirerstring

Filters the Settlements report by acquirer. Accepts a single value (case-insensitive; conventionally uppercase). For the Settlement Payouts report, this filter accepts a comma-separated list of values, in uppercase.
Example: BAC_CREDOMATIC

provider_idstring

For the Settlement Payouts report, filters the rows by provider. Comma-separated list, values in uppercase.
Example: ADYEN,CIELO

payment_statusstring

The status of the payment (MAX 255; MIN 3; Payment status). Don’t send this parameter to request the creation of a report for all payment status. Otherwise, indicate all the status you want to include.
Example: CREATED,READY_TO_PAY,DECLINED

payment_sub_statusstring

The substatus of the payment (MAX 255; MIN 3; Payment substatus). Don’t send this parameter to request the creation of a report for all payment sub status. Otherwise, indicate all the sub status you want to include.
Example: READY_TO_PAY,PENDING_FRAUD_REVIEW,EXPIRED

payment_methodstring

The type of payment method selected by the customer (MAX 255; MIN 3; Payment methods). Don’t send this parameter to request the creation of a report for all payment methods. Otherwise, indicate all the methods you want to include.
Example: ADDI,ACUOTAZ,PIX

currencystring

The currency used to make the payment (MAX 3; MIN 3; ISO 4217). Don’t send this parameter to request the creation of a report for all currencies. Otherwise, indicate all currencies you want to include. For the Settlement Payouts report, filters by settlement currency (comma-separated list).
Example: ARS,BRL,COP

countrystring

The country where the transaction must be processed (MAX 2; MIN 2; ISO 3166-1). Don’t send this parameter to request the creation of a report for all countries. Otherwise, indicate all countries you want to include.
Example: AR,BR,CO

transaction_typestring

The transaction type (MAX 255; MIN 3; Transaction types). Don’t send this parameter to request the creation of a report for all transaction types. Otherwise, indicate all transaction types you want to include.
Example: PURCHASE,REFUND,VERIFY

transaction_statusstring

The status of the transaction (MAX 255; MIN 3; Transaction status). Don’t send this parameter to request the creation of a report for all transaction status. Otherwise, indicate all transaction status you want to include.
Example: SUCCEEDED,CREATED,EXPIRED

updated_at_startstring<date-time>

Starting timestamp of data to be included in the report run by updated date of operation (MAX 27; MIN 27; ISO 8601).

updated_at_endstring<date-time>

Ending timestamp of data to be included in the report run by updated date of operation (MAX 27; MIN 27; ISO 8601).

columnsstring

Columns to include (only for Payment, Transaction, or Settlement Payouts reports). See available fields in Report Fields. For the Settlement Payouts report, this parameter replaces the default column selection instead of extending it: to add an optional column you must also list every default column you want to keep.
Example: account_code,amount_value,card_category

metadata_fieldsstring

Columns to include (only if the merchant is exporting metadata fields). This option is exclusive to Transaction and Settlement reports.

Response

201

idstring
typestring
start_datestring
end_datestring
merchant_reference_idstring
created_atstring
updated_atstring
expires_atstring
statusstring

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/reports" \
  -H "Content-Type: application/json" \
  -H "X-Organization-Code: <X-Organization-Code>" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -d '{
  "type": "PAYOUTS",
  "user_code": "string",
  "start_date": "1970-01-01T00:00:00.000Z",
  "end_date": "1970-01-01T00:00:00.000Z",
  "merchant_reference_id": "string",
  "account_id": "string",
  "acquirer": "string",
  "provider_id": "string",
  "payment_status": "string",
  "payment_sub_status": "string",
  "payment_method": "string",
  "currency": "string",
  "country": "string",
  "transaction_type": "string",
  "transaction_status": "string",
  "updated_at_start": "1970-01-01T00:00:00.000Z",
  "updated_at_end": "1970-01-01T00:00:00.000Z",
  "columns": "string",
  "metadata_fields": "string"
}'
Response
{
  "id": "6d905149-b388-4522-8c0a-759fed1f39da",
  "type": "PAYMENTS",
  "start_date": "2023-07-01 00:00:00 +0000 UTC",
  "end_date": "2023-07-12 00:00:00 +0000 UTC",
  "merchant_reference_id": "payments_1",
  "created_at": "2023-07-12 20:10:30.311048496 +0000 UTC",
  "updated_at": "2023-07-12 20:10:30.311048496 +0000 UTC",
  "expires_at": "",
  "status": "IN_PROCESS"
}