Refunding card payments

Search refunds by 'from' and 'to' date. The Authorisation token needs to be specified in the 'authorization' header as 'authorization: Bearer YOUR_API_KEY_HERE'

get/v1/refunds

Request

  • Base URL
    https://publicapi.payments.service.gov.uk
  • URL
    https://publicapi.payments.service.gov.uk/v1/refunds
  • Auth
    API key in header Authorization

Query parameters

from_datestring

From date of refunds to be searched (this date is inclusive). Example=2015-08-13T12:35:00Z

to_datestring

To date of refunds to be searched (this date is exclusive). Example=2015-08-14T12:35:00Z

from_settled_datestring

From settled date of refund to be searched (this date is inclusive). Example=2015-08-13

to_settled_datestring

To settled date of refund to be searched (this date is inclusive). Example=2015-08-13

pagestring

Page number requested for the search, should be a positive integer (optional, defaults to 1)

display_sizestring

Number of results to be shown per page, should be a positive integer (optional, defaults to 500, max 500)

Response

OK

totalinteger
countinteger
pageinteger

Example response

{
  "total": 100,
  "count": 20,
  "page": 1,
  "results": [
    {
      "refund_id": "act4c33g40j3edfmi8jknab84x",
      "created_date": "2017-01-10T16:52:07.855Z",
      "amount": 120,
      "_links": {
        "self": {
          "href": "https://an.example.link/from/payment/platform",
          "method": "GET"
        },
        "payment": {
          "href": "https://an.example.link/from/payment/platform",
          "method": "GET"
        }
      },
      "status": "success",
      "settlement_summary": {
        "settled_date": "2016-01-21"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "first_page": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "last_page": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "prev_page": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "next_page": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    }
  }
}

Changes

    • info

      added the new optional query request parameter from_settled_date

    • info

      added the new optional query request parameter to_settled_date

    • breaking

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

    • breaking

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

    • breaking

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

    • info

      the endpoint scheme security Authorization was added to the API

    • info

      the endpoint scheme security BearerAuth was removed from the API