Create a Refund

post

/refund

Creates a refund.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json;charset=utf-8 ()
Root Schema : Refund Create
Type: object
Title: Refund Create
A refund for a payment used in the create refund request.

The id, href, status, statusDate, and refundDate properties are not used in the create request.

Show Source
Nested Schema : AccountRef
Type: object
Refers to an account. An account may be a party account or a financial account.
Match All
Refers to an account. An account may be a party account or a financial account.
Show Source
Nested Schema : Money
Type: object
Represents a monetary amount.
Show Source
Nested Schema : ChannelRef
Type: object
A reference to a channel.
Show Source
Nested Schema : PaymentRef
Type: object
A payment received at order time.
Show Source
Nested Schema : Payment Method Ref Or Value
Type: object
Title: Payment Method Ref Or Value
A link to the resource containing information about the payment method.
Show Source
Nested Schema : Related Party
Type: object
Title: Related Party
A party related to another object.
Show Source
Nested Schema : EntityRef
Match All
Represents an entity reference schema for EntityRef classes.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Addressable
Type: object
Defines a base schema for addressable entities.
Show Source
Nested Schema : EntityRef-allOf[2]
Type: object
Represents an entity reference schema for EntityRef classes.
Show Source
Nested Schema : account
Type: array
Accounts associated with the payment method.
Show Source
Nested Schema : TimePeriod
Type: object
Represents a time period with a start date, an end date, or both.
Show Source
Back to Top

Response

Supported Media Types

201 Response

The refund was created successfully.
Body ()
Root Schema : Refund
Type: object
Title: Refund
A refund for a payment.
Show Source
Nested Schema : AccountRef
Type: object
Refers to an account. An account may be a party account or a financial account.
Match All
Refers to an account. An account may be a party account or a financial account.
Show Source
Nested Schema : Money
Type: object
Represents a monetary amount.
Show Source
Nested Schema : ChannelRef
Type: object
A reference to a channel.
Show Source
Nested Schema : PaymentRef
Type: object
A payment received at order time.
Show Source
Nested Schema : Payment Method Ref Or Value
Type: object
Title: Payment Method Ref Or Value
A link to the resource containing information about the payment method.
Show Source
Nested Schema : Related Party
Type: object
Title: Related Party
A party related to another object.
Show Source
Nested Schema : EntityRef
Match All
Represents an entity reference schema for EntityRef classes.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Addressable
Type: object
Defines a base schema for addressable entities.
Show Source
Nested Schema : EntityRef-allOf[2]
Type: object
Represents an entity reference schema for EntityRef classes.
Show Source
Nested Schema : account
Type: array
Accounts associated with the payment method.
Show Source
Nested Schema : TimePeriod
Type: object
Represents a time period with a start date, an end date, or both.
Show Source

400 Response

The request isn't valid.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

401 Response

The client doesn't have the correct privileges.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

403 Response

The request wasn't authorized.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

405 Response

This method is not allowed.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

409 Response

The request could not be processed due to the conflict with the existing state of the resource.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

500 Response

The system encountered an internal error.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source
Back to Top

Examples

Example 1: Create a Refund Using Payment Method and Account POIDs

The following example shows how to create a refund by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

The -d option specifies the file to attach as the request body.

curl -X POST 'http://host:port/brm/payment/version/refund' -d @refundCreate.json

Request Body

The following is an example of the contents of the refundCreate.json file sent as the request body.

{
   "@type": "RefundCreate",
   "account": {
      "id": "0.0.0.1+-account+84808"
   },
   "paymentMethod": { 
      "id": "0.0.0.1+-payinfo-dd+249648",
      "@type": "PaymentMethodRef"
   },
   "totalAmount": {
      "value": 10,
      "unit": "USD"
   },
   "description": "Refunding service fee."
}

Response Body

The following example shows the contents of the response body in JSON format.

{
   "id": "0.0.0.1+-item-refund+82547",
   "href": "http://host:port/brm/payment/version/refund/0.0.0.1+-item-refund+82547",
   "authorizationCode": null,
   "correlatorId": "R1-30",
   "description": "Item refund",
   "name": "Billing Event Log",
   "refundDate": "2025-12-09T00:38:15-08:00",
   "status": "Success",
   "statusDate": "2025-12-09T00:38:15-08:00",
   "account": {
      "id": "0.0.0.1+-account+84808",
      "href": null,
      "description": null,
      "name": "Adam Baker",
      "@baseType": null,
      "@schemaLocation": null,
      "@type": null,
      "@referredType": "billingAccount"
   },
   "amount": null,
   "channel": {
      "id": "0",
      "href": null,
      "name": "Unspecified",
      "@baseType": null,
      "@schemaLocation": null,
      "@type": null,
      "@referredType": null
   },
   "payment": null,
   "paymentMethod": {
      "id": "0.0.0.1+-payinfo-dd+249648",
      "href": null,
      "description": null,
      "isPreferred": true,
      "name": "Adam Baker's Direct Debit Account",
      "status": null,
      "statusDate": null,
      "account": "0.0.0.1+-account+104221",
      "relatedParty": null,
      "validFor": null,
      "@baseType": "PaymentMethodRefOrValue",
      "@schemaLocation": null,
      "@type": "PaymentMethodRef",
      "@referredType": null
   },
   "requestor": null,
   "taxAmount": null,
   "totalAmount": {
      "unit": "USD",
      "value": 10.0
   },
   "@baseType": "Refund",
   "@schemaLocation": null,
   "@type": "Refund"
}

Example 2: Create a Refund Using Payment Method and Account Numbers

The following example shows how to create a refund by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

The -d option specifies the file to attach as the request body.

curl -X POST 'http://host:port/brm/payment/version/refund' -d @refundCreate.json

Request Body

The following is an example of the contents of the refundCreate.json file sent as the request body.

{
   "@type": "RefundCreate",
   "account": {
      "id": "0.0.0.1-2172620"
   },
   "paymentMethod": { 
      "id": "P-1",
      "@type": "PaymentMethodRef"
   },
   "totalAmount": {
      "value": 10,
      "unit": "USD"
   },
   "description": "Refunding service fee."
}

Response Body

The following example shows the contents of the response body in JSON format.

{
   "id": "0.0.0.1+-item-refund+82547",
   "href": "http://host:port/brm/payment/version/refund/0.0.0.1+-item-refund+82547",
   "authorizationCode": null,
   "correlatorId": "R1-30",
   "description": "Item refund",
   "name": "Billing Event Log",
   "refundDate": "2025-12-09T00:38:15-08:00",
   "status": "Success",
   "statusDate": "2025-12-09T00:38:15-08:00",
   "account": {
      "id": "0.0.0.1-2172620",
      "href": null,
      "description": null,
      "name": "Adam Baker",
      "@baseType": null,
      "@schemaLocation": null,
      "@type": null,
      "@referredType": "billingAccount"
   },
   "amount": null,
   "channel": {
      "id": "0",
      "href": null,
      "name": "Unspecified",
      "@baseType": null,
      "@schemaLocation": null,
      "@type": null,
      "@referredType": null
   },
   "payment": null,
   "paymentMethod": {
      "id": "P-1",
      "href": null,
      "description": null,
      "isPreferred": true,
      "name": "Adam Baker's Direct Debit Account",
      "status": null,
      "statusDate": null,
      "account": "0.0.0.1+-account+104221",
      "relatedParty": null,
      "validFor": null,
      "@baseType": "PaymentMethodRefOrValue",
      "@schemaLocation": null,
      "@type": "PaymentMethodRef",
      "@referredType": null
   },
   "requestor": null,
   "taxAmount": null,
   "totalAmount": {
      "unit": "USD",
      "value": 10.0
   },
   "@baseType": "Refund",
   "@schemaLocation": null,
   "@type": "Refund"
}
Back to Top