v39

latestOpenAPI 3.0.1raw.githubusercontent.com2025-10-031646108.8 KB
Card payments

Get information about a single payment

You can use this endpoint to get details about a single payment you’ve previously created.

get/v1/payments/{paymentId}

Path parameters

paymentIdstring required

Returns the payment with the matching payment_id.

Response

OK - your request was successful.

agreement_payment_type'instalment' | 'recurring' | 'unscheduled'

When the customer initiates a standing order agreement transaction we have to include a customerInitiatedReason attribute. This can have a value of instalment, recurring, or unscheduled.

amountinteger

The description assigned to the payment when it was created.

authorisation_mode'web' | 'moto_api' | 'external'

How the payment will be authorised. Payments created in web mode require the paying user to visit the next_url to complete the payment.

card_brandstring

This attribute is deprecated. Please use card_details.card_brand instead.

corporate_card_surchargeinteger

The corporate card surcharge amount in pence.

created_datestring
delayed_captureboolean
descriptionstring

The description assigned to the payment when it was created.

emailstring
feeinteger

The payment service provider’s (PSP) transaction fee, in pence. fee only appears when we have taken (‘captured’) the payment from the user or if their payment fails after they submitted their card details. fee will not appear if your PSP is Worldpay or you are using an API key from a test service.

language'en' | 'cy'

The ISO-6391 Alpha-2 code of the language of the user's payment page.

motoboolean

Indicates if this payment is a Mail Order / Telephone Order (MOTO) payment.

net_amountinteger

The amount, in pence, that will be paid into your bank account after your payment service provider takes the fee.

payment_idstring

The unique ID GOV.UK Pay automatically associated with this payment when you created it.

payment_providerstring

The payment service provider that processed this payment.

provider_idstring

The unique ID your payment service provider generated for this payment. This is not the same as the payment_id.

referencestring

The reference associated with the payment when it was created. reference is not unique - multiple payments can have the same reference value.

return_urlstring

The URL you direct the paying user to after their payment journey on GOV.UK Pay ends.

total_amountinteger

Amount your user paid in pence, including corporate card fees. total_amount only appears if you added a corporate card surcharge to the payment.

Example response

{
  "_links": {
    "auth_url_post": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST",
      "params": {
        "description": "This is a value for a parameter called description"
      },
      "type": "application/x-www-form-urlencoded"
    },
    "cancel": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST",
      "params": {
        "description": "This is a value for a parameter called description"
      },
      "type": "application/x-www-form-urlencoded"
    },
    "capture": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST",
      "params": {
        "description": "This is a value for a parameter called description"
      },
      "type": "application/x-www-form-urlencoded"
    },
    "events": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "next_url": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "next_url_post": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST",
      "params": {
        "description": "This is a value for a parameter called description"
      },
      "type": "application/x-www-form-urlencoded"
    },
    "refunds": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "self": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    }
  },
  "amount": 1200,
  "card_brand": "Visa",
  "card_details": {
    "billing_address": {
      "city": "address city",
      "country": "GB",
      "line1": "address line 1",
      "line2": "address line 2",
      "postcode": "AB1 2CD"
    },
    "card_brand": "Visa",
    "card_type": "debit",
    "cardholder_name": "Mr. Card holder",
    "expiry_date": "04/24",
    "first_digits_card_number": "123456",
    "last_digits_card_number": "1234",
    "wallet_type": "Apple Pay"
  },
  "corporate_card_surcharge": 250,
  "created_date": "2016-01-21T17:15:00.000Z",
  "description": "Your Service Description",
  "email": "The paying user’s email address.",
  "exemption": {
    "outcome": {
      "result": "honoured"
    },
    "requested": true,
    "type": "corporate"
  },
  "fee": 5,
  "language": "en",
  "net_amount": 1195,
  "payment_id": "hu20sqlact5260q2nanm0q8u93",
  "payment_provider": "worldpay",
  "provider_id": "reference-from-payment-gateway",
  "reference": "your-reference",
  "refund_summary": {
    "amount_available": 100,
    "status": "available"
  },
  "return_url": "http://your.service.domain/your-reference",
  "settlement_summary": {
    "capture_submit_time": "2016-01-21T17:15:00.000Z",
    "captured_date": "2016-01-21",
    "settled_date": "2016-01-21"
  },
  "state": {
    "code": "P010",
    "message": "User cancelled the payment",
    "status": "created"
  },
  "total_amount": 1450
}