v1

latestOpenAPI 3.0.12026-07-2428103163.2 KB
Organisations
Pay Runs

Estimate pay run costs

Estimates costs for a pay run without creating it. Accepts minimal beneficiary details (country code only). Returns detailed fee breakdown, batch assignments, and routing information.

post/organisations/{organisationId}/pay-runs/estimate

Path parameters

organisationIdstring uuid required

The unique Crezco ID for an organisation

Headers

Crezco-Versionstring

The requested API version

Request body

partnerEntityIdstring nullable

Globally Unique Id of this estimate in the partner system

scheduledExecutionDatestring date nullable
<p> The date that this pay run is scheduled to be paid represented in ISO 8601 complete date delimited format (e.g. 2022-05-12 would be 12th May 2022) </p> <p> If omitted, payment will be assumed to be immediate </p>
payerBankAccountIdstring uuid nullable

The bank account to pay from. For backwards compatibility, this field is still supported. New integrations should use PaymentSourceType and PaymentSourceId instead.

paymentSourceType'BankAccount' | 'Card'
paymentSourceIdstring uuid nullable

ID of the payment source. Optional for estimates — fee calculations do not depend on a specific bank account. Required for actual pay runs if PaymentSourceType is Bank. Optional if PaymentSourceType is Card (for stored cards).

Example request

{
  "partnerEntityId": "Your-Unique-Estimate-ID",
  "scheduledExecutionDate": "2023-07-17",
  "paymentSourceId": "C86FC455-3D2C-484C-9B8A-1996B2C6DB5E",
  "payables": [
    {
      "partnerEntityId": "Your-Unique-ID",
      "recipientAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 1275
      },
      "beneficiary": {
        "country": "GB",
        "bankAccount": {
          "country": "FR",
          "accountCurrency": "EUR"
        }
      },
      "fees": {
        "providerVariableFee": {
          "discountMultiplier": 0.9
        }
      }
    }
  ],
  "groups": [
    {
      "partnerEntityId": "Your-Unique-ID",
      "partnerPayableIds": [
        {
          "partnerEntityId": "Your-Unique-ID"
        }
      ],
      "reference": "My-Ref-1234"
    }
  ]
}

Response

OK

organisationIdstring uuid

Organisation identifier (read-only)

scheduledExecutionDatestring date nullable
<p> The date that this pay run is scheduled to be paid represented in ISO 8601 complete date delimited format (e.g. 2022-05-12 would be 12th May 2022) </p> <p> If omitted, payment will be instructed as soon as it is authorised </p>
paymentSourceType'BankAccount' | 'Card'
paymentSourceIdstring uuid nullable

ID of the payment source. Required if PaymentSourceType is Bank. Optional if PaymentSourceType is Card (for stored cards).

Example response

{
  "scheduledExecutionDate": "2023-07-17",
  "paymentSourceId": "C86FC455-3D2C-484C-9B8A-1996B2C6DB5E",
  "payables": [
    {
      "fundingAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 1275
      }
    }
  ],
  "groups": [
    {
      "partnerEntityId": "Your-Unique-ID",
      "partnerPayableIds": [
        {
          "partnerEntityId": "Your-Unique-ID"
        }
      ],
      "reference": "My-Ref-1234"
    }
  ],
  "batches": [
    {
      "groups": [
        {
          "partnerEntityId": "Your-Unique-ID"
        }
      ],
      "payables": [
        {
          "partnerEntityId": "Your-Unique-ID"
        }
      ]
    }
  ],
  "summary": {
    "totalFeesAmount": {
      "currencyCode": "GBP",
      "amountInMinorUnits": 1275
    }
  }
}