post:
tags:
- Payments Lifecycle
summary: Submit a payment refund request
description: Refund a payment
operationId: refund
parameters:
- name: linkData
in: path
required: true
schema:
type: string
- name: WP-Api-Version
in: header
description: The API version
required: true
schema:
type: string
description: The API version
example: '2024-06-01'
enum:
- '2024-06-01'
example: '2024-06-01'
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/RefundRequest.yaml
responses:
'202':
description: Accepted
content:
application/json:
schema:
$ref: ../components/schemas/RefundResponse.yaml
examples:
sentForRefund:
$ref: examples/responses/sent-for-refund-202.yaml
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: ../components/schemas/ErrorResponse.yaml
examples:
Unauthorized:
$ref: examples/responses/errors/401.yaml
'404':
description: Not found
content:
application/json:
schema:
$ref: ../components/schemas/ErrorResponse.yaml
examples:
Not found:
$ref: examples/responses/errors/404.yaml
'406':
description: Not acceptable
content:
application/json:
schema:
$ref: ../components/schemas/HeaderErrorResponse.yaml
examples:
Not acceptable:
$ref: examples/responses/errors/406.yaml
'415':
description: Unsupported media type
content:
application/json:
schema:
$ref: ../components/schemas/ErrorResponse.yaml
examples:
Unsupported media type:
$ref: examples/responses/errors/415.yaml
'500':
description: Internal server error
content:
application/json:
schema:
$ref: ../components/schemas/ErrorResponse.yaml
examples:
Internal server error:
$ref: examples/responses/errors/500.yaml
x-orderingPosition: '4'