Refunding card payments

Refund a payment

Changed on

You can use this endpoint to fully or partially refund a payment.

post/v1/payments/{paymentId}/refunds

Request

  • Base URL
    https://publicapi.payments.service.gov.uk
  • URL
    https://publicapi.payments.service.gov.uk/v1/payments/{paymentId}/refunds
  • Auth
    HTTP bearer

Path parameters

paymentIdstring required

The unique payment_id of the payment you want to refund.

Request body

amountinteger required

The amount you want to refund to your user in pence.

refund_amount_availableinteger

Amount in pence. Total amount still available before issuing the refund

Example request

{
  "amount": 150000,
  "refund_amount_available": 200000
}

Response

successful operation

amountinteger

The amount refunded to the user in pence.

created_datestring

The date and time you created this refund. This value uses Coordinated Universal Time (UTC) and ISO 8601 format - YYYY-MM-DDThh:mm:ss.SSSZ.

feeinteger

The fee, in pence, charged for processing the refund.

net_amountinteger

The net amount, in pence, associated with the refund, including any fee applicable.

payment_idstring

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

refund_idstring

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

status'submitted' | 'success' | 'error'

Example response

{
  "_links": {
    "payment": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    },
    "self": {
      "href": "https://an.example.link/from/payment/platform",
      "method": "GET"
    }
  },
  "amount": 120,
  "created_date": "2017-01-10T16:52:07.855Z",
  "fee": 2,
  "net_amount": -122,
  "payment_id": "hu20sqlact5260q2nanm0q8u93",
  "refund_id": "act4c33g40j3edfmi8jknab84x",
  "settlement_summary": {
    "settled_date": "2016-01-21"
  },
  "status": "success"
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status