Card payments

Find payment by ID

Return information about the payment The Authorisation token needs to be specified in the 'authorization' header as 'authorization: Bearer YOUR_API_KEY_HERE'

get/v1/payments/{paymentId}

Path parameters

paymentIdstring required

Payment identifier

Response

OK

amountinteger
descriptionstring
referencestring
language'en' | 'cy'
metadataobject
emailstring
payment_idstring
payment_providerstring
created_datestring
delayed_captureboolean

delayed capture flag

motoboolean

Mail Order / Telephone Order (MOTO) payment flag

corporate_card_surchargeinteger
total_amountinteger
feeinteger

processing fee taken by the GOV.UK Pay platform, in pence. Only available depending on payment service provider

net_amountinteger

amount including all surcharges and less all fees, in pence. Only available depending on payment service provider

provider_idstring
return_urlstring
card_brandstring

Card Brand

Example response

{
  "amount": 1200,
  "description": "Your Service Description",
  "reference": "your-reference",
  "language": "en",
  "email": "your email",
  "state": {
    "status": "created",
    "message": "User cancelled the payment",
    "code": "P010"
  },
  "payment_id": "hu20sqlact5260q2nanm0q8u93",
  "payment_provider": "worldpay",
  "created_date": "2016-01-21T17:15:000Z",
  "refund_summary": {
    "status": "available",
    "amount_available": 100
  },
  "settlement_summary": {
    "capture_submit_time": "2016-01-21T17:15:000Z",
    "captured_date": "2016-01-21",
    "settled_date": "2016-01-21"
  },
  "card_details": {
    "last_digits_card_number": "1234",
    "first_digits_card_number": "123456",
    "cardholder_name": "Mr. Card holder",
    "expiry_date": "04/24",
    "billing_address": {
      "line1": "address line 1",
      "line2": "address line 2",
      "postcode": "AB1 2CD",
      "city": "address city",
      "country": "GB"
    },
    "card_brand": "Visa",
    "card_type": "debit"
  },
  "corporate_card_surcharge": 250,
  "total_amount": 1450,
  "fee": 5,
  "net_amount": 1195,
  "provider_id": "reference-from-payment-gateway",
  "return_url": "http://your.service.domain/your-reference",
  "_links": {
    "self": {
      "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": {
      "type": "application/x-www-form-urlencoded",
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST"
    },
    "events": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "refunds": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "cancel": {
      "type": "application/x-www-form-urlencoded",
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST"
    },
    "capture": {
      "type": "application/x-www-form-urlencoded",
      "href": "https://an.example.link/from/payment/platform",
      "method": "POST"
    }
  },
  "card_brand": "Visa"
}

Changes

Changed in 8 of the 50 revisions of this API.4115

    • ▲

      removed the media type application/json for the response with the status

      response-media-type-removed

    • ▲

      removed the media type application/json for the response with the status

      response-media-type-removed

    • ▲

      removed the media type application/json for the response with the status

      response-media-type-removed

    • ▲

      removed the media type application/json for the response with the status

      response-media-type-removed

    • ○

      the endpoint scheme security Authorization was added to the API

      api-security-added

    • ○

      the endpoint scheme security BearerAuth was removed from the API

      api-security-removed

    This revision also has 46 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      the endpoint scheme security BearerAuth was added to the API

      api-security-added

    • ○

      the endpoint scheme security Authorization was removed from the API

      api-security-removed

    • ○

      added the media type application/json for the response with the status

      response-media-type-added

    • ○

      added the media type application/json for the response with the status

      response-media-type-added

    • ○

      added the media type application/json for the response with the status

      response-media-type-added

    • ○

      added the media type application/json for the response with the status

      response-media-type-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ●

      deleted the header request parameter X-Ledger

      request-parameter-removed

    • ○

      added the new optional header request parameter X-Ledger

      new-optional-request-parameter

    • ○

      api tag Card payments added

      api-tag-added

    • ○

      api tag Card Payments removed

      api-tag-removed

    • ○

      api operation id getPayment removed and replaced with Get a payment

      api-operation-id-removed

    • ○

      api tag Card Payments added

      api-tag-added

    • ○

      api operation id Get a payment removed and replaced with getPayment

      api-operation-id-removed

    • ○

      api tag Card payments removed

      api-tag-removed