LogoLogo
System status
Admin APIs reference
Admin APIs reference
  • Admin APIs reference
  • Order management
    • Refunds
    • Retrieve an order (synchronous API)
    • Retrieve an invoice (synchronous API)
    • Manage orders (synchronous API)
  • Customer management
    • Retrieve a customer (synchronous API)
    • Manage a customer (synchronous API)
  • Subscription mangement
    • Manage a subscription
    • Renew a subscription
    • Apply an immediate midterm change
    • Manage subscription payments
    • Modify the subscription's external reference ID
    • Manage the subscription's address
    • Get all orders
    • Retrieve subscriptions with pending actions
    • Retrieve subscriptions
    • Manage a perpetual price
    • Update a subscription's email address
  • Site management
    • Get authorized countries
  • Product management
    • Manage products (asynchronous API)
    • Retrieve a product (synchronous API)
    • Retrieve the product task status (synchronous API)
  • Offer Management
    • Manage offers (synchronous API)
    • Retrieve an offer (synchronous API)
  • Webhook management
    • Manage webhook events
  • Payment source
    • Source management
  • File management
    • Retrieve a file
Powered by GitBook
On this page
  1. Order management

Refunds

PreviousAdmin APIs referenceNextRetrieve an order (synchronous API)

Last updated 4 months ago

Get Order Refunds Available

get

Get refunds available for an order by ID. Specify the ID of the order in the {orderId} uri path parameter.

Path parameters
orderIdstringRequired

The order's ID.

Responses
200
Successful response.
application/json
403
Invalid token
application/json
404
Order not found
application/json
get
GET /orders/{orderId}/refunds-available HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "currency": "text",
  "lineItems": [
    {
      "lineItemId": "text",
      "price": {
        "total": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalTax": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalShipping": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalShippingTax": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalDutiesAndTariffs": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalDutiesAndTariffsTax": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalFee": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        },
        "totalFeeTax": {
          "amount": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountAvailableForRefund": {
            "value": 1,
            "formattedValue": "text"
          },
          "amountRefunded": {
            "value": 1,
            "formattedValue": "text"
          }
        }
      },
      "product": {
        "companyId": "text",
        "id": "text"
      },
      "status": "text"
    }
  ],
  "price": {
    "total": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalTax": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalShipping": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalShippingTax": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalDutiesAndTariffs": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalDutiesAndTariffsTax": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalFee": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    },
    "totalFeeTax": {
      "amount": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountAvailableForRefund": {
        "value": 1,
        "formattedValue": "text"
      },
      "amountRefunded": {
        "value": 1,
        "formattedValue": "text"
      }
    }
  },
  "status": "text"
}

Get Order Refunds

get

Get refunds for an order by ID. Specify the ID of the order in the {orderId} URI path parameter.

Path parameters
orderIdstringRequired

The order's ID.

Responses
200
Successful response.
application/json
403
Invalid token
application/json
404
Order not found
application/json
get
GET /orders/{orderId}/refunds HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "refunds": []
}

Order Refund Schema

get

Gets JSON schema for order refund

Path parameters
orderIdstringRequired

The order's ID.

Responses
200
Successful response.
application/json
Responseone of
or
or
get
GET /orders/{orderId}/refunds/schema HTTP/1.1
Host: api.digitalriver.com
Accept: */*
200

Successful response.

{
  "status": "text",
  "reason": "CUSTOMER_SATISFACTION_ISSUE",
  "comments": "text",
  "type": "PRODUCT_SHOULD_NOT_HAVE_FEE",
  "category": "PRODUCT_LEVEL_FEE",
  "generationDate": "text",
  "origin": "text",
  "overrides": "text",
  "policy": "text",
  "currency": "text",
  "totalRefunded": {},
  "outstanding": {},
  "totalRequested": {},
  "refundAmount": {
    "value": 1,
    "formattedValue": "text"
  },
  "lineItems": [
    {
      "status": "text",
      "expectedQuantity": 1,
      "returnedQuantity": 1,
      "type": "text",
      "notes": "text",
      "date": "text",
      "Product": {
        "companyId": "text",
        "id": "text",
        "externalId": "text"
      },
      "lineItemId": "text",
      "refundAmount": {
        "value": 1,
        "formattedValue": "text"
      },
      "lineItemFees": [
        {
          "feeType": "text",
          "refundAmount": {
            "value": 1,
            "currency": "text"
          }
        }
      ]
    }
  ],
  "id": "text",
  "companyId": "text",
  "siteId": "text",
  "generatedBy": "text"
}
  • GETGet Order Refunds Available
  • GETGet Order Refunds
  • POSTCreate Order Refund
  • GETOrder Refund Schema

Create Order Refund

post

Use this method to create a refund.

Path parameters
orderIdstringRequired

The order's ID.

Body
one ofOptional
or
Responses
200
Successful response.
application/json
Responseone of
or
400
Bad Request
application/json
403
Invalid token
application/json
404
* Order not found * LineItem not found * Invalid refund
application/json
409
* Invalid Refund Type * Invalid Refund Category * Invalid Refund Reason * Invalid Refund Amount
application/json
post
POST /orders/{orderId}/refunds HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 197

{
  "type": "text",
  "category": "PRODUCT_LEVEL_PRODUCT",
  "reason": "CUSTOMER_SATISFACTION_ISSUE",
  "comments": "text",
  "refundAmount": {
    "value": 1
  },
  "lineItems": [
    {
      "lineItemId": "text",
      "refundAmount": {
        "value": 1
      }
    }
  ]
}
{
  "refunds": []
}