---
updatedAt: 2025-08-04T15:53:11.000Z
agentTools:
  projectIndex: https://docs.crezco.com/llms.txt
---

# Create a pay run and check it out

Learn how to create and checkout a pay run

Payments are made as part of a *pay run*. A Pay Run may have 1 or more *payables* associated with it, payables may be grouped. This provides a uniform way to make single or batch payments.

> 👍 To create a *Pay Run* you will need to call the *Pay Run* endpoint
>
> [POST - Create pay run](https://docs.crezco.com/reference/post_organisations-organisationid-pay-runs)

A pay run needs to contain a valid `payerBankAccountId` corresponding to one of the bank accounts available via [GET - Organisation Bank Accounts](get_organisations-organisationid-bank-accounts). Pay runs should also contain beneficiary bank account details for each constituent payable.

## Example payload

```Text json
{
  "partnerEntityId": "Your-PayRun-ID1",
  "partnerClientId": "Your-Unique-ID",
  "scheduledExecutionDate": "2023-02-01",
  "payerBankAccountId": "Bank-Account-ID",
  "payables": [
    {
      "partnerEntityId": "Your-Payable-ID1",
      "recipientAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 1275
      },
      "reference": "My-Ref-1234",
      "beneficiary": {
        "bankAccount": {
          "accountRoutingName": "Test Company 1 LTD",
          "country": "GB",
          "gbSortCode": "12-34-56",
          "gbAccountNumber": "12345678"
        }
      }
    },
    {
      "partnerEntityId": "Your-Payable-ID2",
      "recipientAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 2005
      },
      "reference": "My-Ref-1235",
      "beneficiary": {
        "bankAccount": {
          "accountRoutingName": "Test Company 1 LTD",
          "country": "GB",
          "gbSortCode": "12-34-56",
          "gbAccountNumber": "12345678"
        }
      }
    },
    {
      "partnerEntityId": "Your-Payable-ID3",
      "recipientAmount": {
        "currencyCode": "GBP",
        "amountInMinorUnits": 1050
      },
      "reference": "My-Ref-1235",
      "beneficiary": {
        "bankAccount": {
          "accountRoutingName": "Test Company 2 LTD",
          "country": "GB",
          "gbSortCode": "65-43-21",
          "gbAccountNumber": "87654321"
        }
      }
    }
  ],
  "groups": [
    {
      "partnerEntityId": "Your-Group-ID",
      "paymentIds": ["Your-Payment-ID1", "Your-Payment-ID2"],
      "reference": "Group-Ref-1"
    }
  ]
}
```

## Response

You will receive back a `201` response with a `PayRunId` value. You'll need this for initiating payment and tracking statuses.

# Making a Payment

To initiate the payment of a pay run you must call the checkout endpoint with the `PayRunId` returned above. This will initialise a new payment workflow and return the final checkout URL to which the user must be redirected, allowing the payer to begin the Open Banking payment workflow. For specific details on the endpoint see [Checkout](https://docs.crezco.com/reference/post_organisations-organisationid-pay-runs-payrunid-checkout)

A `returnUrl` may be set and specifies where the user will be sent following completion of the pay run.

An example URI with a custom domain would look like: `https://payments.example.com/pay-runs/checkout/{payRunId}?returnUrl=http%3A%2F%2Fexample.com%2Fwelcome`

If the `returnUrl` is not set then it must be set on the final checkout URL returned from the Checkout endpoint.