{ "opencollection": "1.0.0", "info": { "name": "GOV.UK Pay Agreements Refunding card payments API", "version": "1.0.3" }, "items": [ { "info": { "name": "Refunding card payments", "type": "folder" }, "items": [ { "info": { "name": "Get information about a payment’s refunds", "type": "http" }, "http": { "method": "GET", "url": "https://publicapi.payments.service.gov.uk/v1/payments/:paymentId/refunds", "params": [ { "name": "paymentId", "value": "", "type": "path", "description": "The unique `payment_id` of the payment you want a list of refunds for." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "You can use this endpoint to [get a list of refunds for a payment](https://docs.payments.service.gov.uk/refunding_payments/#get-all-refunds-for-a-single-payment)." }, { "info": { "name": "Refund a payment", "type": "http" }, "http": { "method": "POST", "url": "https://publicapi.payments.service.gov.uk/v1/payments/:paymentId/refunds", "params": [ { "name": "paymentId", "value": "", "type": "path", "description": "The unique `payment_id` of the payment you want to refund." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "You can use this endpoint to [fully or partially refund a payment](https://docs.payments.service.gov.uk/refunding_payments)." }, { "info": { "name": "Check the status of a refund", "type": "http" }, "http": { "method": "GET", "url": "https://publicapi.payments.service.gov.uk/v1/payments/:paymentId/refunds/:refundId", "params": [ { "name": "paymentId", "value": "", "type": "path", "description": "The unique `payment_id` of the payment you want to view a refund of." }, { "name": "refundId", "value": "", "type": "path", "description": "The unique `refund_id` of the refund you want to view. If one payment has multiple refunds, each refund has a different `refund_id`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "You can use this endpoint to [get details about an individual refund](https://docs.payments.service.gov.uk/refunding_payments/#checking-the-status-of-a-refund)." }, { "info": { "name": "Search refunds", "type": "http" }, "http": { "method": "GET", "url": "https://publicapi.payments.service.gov.uk/v1/refunds", "params": [ { "name": "from_date", "value": "2015-08-13T12:35:00Z", "type": "query", "description": "Returns refunds created on or after the `from_date`. Date and time must use Coordinated Universal Time (UTC) and ISO 8601 format to second-level accuracy - `YYYY-MM-DDThh:mm:ssZ`." }, { "name": "to_date", "value": "2015-08-13T12:35:00Z", "type": "query", "description": "Returns refunds created before the `to_date`. Date and time must use Coordinated Universal Time (UTC) and ISO 8601 format to second-level accuracy - `YYYY-MM-DDThh:mm:ssZ`." }, { "name": "from_settled_date", "value": "2022-08-13", "type": "query", "description": "Returns refunds settled on or after the `from_settled_date` value. You can only use `from_settled_date` if your payment service provider is Stripe. Date must use ISO 8601 format to date-level accuracy - `YYYY-MM-DD`. Refunds are settled when Stripe takes the refund from your account balance." }, { "name": "to_settled_date", "value": "2022-08-13", "type": "query", "description": "Returns refunds settled before the `to_settled_date` value. You can only use `to_settled_date` if your payment service provider is Stripe. Date must use ISO 8601 format to date-level accuracy - `YYYY-MM-DD`. Refunds are settled when Stripe takes the refund from your account balance." }, { "name": "page", "value": "", "type": "query", "description": "Returns a [specific page of results](https://docs.payments.service.gov.uk/api_reference/#pagination). Defaults to `1`." }, { "name": "display_size", "value": "", "type": "query", "description": "The number of refunds returned [per results page](https://docs.payments.service.gov.uk/api_reference/#pagination). Defaults to `500`. Maximum value is `500`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "You can use this endpoint to [search refunds you’ve previously created](https://docs.payments.service.gov.uk/refunding_payments/#searching-refunds). The refunds are sorted by date, with the most recently created refunds appearing first." } ] } ], "bundled": true }