Skip to main content
POST
/
commerce
/
orders
/
{orderId}
/
refunds
Error
A valid request URL is required to generate request examples
{
  "id": "<string>",
  "orderId": "<string>",
  "reason": "<string>",
  "reasonCode": "<string>",
  "payment": {
    "id": "<string>",
    "groupId": {
      "targetType": "<string>",
      "targetId": "<string>",
      "targetNumber": 123
    },
    "paymentServiceTransactionId": "<string>",
    "availableActions": [
      "<string>"
    ],
    "orderId": "<string>",
    "paymentType": "<string>",
    "paymentWorkflow": "<string>",
    "externalTransactionId": "<string>",
    "billingInfo": {
      "paymentType": "<string>",
      "paymentWorkflow": "<string>",
      "billingContact": {
        "id": 123,
        "email": "<string>",
        "firstName": "<string>",
        "middleNameOrInitial": "<string>",
        "lastNameOrSurname": "<string>",
        "companyOrOrganization": "<string>",
        "phoneNumbers": {
          "home": "<string>",
          "mobile": "<string>",
          "work": "<string>"
        },
        "address": {
          "address1": "<string>",
          "address2": "<string>",
          "address3": "<string>",
          "address4": "<string>",
          "cityOrTown": "<string>",
          "stateOrProvince": "<string>",
          "postalOrZipCode": "<string>",
          "countryCode": "<string>",
          "addressType": "<string>",
          "isValidated": true
        }
      },
      "isSameBillingShippingAddress": true,
      "card": {
        "paymentOrCardType": "<string>",
        "cardNumberPartOrMask": "<string>",
        "expireMonth": 123,
        "expireYear": 123,
        "bin": "<string>",
        "paymentServiceCardId": "<string>",
        "isUsedRecurring": true,
        "nameOnCard": "<string>",
        "isCardInfoSaved": true,
        "isTokenized": true,
        "ccLastFour": "<string>"
      },
      "token": {
        "paymentServiceTokenId": "<string>",
        "type": "<string>"
      },
      "purchaseOrder": {
        "purchaseOrderNumber": "<string>",
        "paymentTerm": {
          "code": "<string>",
          "description": "<string>"
        },
        "customFields": [
          {
            "code": "<string>",
            "label": "<string>",
            "value": "<string>"
          }
        ]
      },
      "check": {
        "checkNumber": "<string>"
      },
      "auditInfo": {
        "updateDate": "2023-11-07T05:31:56Z",
        "createDate": "2023-11-07T05:31:56Z",
        "updateBy": "<string>",
        "createBy": "<string>"
      },
      "storeCreditCode": "<string>",
      "storeCreditType": "<string>",
      "customCreditType": "<string>",
      "externalTransactionId": "<string>",
      "isRecurring": true,
      "recurringTransactionId": "<string>",
      "data": {}
    },
    "data": {},
    "status": "<string>",
    "subPayments": [
      {
        "status": "<string>",
        "amountCollected": 123,
        "amountCredited": 123,
        "amountRequested": 123,
        "amountRefunded": 123,
        "target": {
          "targetType": "<string>",
          "targetId": "<string>",
          "targetNumber": 123
        }
      }
    ],
    "interactions": [
      {
        "id": "<string>",
        "gatewayInteractionId": 123,
        "paymentId": "<string>",
        "orderId": "<string>",
        "target": {
          "targetType": "<string>",
          "targetId": "<string>",
          "targetNumber": 123
        },
        "currencyCode": "<string>",
        "interactionType": "<string>",
        "checkNumber": "<string>",
        "status": "<string>",
        "paymentEntryStatus": "<string>",
        "isRecurring": true,
        "isManual": true,
        "isPending": true,
        "gatewayTransactionId": "<string>",
        "gatewayAuthCode": "<string>",
        "gatewayAVSCodes": "<string>",
        "gatewayCVV2Codes": "<string>",
        "gatewayResponseCode": "<string>",
        "gatewayResponseText": "<string>",
        "gatewayResponseData": [
          {
            "key": "<string>",
            "value": "<string>"
          }
        ],
        "paymentTransactionInteractionIdReference": 123,
        "amount": 123,
        "note": "<string>",
        "interactionDate": "2023-11-07T05:31:56Z",
        "auditInfo": {
          "updateDate": "2023-11-07T05:31:56Z",
          "createDate": "2023-11-07T05:31:56Z",
          "updateBy": "<string>",
          "createBy": "<string>"
        },
        "returnId": "<string>",
        "refundId": "<string>",
        "capturableShipmentsSummary": [
          {
            "shipmentNumber": 123,
            "shipmentTotal": 123,
            "amountApplied": 123
          }
        ]
      }
    ],
    "isRecurring": true,
    "amountCollected": 123,
    "amountCredited": 123,
    "amountRequested": 123,
    "changeMessages": [
      {
        "id": "<string>",
        "correlationId": "<string>",
        "userId": "<string>",
        "userFirstName": "<string>",
        "userLastName": "<string>",
        "userScopeType": "<string>",
        "appId": "<string>",
        "appKey": "<string>",
        "appName": "<string>",
        "subjectType": "<string>",
        "success": true,
        "identifier": "<string>",
        "subject": "<string>",
        "verb": "<string>",
        "message": "<string>",
        "metadata": "<unknown>",
        "oldValue": "<string>",
        "newValue": "<string>",
        "amount": 123,
        "createDate": "2023-11-07T05:31:56Z",
        "attributes": {}
      }
    ],
    "auditInfo": {
      "updateDate": "2023-11-07T05:31:56Z",
      "createDate": "2023-11-07T05:31:56Z",
      "updateBy": "<string>",
      "createBy": "<string>"
    },
    "gatewayGiftCard": {
      "id": "<string>",
      "cardNumber": "<string>",
      "cardPin": "<string>",
      "amount": 123,
      "currencyCode": "<string>"
    },
    "installmentPlanCode": "<string>"
  },
  "amount": 123,
  "refundMethod": "<string>",
  "auditInfo": {
    "updateDate": "2023-11-07T05:31:56Z",
    "createDate": "2023-11-07T05:31:56Z",
    "updateBy": "<string>",
    "createBy": "<string>"
  }
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme.

Path Parameters

orderId
string
required

Unique identifier of the order with which to associate the package.

Query Parameters

responseFields
string

limits which fields are returned in the response body

Body

application/json

Refund to create on the order

Refund associated with an order. A refund is a single exchange of money from merchant to customer that either encapsulates a refund to a credit card or an issuance of a store credit. A refund does not reduce the 'amount collected' on an order and it is possible for a refund to exceed the total order amount.

id
string | null

Unique identifier of this order transaction.

orderId
string | null

Unique identifier of the order with which this refund is associated.

reason
string | null

Merchant-entered reason for this refund.

reasonCode
string | null
payment
object

Payment transaction associated with this order. It is the entire payment interchange between the merchant who is forwarding the customer's payment information and the payment service who is authorizing and capturing payment. Payment can be either by credit card, check, or PayPal. (PayPal not currently supported.)

amount
number<double>

Amount refunded.

refundMethod
string | null

Refund Method.

auditInfo
object

Response

Success

Refund associated with an order. A refund is a single exchange of money from merchant to customer that either encapsulates a refund to a credit card or an issuance of a store credit. A refund does not reduce the 'amount collected' on an order and it is possible for a refund to exceed the total order amount.

id
string | null

Unique identifier of this order transaction.

orderId
string | null

Unique identifier of the order with which this refund is associated.

reason
string | null

Merchant-entered reason for this refund.

reasonCode
string | null
payment
object

Payment transaction associated with this order. It is the entire payment interchange between the merchant who is forwarding the customer's payment information and the payment service who is authorizing and capturing payment. Payment can be either by credit card, check, or PayPal. (PayPal not currently supported.)

amount
number<double>

Amount refunded.

refundMethod
string | null

Refund Method.

auditInfo
object