---
title: "Checkout"
method: POST
path: "/organisations/{organisationId}/pay-runs/{payRunId}/checkout"
tags: ["Organisations", "Pay Runs"]
---

# Checkout

`POST /organisations/{organisationId}/pay-runs/{payRunId}/checkout`

Calling Checkout with a valid pay run ID will return a URL that the user should be redirected to in order to initiate the payment process for the given pay run.

When calling this endpoint you are expected to provide `completeUrl` and `incompleteUrl` query parameters which will be used to redirect the user back to your system following the checkout process depending on whether all batch processing is complete or not. Regardless of the URL used webhooks and/or status endpoints should always be used to obtain most accurate status information.

The optional `linkUsage` parameter declares whether the returned URL will be used to redirect the current user immediately (`Redirect`, the default) or shared with another user out of band (`Share`). Note that checkout configuration is stored per pay run and each checkout call replaces it — previously issued links follow the most recent call's configuration.

## Path parameters

- `organisationId` string, uuid, required
- `payRunId` string, uuid, required

## Query parameters

- `completeUrl` string, required
- `incompleteUrl` string, required
- `userId` string, nullable
- `linkUsage` string, nullable

## Headers

- `Crezco-Version` string

## Response `200`

OK

- PostPayRunCheckoutResourceRepresentationVersion4
  - `url` string — Url hosted by Crezco that you should redirect the customer to in order for them to make their payments.

## Other responses

- `400` — Bad Request
- `401` — You do not have access. Check your API key is correct.
- `403` — You do not have access to this organisation.
- `404` — Not Found
- `406` — The version of the API that you requested is not available. Check your Crezco-Version header. If you omit this header you will use the latest version of the API.
- `409` — Conflict
- `429` — You have made too many requests to the API in too short a period. Wait a while and try again.

---

[API](https://skmtc.net/crezco/apis/payables-api.md) · [All operations](https://skmtc.net/crezco/apis/payables-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crezco/payables-api/revisions/4427e79fba09/schema)
