> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# Settlements report

> A unified view of the transaction lifecycle and fees across providers, covering settlement amount, FX rate, and fee type.

export const DownloadSettlementsCSV = ({filename = "sample-settlements-report.csv"}) => {
  const handleDownload = () => {
    const data = `workspace_id,merchant_id,provider_name,acquirer,rovider_merchant_account,provider_payment_reference,created_at,settled_at,disbursed_at,timezone,provider_transaction_reference,other_transaction_references,transaction_type,fee_type,fee_details,decline_reason,transaction_currency,transaction_amount,settlement_currency,settlement_amount,fx_rate,transaction_amount_eur,settlement_amount_eur,reporting_currency,transaction_amount_reporting_currency,settlement_amount_reporting_currency,provider_customer_reference,payment_method,card_type,card_network,card_bin,card_issuer,card_issuer_country,card_issuer_region,provider_payout_reference,is_payrails,payrails_payment_id,payrails_execution_id,META
485e-a6835-407ec794a3as75-345645b,MERCHANT,checkout,checkout,Payrails Demo Inc.,ppr_000000000000,2025-07-27,2025-07-30,2025-08-04,UTC,ac993068-4773-4d1c-9eab-694f5c65fe3d,,capture,,,,USD,26.92360687,USD,26.92360687,1.023278952,24.76971832,24.76971832,EUR,24.76971832,24.76971832,a9afecf5-a54e-4650-9f36-bc0b1dacb832,card,credit,visa,478319,OTHER,Italy,Europe,ef18589e-0232-4caa-8b42-7a27dca9873d,FALSE,,,null
485e-a6835-407ec794a3as75-345645b,MERCHANT,checkout,checkout,Payrails Demo Inc.,ppr_000000000016,2025-08-21,2025-08-24,2025-08-27,UTC,b4f1c4c9-8ee7-476d-9104-a9866a66dd72,,capture,,,,USD,7.681506203,USD,7.681506203,1.185519683,7.066985706,7.066985706,EUR,7.066985706,7.066985706,60a83264-41ac-4eb6-945a-7309e2265193,card,debit,visa,175701,OTHER,OTHER,unknown,4613f97d-0a0c-4a18-ae9e-778b08e049f5,TRUE,pay_94d5d082638743e999ba39a1d517f0a6,exe_f1ec69e2f61b488eb96c49b5b0b74667,null
485e-a6835-407ec794a3as75-345645b,MERCHANT,checkout,checkout,Payrails Demo Inc.,ppr_000000000064,2026-01-31,2026-02-02,2026-02-12,Europe/Berlin,db4df67b-5530-4f5c-96f0-e0ae0de85d6e,,fee,acquiring,acquiring markup,,EUR,-0.01037655265,EUR,-0.01037655265,0.9903028507,-0.01037655265,-0.01037655265,EUR,-0.01037655265,-0.01037655265,78aee1fc-0bc4-43c0-bad1-4967e576659c,card,credit,visa,102919,OTHER,United Kingdom of Great Britain and Northern Ireland,UK,22c50e51-92a0-47b5-8007-c9780577e513,TRUE,pay_6f9c055fe2f645709c4f9eed3382e15e,exe_146b6546537f46719fdb0780c125a1dc,null
485e-a6835-407ec794a3as75-345645b,MERCHANT,checkout,checkout,Payrails Demo Inc.,ppr_000000000024,2025-10-04,2025-10-06,2025-10-12,UTC,5a0c7a7e-cf04-41f5-98ee-0c50559f810e,,fee,acquiring,scheme fee,,USD,-0.03468217234,USD,-0.03468217234,1.121862747,-0.03190759855,-0.03190759855,EUR,-0.03190759855,-0.03190759855,13f58911-aae8-4106-b512-2871499b1c43,card,debit,mastercard,398037,OTHER,OTHER,unknown,7027ed3e-d2f9-44e5-bf8e-89256aa50f3f,TRUE,pay_6b127efe0f274b1fa9be23da39a117e7,exe_73944d89e26c42a397b645778db8a232,null`;
    const blob = new Blob([data], {
      type: "text/csv;charset=utf-8;"
    });
    const url = URL.createObjectURL(blob);
    const a = document.createElement("a");
    a.href = url;
    a.download = filename;
    a.click();
    URL.revokeObjectURL(url);
  };
  return <span onClick={handleDownload} style={{
    cursor: "pointer",
    color: "#0066cc",
    textDecoration: "underline"
  }}>
    Download sample report
  </span>;
};

This report provides a unified, standardized view of the transaction lifecycle and fee structures for both orchestrator and non-orchestrator users. By mapping complex provider data into granular fields—including SETTLEMENT\_AMOUNT, FX\_RATE, and specific FEE\_TYPE categories—it offers full transparency into every movement of funds.

## Sample report

<DownloadSettlementsCSV /> (CSV file).

## Columns

| Column | Type | Description |
| :- | :- | :- |
| workspace\_id | VARCHAR | Workspace identifier mapped from the merchant, used for Payrails reporting. |
| merchant\_id | VARCHAR | Unique identifier of the merchant. |
| provider\_name | VARCHAR | Provider who processed the payment. |
| acquirer | VARCHAR | Acqurier which settled the payment. |
| provider\_merchant\_account | VARCHAR | The identifier of merchant account with a provider. |
| provider\_payment\_reference | VARCHAR | The provider payment identifier. |
| created\_at | TIMESTAMP | Date when transaction has been created. |
| settled\_at | TIMESTAMP | Date when transaction has been settled. |
| disbursed\_at | TIMESTAMP | Date when transaction has been disbursed to merchant. |
| timezone | VARCHAR | The timezone of date fields. |
| provider\_transaction\_reference | VARCHAR | The provider transaction identifier. |
| other\_transaction\_references | VARCHAR | Stringified JSON of additional PSP-specific identifiers |
| transaction\_type | VARCHAR | Type of transaction / money movement, values: capture, chargeback, fee, partial capture, payout, payout returned, refund. |
| fee\_type | VARCHAR | Fee category for transaction type fee, values: paypal fee, scheme fee, interchange, psp add-on, processing fee, chargeback. |
| fee\_details | VARCHAR | Fee details for transaction type fee. |
| decline\_reason | VARCHAR | Reason why the transaction was not processed successfully. |
| transaction\_currency | VARCHAR | The 3-letter ISO code that identifies the currency of the transaction. |
| transaction\_amount | FLOAT | The transaction amount, expressed in the transaction currency. |
| settlement\_currency | VARCHAR | The 3-letter ISO code that identifies the currency of the settlement. |
| settlement\_amount | FLOAT | The transaction amount, expressed in the settlement currency. |
| fx\_rate | FLOAT | Transaction to settlement currency exchange rate. |
| provider\_customer\_reference | VARCHAR | PSP-native identifier of the customer. |
| payment\_method | VARCHAR | Payment method, values: card, paypal\_account. |
| card\_type | VARCHAR | Card type, values: credit, debit, notset, prepaid. |
| card\_network | VARCHAR | Card network that supports the card, e.g. Visa, Mastercard, American Express. Card only. |
| card\_bin | VARCHAR | The payment method’s Bank Identification Number (BIN). |
| card\_issuer | VARCHAR | The bank that issued the customer’s card. This will return an empty string for alternative payment methods such as Android Pay or Apple Pay. |
| card\_issuer\_country | VARCHAR | Name of the country that issued the card. |
| card\_issuer\_region | VARCHAR | Region of the country that issued the card. |
| provider\_payout\_reference | VARCHAR | The identifier of the funds transfer from provider to merchant. |
| is\_payrails | BOOLEAN | Whether the payment was processed by Payrails. |
| payrails\_payment\_id | VARCHAR | Unique identifier of the Payment in Payrails. |
| payrails\_execution\_id | VARCHAR | Unique identifier of the execution. |
| meta | VARIANT | Full merchant's meta field details. |


## Related topics

- [Reports](/docs/analytics-and-reporting/reports/index.md)
- [Unlimit](/docs/analytics-and-reporting/getting-started/connect-your-data-sources/unlimit.md)
- [Server-to-server Integration](/docs/use-cases/server-to-server-integration-reference-architecture.md)
