v1

latestOpenAPI 3.0.12026-07-2428103163.2 KB
Organisations
Pay Runs

Get pay run

Retrieves the details for a single pay run. This will include all of the constituent batches, groups and payables. Each constituent entity will have a status which you can use to determine the current status of any payment attempt.

get/organisations/{organisationId}/pay-runs/{payRunId}

Path parameters

organisationIdstring uuid required

The unique Crezco ID for an organisation

payRunIdstring uuid required

The unique pay run ID for the pay run

Headers

Crezco-Versionstring

The requested API version

Response

OK

payRunIdstring uuid
organisationIdstring uuid
partnerEntityIdstring required

Globally Unique Id of this pay run 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 instructed as soon as it is authorised </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. The type is derived automatically when PaymentSourceType is omitted. Required for Bank payment sources. Optional if PaymentSourceType is Card (for stored cards).

status'Unknown' | 'Open' | 'UserInitiationInProgress' | 'Processing' | 'Cancelling' | 'Processed' | 'Concluded' | 'Cancelled' | 'Draft'

Mapping for https://crezco.readme.io/reference/statuses so we don't expose internal statuses

checkoutUristring uri

Example response

{
  "partnerEntityId": "Your-Unique-ID",
  "scheduledExecutionDate": "2023-07-17",
  "paymentSourceId": "C86FC455-3D2C-484C-9B8A-1996B2C6DB5E",
  "payables": [
    {
      "fundingAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 1275
      },
      "reference": "My-Ref-1234",
      "reversedAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 1275
      },
      "paymentSourceId": "C86FC455-3D2C-484C-9B8A-1996B2C6DB5E"
    }
  ],
  "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"
        }
      ]
    }
  ]
}