---
updatedAt: 2026-07-23T14:03:51.000Z
agentTools:
  projectIndex: https://docs.crezco.com/llms.txt
---

# Checkout

<p>
  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.
</p>
<p>
    When calling this endpoint you are expected to provide <code>completeUrl</code> and <code>incompleteUrl</code>
    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.
</p>

Calling `/checkout` with a valid pay run ID will return a 302 redirect to the UI to allow a user to checkout

### Supplying a `completeURL` and `incompleteUrl`

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.

### Redirecting versus sharing the checkout link

The optional `linkUsage` query parameter declares how you intend to use the returned URL:

* `Redirect` (the default when omitted) — the current user will be redirected to the URL immediately.
* `Share` — the URL will be passed to another user out of band, for example emailed to an approver.

Checkout configuration (the return URLs and the link usage) is stored per pay run, not per link. Each
checkout call replaces it, so any previously issued links follow the most recent call's configuration.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Payables API",
    "description": "Crezco Partner API",
    "termsOfService": "https://www.crezco.com/terms",
    "contact": {
      "name": "Crezco Support",
      "url": "https://crezco.atlassian.net/servicedesk/customer/portals"
    },
    "version": "2025-01-31"
  },
  "servers": [
    {
      "url": "https://api.partners.uat.crezco.com",
      "description": "UAT server for acceptance testing. Live and sandbox banks."
    },
    {
      "url": "https://api.partners.crezco.com",
      "description": "Live server when your application is in Production. Live banks only."
    }
  ],
  "paths": {
    "/organisations/{organisationId}/pay-runs/{payRunId}/checkout": {
      "post": {
        "tags": [
          "Organisations",
          "Pay Runs"
        ],
        "summary": "Checkout",
        "description": "<p>\n  Calling Checkout with a valid pay run ID will return a URL that the user should be redirected to in order to initiate\n  the payment process for the given pay run.\n</p>\n<p>\n    When calling this endpoint you are expected to provide <code>completeUrl</code> and <code>incompleteUrl</code>\n    query parameters which will be used to redirect the user back to your system following the checkout process\n    depending on whether all batch processing is complete or not. Regardless of the URL used webhooks and/or\n    status endpoints should always be used to obtain most accurate status information.\n</p>\n<p>\n    The optional <code>linkUsage</code> parameter declares whether the returned URL will be used to redirect the\n    current user immediately (<code>Redirect</code>, the default) or shared with another user out of band\n    (<code>Share</code>). Note that checkout configuration is stored per pay run and each checkout call\n    replaces it — previously issued links follow the most recent call's configuration.\n</p>",
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "description": "The unique Crezco ID for an organisation",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "8d789121-7167-4c4f-b002-ffe309abefee"
          },
          {
            "name": "payRunId",
            "in": "path",
            "description": "The unique pay run ID for the pay run",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "3b7025b0-8bce-409e-b323-940773f59ff5"
          },
          {
            "name": "completeUrl",
            "in": "query",
            "description": "<p>\n    The URL that we should redirect the user back to following the checkout process when all constituent batches have\n    reached the <i>processed</i> state.\n</p>\n<p>\n     If not specified then this parameter must be specified on the supplied checkout URL itself.\n</p>",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            },
            "example": "https://example.org/checkoutcomplete/someuniqueidentifier"
          },
          {
            "name": "incompleteUrl",
            "in": "query",
            "description": "<p>\n    The URL that we should redirect the user back to following the checkout process when not all of the constituent\n    batches have reached the <i>processed</i> state.\n</p>\n<p>\n     If not specified then this parameter must be specified on the supplied checkout URL itself.\n</p>",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            },
            "example": "https://example.org/checkoutcomplete/someuniqueidentifier"
          },
          {
            "name": "userId",
            "in": "query",
            "description": "UserId of the user that intends to authorise the pay run batch(es)",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "example": "af176609-6c28-4fce-8e11-1f4a1a48f9a3"
          },
          {
            "name": "linkUsage",
            "in": "query",
            "description": "<p>\n    Declares how you will use the returned checkout URL. Use <code>Redirect</code>\n    (the default when omitted) when the current user will be redirected to the URL immediately.\n    Use <code>Share</code> when the URL will be passed to another user out of band, for example\n    emailed to an approver.\n</p>\n<p>\n    Checkout configuration (the return URLs and the link usage) is stored per pay run, not per link.\n    Each checkout call replaces it, and any previously issued links are invalidated.\n</p>",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "example": "Share"
          },
          {
            "name": "Crezco-Version",
            "in": "header",
            "description": "The requested API version",
            "style": "simple",
            "schema": {
              "type": "string",
              "default": "2025-01-31"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostPayRunCheckoutResourceRepresentationVersion4"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "You do not have access. Check your API key is correct.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "You do not have access to this organisation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "406": {
            "description": "The version of the API that you requested is not available. Check your Crezco-Version header.\nIf you omit this header you will use the latest version of the API.            ",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrezcoConflictResourceProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "You have made too many requests to the API in too short a period. Wait a while and try again.      ",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConflictedResource": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          }
        },
        "additionalProperties": {}
      },
      "CrezcoConflictResourceProblemDetails": {
        "required": [
          "conflictedResources"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "conflictedResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConflictedResource"
            }
          }
        },
        "additionalProperties": {}
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": {}
      },
      "PostPayRunCheckoutResourceRepresentationVersion4": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Url hosted by Crezco that you should redirect the customer to\r\nin order for them to make their payments."
          }
        },
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": {}
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Your API key for accessing the service. \n * Live keys start with `CZ01`\n * UAT keys start `CZSB01` \n\nYou should include the key in the `Authorization` header as a Bearer token like: \n\n`Authorization: Bearer CZSB01YOURKEY`\n\nYou can learn how to get your API key from the \n[Onboarding](https://crezco.readme.io/reference/managing-your-account#onboarding)\ndocumentation.",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}
```