v1

latestOpenAPI 3.0.12026-07-2428103163.2 KB
Organisations
Pay Runs

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.

post/organisations/{organisationId}/pay-runs/{payRunId}/checkout

Path parameters

organisationIdstring uuid required

The unique Crezco ID for an organisation

payRunIdstring uuid required

The unique pay run ID for the pay run

Query parameters

completeUrlstring required
<p> The URL that we should redirect the user back to following the checkout process when all constituent batches have reached the <i>processed</i> state. </p> <p> If not specified then this parameter must be specified on the supplied checkout URL itself. </p>
incompleteUrlstring required
<p> The URL that we should redirect the user back to following the checkout process when not all of the constituent batches have reached the <i>processed</i> state. </p> <p> If not specified then this parameter must be specified on the supplied checkout URL itself. </p>
userIdstring nullable

UserId of the user that intends to authorise the pay run batch(es)

linkUsagestring nullable
<p> Declares how you will use the returned checkout URL. Use <code>Redirect</code> (the default when omitted) when the current user will be redirected to the URL immediately. Use <code>Share</code> when the URL will be passed to another user out of band, for example emailed to an approver. </p> <p> Checkout configuration (the return URLs and the link usage) is stored per pay run, not per link. Each checkout call replaces it, and any previously issued links are invalidated. </p>

Headers

Crezco-Versionstring

The requested API version

Response

OK

urlstring

Url hosted by Crezco that you should redirect the customer to in order for them to make their payments.