v1

latestOpenAPI 3.0.32026-07-132012.5 KB

Discover the status of a payment.

The API user can check the payment status by providing the clientJourneyId used when the payment journey was created. The JSON body returned will include the clientJourneyId, the taxRegime, the amountInPence paid and also the paymentStatus.

Test data

Scenario simulation using Gov-Test-Scenario headers is only available in the sandbox environment. You will not be able to access the frontend screens to complete the journey, but you can use headers in the POST request to set a journey into a certain state. To achieve this send a Gov-Test-Scenario header with a value matching one of the values below.

Header Value (Gov-Test-Scenario)Scenario description
COMPLETEDThe payment has completed and the transfer is made.
FAILEDThe payment has failed for one of the following reasons: <br> - The payment was cancelled by the user or timed out at the bank during the payment process. <br> - The bank or building society has rejected the payment. <br> - The payment has failed due to an error.
IN_PROGRESSThe payment is in progress but has not completed or failed.
get/status

Query parameters

clientJourneyIdstring uuid required
Example:a218f71d-9bf2-438e-851c-71d50866c2e9

The identifier for the payment journey.

Response

A payment matching the query was found and the details returned in the JSON response

clientJourneyIdstring required

The identifier for the payment journey.

taxRegime'SelfAssessment' | 'Vat' required

The tax regime under which the liability has arisen. One of a fixed set.

amountInPenceinteger required

Represents the amount actually paid, in pence.

paymentStatus'Completed' | 'Failed' | 'InProgress' required

The status of the payment within the HMRC system.

Example response

{
  "clientJourneyId": "a218f71d-9bf2-438e-851c-71d50866c2e9",
  "taxRegime": "SelfAssessment",
  "amountInPence": 3456,
  "paymentStatus": "Completed"
}