---
title: "Begin a payment journey."
method: POST
path: "/pay"
---

# Begin a payment journey.

`POST /pay`

After a successful call to the /pay endpoint, the API user receives JSON with a redirection URL. The API user
then redirects the customer's browser to this URL, starting the payment journey.

## Request body

- object — The JSON describing an HMRC third party payment /pay payload.
  - `taxRegime` 'SelfAssessment' | 'Vat', required — The tax regime under which the liability has arisen. One of a fixed set. Currently supported regimes are: Self Assessment and Vat.
  - `reference` string, required — The reference identifying the tax liability. For Self Assessment this is the 10 digit Unique Taxpayer Reference. For VAT this is the 9-digit VAT registration number.
  - `amountInPence` integer, required — The amount to be paid in pence, so £12.34 is 1234, must be greater than or equal to 0. If 0 is provided, the user will be prompted to enter an amount. If non zero is provided, the user will be prompted to select the amount or enter another amount.
  - `backURL` string, uri — If this is present HMRC will offer this as a link to the customer at the end of the journey, this link can allow them to return to their software.
  - `friendlyName` string — The name of the software that the user started their payment from. If this is present, then we will display a link to help users go back to their software which says "return to &lt;friendlyName&gt;"

## Response `201`

Created. Body contains url to redirect user to and a UUID to look up the status of the payment journey with.

- object
  - `redirectURL` string — The URL to direct the customer browser to in order to initiate the customer payment journey
  - `clientJourneyId` string, uuid — The client identifier created by HMRC for this journey. This will be a UUID (version 4, variant 2). This field is used to identify the journey in calls to the /status endpoint.

## Other responses

- `400` — Bad Request. A 400 response represents a malformed request. The returned JSON will attempt to guide the API user to the problem.
- `500` — An error occurred upstream and could not be recovered from.

---

[API](https://skmtc.dev/hmrc/apis/third-party-payments-external-api.md) · [All operations](https://skmtc.dev/hmrc/apis/third-party-payments-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hmrc/third-party-payments-external-api/revisions/9abc77541a90/schema)
