Invoices

An Invoice represents a statement of the amount owed by a customer. They are either generated one-off or periodically from a subscription.

The Invoices resource is a critical component of the billing and payments system, capturing detailed statements of amounts owed by customers. This resource facilitates efficient financial management by allowing businesses to create, retrieve, update, and manage invoices. Users can seamlessly integrate invoicing into their workflow, whether dealing with single invoices or those generated periodically through subscriptions. Additionally, the Invoices resource supports various operations such as opening, voiding, and deleting invoices and listing all invoices in the system, ensuring comprehensive invoice management and tracking.

Returns a list of invoices

get

Gets all invoices.

Authorizations
Query parameters
createdTimestring · date-timeOptional

A filter on the list based on the createdTime field. The value can be a string with an ISO-8601 UTC format datetime or it can be a dictionary with the following options:

  • eq—return values where the createdTime field equals to this timestamp
  • gt—return values where the createdTime field is after this timestamp
  • gte—return values where the createdTime field is after or equal to this timestamp
  • lt—return values where the createdTime field is before this timestamp
  • lte—return values where the createdTime field is before or equal to this timestamp
updatedTimestring · date-timeOptional

A filter on the list based on the updatedTime field. The value can be a string with an ISO-8601 UTC format datetime or it can be a dictionary with the following options:

  • eq—return values where the updatedTime field equals this timestamp
  • gt—return values where the updatedTime field is after this timestamp
  • gte—return values where the updatedTime field is after or equal to this timestamp
  • lt—return values where the updatedTime field is before this timestamp
  • lte—return values where the updatedTime field is before or equal to this timestamp
endingBeforestringOptional

A cursor for use in pagination. The endingBefore parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with xyz your subsequent calls can include endingBefore=xyz in order to fetch the previous page of the list.

startingAfterstringOptional

A cursor for use in pagination. The startingAfter parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with xyz, your subsequent calls can include startingAfter=xyz in order to fetch the next page of the list.

limitinteger · min: 1 · max: 100Optional

A limit on the number of objects returned. Limit can range between 1 and 100, and the default is 10.

idsstring[]Optional

Only return objects with these IDs.

upstreamIdsstring[]Optional

Only return objects with these upstreamIds.

totalAmountstringOptional

A filter on the list based on the totalAmount field. The value can be a string or it can be a dictionary with the following options: - eq-return values where the amount field equals to this amount - gt-return values where the amount field is greater than this amount - gte-return values where the amount field is greater than or equal to this amount - lt-return values where the amount field is less than this amount - lte-return values where the amount field is less than or equal to this amount

customerIdstringOptional

Only return invoices for this customer

applicationIdstringOptional

Only return checkouts for the given application

currencystringOptional

Only return invoices in this currency

statestringOptional

Only return invoices in this state

skuIdstringOptional

Only return invoices for this sku

pricestringOptional

A filter on the list based on the invoice item price field. The value can be a string or it can be a dictionary with the following options:

  • eq - return values where an invoice item price field equals to this amount
  • gt - return values where an invoice item price field is greater than this amount
  • gte - return values where an invoice item price field is greater than or equal to this amount
  • lt - return values where an invoice item price field is less than this amount
  • lte - return values where an invoice item price field is less than or equal to this amount
attemptCountstringOptional

A filter on the list based on the invoice attemptCount field. The value can be a string or it can be a dictionary with the following options:

  • eq - return values where the attemptCount field equals to this amount
  • gt - return values where the attemptCount field is greater than this amount
  • gte - return values where the attemptCount field is greater than or equal to this amount
  • lt - return values where the attemptCount field is less than this amount
  • lte - return values where the attemptCount field is less than or equal to this amount
Responses
200

200 OK

application/json
get
GET /invoices HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "hasMore": true,
  "data": [
    {
      "id": "co_5823594809",
      "createdTime": "2025-09-18T10:28:46.250Z",
      "updatedTime": "2025-09-18T10:28:46.250Z",
      "customerId": "5774321009",
      "email": "[email protected]",
      "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
      "currency": "USD",
      "description": "text",
      "locale": "en-US",
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "customerType": "individual",
      "sellingEntity": {
        "id": "C5_INC-ENTITY",
        "name": "DR globalTech Inc."
      },
      "subtotal": 200,
      "totalTax": 14.25,
      "totalFees": 0,
      "totalDuty": 0,
      "importerOfRecordTax": true,
      "totalDiscount": 0,
      "totalShipping": 5.76,
      "totalAmount": 214.25,
      "collectionPeriodDays": 30,
      "items": [
        {
          "id": "text",
          "skuId": "sku_5823594809",
          "subscriptionInfo": {
            "freeTrial": true,
            "autoRenewal": true,
            "terms": "Please accept these terms.",
            "subscriptionId": "665430999",
            "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
            "startTime": "2025-09-18T10:28:46.250Z",
            "endTime": "2025-09-18T10:28:46.250Z"
          },
          "quantity": 2,
          "amount": 18.58,
          "discount": {
            "amountOff": 5.95,
            "percentOff": 100
          },
          "tax": {
            "rate": 0.0675,
            "amount": 89
          },
          "metadata": {
            "coupon": "iOS"
          }
        }
      ],
      "shipTo": {
        "address": {
          "line1": "10380 Bren Rd W",
          "line2": "text",
          "city": "Minnetonka",
          "postalCode": "55129",
          "state": "MN",
          "country": "US"
        },
        "name": "John Smith",
        "phone": "952-111-1111",
        "email": "[email protected]",
        "organization": "Digital River",
        "additionalAddressInfo": {
          "neighborhood": "Centro",
          "division": "???",
          "phoneticName": "??? ??"
        }
      },
      "state": "open",
      "stateTransitions": {
        "accepted": "2025-09-18T10:28:46.250Z",
        "pending_payment": "2025-09-18T10:28:46.250Z",
        "in_review": "2025-09-18T10:28:46.250Z",
        "complete": "2025-09-18T10:28:46.250Z",
        "cancelled": "2025-09-18T10:28:46.250Z",
        "fulfilled": "2025-09-18T10:28:46.250Z",
        "blocked": "2025-09-18T10:28:46.250Z",
        "returned": "2025-09-18T10:28:46.250Z"
      },
      "attemptCount": 5,
      "charges": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "currency": "USD",
          "amount": 1180.26,
          "state": "pending",
          "orderId": "9986340012",
          "sourceId": "9986340012",
          "failureCode": "a failure code",
          "failureMessage": "a failure message",
          "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
          "cancels": [
            {
              "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
              "createdTime": "2025-09-18T10:28:46.250Z",
              "updatedTime": "2025-09-18T10:28:46.250Z",
              "amount": 1180.26,
              "state": "pending",
              "failureCode": "text",
              "failureMessage": "text"
            }
          ],
          "captures": [
            {
              "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
              "createdTime": "2025-09-18T10:28:46.250Z",
              "updatedTime": "2025-09-18T10:28:46.250Z",
              "amount": 1180.26,
              "state": "pending",
              "failureCode": "text",
              "failureMessage": "text"
            }
          ],
          "captured": false,
          "refunds": [
            {
              "id": "ref_5823594809",
              "createdTime": "2025-09-18T10:28:46.250Z",
              "orderId": "ord_6645940010",
              "invoiceId": "5823594809",
              "currency": "USD",
              "type": "shipping",
              "amount": 9.99,
              "refundedAmount": 9.99,
              "items": [
                [
                  {
                    "type": "shipping",
                    "skuId": "sku_9234276173",
                    "quantity": 1,
                    "amount": 5.95
                  }
                ]
              ],
              "reason": "requested_by_customer",
              "failureReason": "expired_or_canceled_card",
              "state": "created",
              "tokenInformation": {
                "token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
                "expiresTime": "2025-09-18T10:28:46.250Z"
              },
              "expiresTime": "2025-09-18T10:28:46.250Z",
              "liveMode": false,
              "metadata": {
                "coupon": "iOS"
              }
            }
          ],
          "refunded": false,
          "type": "customer_initiated",
          "liveMode": true
        }
      ],
      "metadata": {
        "coupon": "iOS"
      },
      "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
      "chargeType": "merchant_initiated",
      "applicationId": "5774321009",
      "liveMode": false,
      "orderId": "5823594809",
      "upstreamId": "7765374748"
    }
  ]
}

Creates a new invoice

post

This request creates a new invoice object.

Authorizations
Body
customerIdstringRequired

The identifier of the invoiced customer.

Example: 5774321009
emailstring · emailOptional

The email address of the invoiced customer.

Example: [email protected]
sourceIdstringOptional

The unique identifier of a Source.

Example: src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37
currencystringRequired

A three-letter ISO 4217 currency code.

Example: USD
statestring · enumOptional

The state of the invoice.

Example: openPossible values:
chargeTypestring · enumOptional

Represents the charge type.

Example: merchant_initiatedPossible values:
descriptionstringOptional

An arbitrary string attached to the invoice.

localestringOptional

A designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code.

Example: en-US
customerTypestring · enumOptional

The type of customer.

Example: individualPossible values:
collectionPeriodDaysintegerOptional

The number of days that Digital River attempts to collect payment if billingOptimization is set to true. The default is 30 days.

Example: 30
billingOptimizationbooleanOptional

Indicates whether billing is optimized. The default is true.

Example: true
taxInclusivebooleanOptional

If true, indicates that the prices supplied are tax inclusive.

Example: true
upstreamIdstringOptional

The invoice identifier if it is different from the Digital River invoice identifier.

Example: 7765374748
applicationIdstringOptional

The identifier of the client application that created the checkout.

Example: 5774321009
Responses
201

201 Created

application/json
post
POST /invoices HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1198

{
  "customerId": "5774321009",
  "email": "[email protected]",
  "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
  "currency": "USD",
  "state": "open",
  "chargeType": "merchant_initiated",
  "description": "text",
  "locale": "en-US",
  "customerType": "individual",
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "[email protected]",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "???",
      "phoneticName": "??? ??"
    }
  },
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "collectionPeriodDays": 30,
  "billingOptimization": true,
  "items": [
    {
      "skuId": "5823594809",
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2025-09-18T10:28:46.250Z",
        "endTime": "2025-09-18T10:28:46.250Z"
      },
      "price": 9.99,
      "aggregatePrice": 19.98,
      "quantity": 2,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "taxInclusive": true,
  "metadata": {
    "coupon": "iOS"
  },
  "upstreamId": "7765374748",
  "applicationId": "5774321009"
}
{
  "id": "co_5823594809",
  "createdTime": "2025-09-18T10:28:46.250Z",
  "updatedTime": "2025-09-18T10:28:46.250Z",
  "customerId": "5774321009",
  "email": "[email protected]",
  "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
  "currency": "USD",
  "description": "text",
  "locale": "en-US",
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "customerType": "individual",
  "sellingEntity": {
    "id": "C5_INC-ENTITY",
    "name": "DR globalTech Inc."
  },
  "subtotal": 200,
  "totalTax": 14.25,
  "totalFees": 0,
  "totalDuty": 0,
  "importerOfRecordTax": true,
  "totalDiscount": 0,
  "totalShipping": 5.76,
  "totalAmount": 214.25,
  "collectionPeriodDays": 30,
  "items": [
    {
      "id": "text",
      "skuId": "sku_5823594809",
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2025-09-18T10:28:46.250Z",
        "endTime": "2025-09-18T10:28:46.250Z"
      },
      "quantity": 2,
      "amount": 18.58,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "tax": {
        "rate": 0.0675,
        "amount": 89
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "[email protected]",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "???",
      "phoneticName": "??? ??"
    }
  },
  "state": "open",
  "stateTransitions": {
    "accepted": "2025-09-18T10:28:46.250Z",
    "pending_payment": "2025-09-18T10:28:46.250Z",
    "in_review": "2025-09-18T10:28:46.250Z",
    "complete": "2025-09-18T10:28:46.250Z",
    "cancelled": "2025-09-18T10:28:46.250Z",
    "fulfilled": "2025-09-18T10:28:46.250Z",
    "blocked": "2025-09-18T10:28:46.250Z",
    "returned": "2025-09-18T10:28:46.250Z"
  },
  "attemptCount": 5,
  "charges": [
    {
      "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
      "createdTime": "2025-09-18T10:28:46.250Z",
      "currency": "USD",
      "amount": 1180.26,
      "state": "pending",
      "orderId": "9986340012",
      "sourceId": "9986340012",
      "failureCode": "a failure code",
      "failureMessage": "a failure message",
      "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
      "cancels": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captures": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captured": false,
      "refunds": [
        {
          "id": "ref_5823594809",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "orderId": "ord_6645940010",
          "invoiceId": "5823594809",
          "currency": "USD",
          "type": "shipping",
          "amount": 9.99,
          "refundedAmount": 9.99,
          "items": [
            [
              {
                "type": "shipping",
                "skuId": "sku_9234276173",
                "quantity": 1,
                "amount": 5.95
              }
            ]
          ],
          "reason": "requested_by_customer",
          "failureReason": "expired_or_canceled_card",
          "state": "created",
          "tokenInformation": {
            "token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
            "expiresTime": "2025-09-18T10:28:46.250Z"
          },
          "expiresTime": "2025-09-18T10:28:46.250Z",
          "liveMode": false,
          "metadata": {
            "coupon": "iOS"
          }
        }
      ],
      "refunded": false,
      "type": "customer_initiated",
      "liveMode": true
    }
  ],
  "metadata": {
    "coupon": "iOS"
  },
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "chargeType": "merchant_initiated",
  "applicationId": "5774321009",
  "liveMode": false,
  "orderId": "5823594809",
  "upstreamId": "7765374748"
}

Gets an invoice by identifier

get

Retrieves the details of an invoice by supplying its unique identifier.

Authorizations
Path parameters
idstringRequired

The unique identifier of the Invoice.

Responses
200

OK.

application/json
get
GET /invoices/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "co_5823594809",
  "createdTime": "2025-09-18T10:28:46.250Z",
  "updatedTime": "2025-09-18T10:28:46.250Z",
  "customerId": "5774321009",
  "email": "[email protected]",
  "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
  "currency": "USD",
  "description": "text",
  "locale": "en-US",
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "customerType": "individual",
  "sellingEntity": {
    "id": "C5_INC-ENTITY",
    "name": "DR globalTech Inc."
  },
  "subtotal": 200,
  "totalTax": 14.25,
  "totalFees": 0,
  "totalDuty": 0,
  "importerOfRecordTax": true,
  "totalDiscount": 0,
  "totalShipping": 5.76,
  "totalAmount": 214.25,
  "collectionPeriodDays": 30,
  "items": [
    {
      "id": "text",
      "skuId": "sku_5823594809",
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2025-09-18T10:28:46.250Z",
        "endTime": "2025-09-18T10:28:46.250Z"
      },
      "quantity": 2,
      "amount": 18.58,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "tax": {
        "rate": 0.0675,
        "amount": 89
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "[email protected]",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "???",
      "phoneticName": "??? ??"
    }
  },
  "state": "open",
  "stateTransitions": {
    "accepted": "2025-09-18T10:28:46.250Z",
    "pending_payment": "2025-09-18T10:28:46.250Z",
    "in_review": "2025-09-18T10:28:46.250Z",
    "complete": "2025-09-18T10:28:46.250Z",
    "cancelled": "2025-09-18T10:28:46.250Z",
    "fulfilled": "2025-09-18T10:28:46.250Z",
    "blocked": "2025-09-18T10:28:46.250Z",
    "returned": "2025-09-18T10:28:46.250Z"
  },
  "attemptCount": 5,
  "charges": [
    {
      "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
      "createdTime": "2025-09-18T10:28:46.250Z",
      "currency": "USD",
      "amount": 1180.26,
      "state": "pending",
      "orderId": "9986340012",
      "sourceId": "9986340012",
      "failureCode": "a failure code",
      "failureMessage": "a failure message",
      "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
      "cancels": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captures": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captured": false,
      "refunds": [
        {
          "id": "ref_5823594809",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "orderId": "ord_6645940010",
          "invoiceId": "5823594809",
          "currency": "USD",
          "type": "shipping",
          "amount": 9.99,
          "refundedAmount": 9.99,
          "items": [
            [
              {
                "type": "shipping",
                "skuId": "sku_9234276173",
                "quantity": 1,
                "amount": 5.95
              }
            ]
          ],
          "reason": "requested_by_customer",
          "failureReason": "expired_or_canceled_card",
          "state": "created",
          "tokenInformation": {
            "token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
            "expiresTime": "2025-09-18T10:28:46.250Z"
          },
          "expiresTime": "2025-09-18T10:28:46.250Z",
          "liveMode": false,
          "metadata": {
            "coupon": "iOS"
          }
        }
      ],
      "refunded": false,
      "type": "customer_initiated",
      "liveMode": true
    }
  ],
  "metadata": {
    "coupon": "iOS"
  },
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "chargeType": "merchant_initiated",
  "applicationId": "5774321009",
  "liveMode": false,
  "orderId": "5823594809",
  "upstreamId": "7765374748"
}

Updates an existing invoice

post

Updates an existing invoice.

Authorizations
Path parameters
idstringRequired

The unique identifier of the Invoice.

Body
Responses
200

200 OK

application/json
post
POST /invoices/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "metadata": {
    "coupon": "iOS"
  }
}
{
  "id": "co_5823594809",
  "createdTime": "2025-09-18T10:28:46.250Z",
  "updatedTime": "2025-09-18T10:28:46.250Z",
  "customerId": "5774321009",
  "email": "[email protected]",
  "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
  "currency": "USD",
  "description": "text",
  "locale": "en-US",
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "customerType": "individual",
  "sellingEntity": {
    "id": "C5_INC-ENTITY",
    "name": "DR globalTech Inc."
  },
  "subtotal": 200,
  "totalTax": 14.25,
  "totalFees": 0,
  "totalDuty": 0,
  "importerOfRecordTax": true,
  "totalDiscount": 0,
  "totalShipping": 5.76,
  "totalAmount": 214.25,
  "collectionPeriodDays": 30,
  "items": [
    {
      "id": "text",
      "skuId": "sku_5823594809",
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2025-09-18T10:28:46.250Z",
        "endTime": "2025-09-18T10:28:46.250Z"
      },
      "quantity": 2,
      "amount": 18.58,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "tax": {
        "rate": 0.0675,
        "amount": 89
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "[email protected]",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "???",
      "phoneticName": "??? ??"
    }
  },
  "state": "open",
  "stateTransitions": {
    "accepted": "2025-09-18T10:28:46.250Z",
    "pending_payment": "2025-09-18T10:28:46.250Z",
    "in_review": "2025-09-18T10:28:46.250Z",
    "complete": "2025-09-18T10:28:46.250Z",
    "cancelled": "2025-09-18T10:28:46.250Z",
    "fulfilled": "2025-09-18T10:28:46.250Z",
    "blocked": "2025-09-18T10:28:46.250Z",
    "returned": "2025-09-18T10:28:46.250Z"
  },
  "attemptCount": 5,
  "charges": [
    {
      "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
      "createdTime": "2025-09-18T10:28:46.250Z",
      "currency": "USD",
      "amount": 1180.26,
      "state": "pending",
      "orderId": "9986340012",
      "sourceId": "9986340012",
      "failureCode": "a failure code",
      "failureMessage": "a failure message",
      "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
      "cancels": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captures": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captured": false,
      "refunds": [
        {
          "id": "ref_5823594809",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "orderId": "ord_6645940010",
          "invoiceId": "5823594809",
          "currency": "USD",
          "type": "shipping",
          "amount": 9.99,
          "refundedAmount": 9.99,
          "items": [
            [
              {
                "type": "shipping",
                "skuId": "sku_9234276173",
                "quantity": 1,
                "amount": 5.95
              }
            ]
          ],
          "reason": "requested_by_customer",
          "failureReason": "expired_or_canceled_card",
          "state": "created",
          "tokenInformation": {
            "token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
            "expiresTime": "2025-09-18T10:28:46.250Z"
          },
          "expiresTime": "2025-09-18T10:28:46.250Z",
          "liveMode": false,
          "metadata": {
            "coupon": "iOS"
          }
        }
      ],
      "refunded": false,
      "type": "customer_initiated",
      "liveMode": true
    }
  ],
  "metadata": {
    "coupon": "iOS"
  },
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "chargeType": "merchant_initiated",
  "applicationId": "5774321009",
  "liveMode": false,
  "orderId": "5823594809",
  "upstreamId": "7765374748"
}

Deletes an invoice

delete

This requrest deletes an invoice.

Authorizations
Path parameters
idstringRequired

The unique identifier of the Invoice.

Responses
204

204 No Content

No content

delete
DELETE /invoices/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Opens an existing invoice

post

This request opens an invoice.

Authorizations
Path parameters
idstringRequired

The unique identifier of the Invoice.

Responses
200

200 OK

application/json
post
POST /invoices/{id}/open HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "co_5823594809",
  "createdTime": "2025-09-18T10:28:46.250Z",
  "updatedTime": "2025-09-18T10:28:46.250Z",
  "customerId": "5774321009",
  "email": "[email protected]",
  "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
  "currency": "USD",
  "description": "text",
  "locale": "en-US",
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "customerType": "individual",
  "sellingEntity": {
    "id": "C5_INC-ENTITY",
    "name": "DR globalTech Inc."
  },
  "subtotal": 200,
  "totalTax": 14.25,
  "totalFees": 0,
  "totalDuty": 0,
  "importerOfRecordTax": true,
  "totalDiscount": 0,
  "totalShipping": 5.76,
  "totalAmount": 214.25,
  "collectionPeriodDays": 30,
  "items": [
    {
      "id": "text",
      "skuId": "sku_5823594809",
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2025-09-18T10:28:46.250Z",
        "endTime": "2025-09-18T10:28:46.250Z"
      },
      "quantity": 2,
      "amount": 18.58,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "tax": {
        "rate": 0.0675,
        "amount": 89
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "[email protected]",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "???",
      "phoneticName": "??? ??"
    }
  },
  "state": "open",
  "stateTransitions": {
    "accepted": "2025-09-18T10:28:46.250Z",
    "pending_payment": "2025-09-18T10:28:46.250Z",
    "in_review": "2025-09-18T10:28:46.250Z",
    "complete": "2025-09-18T10:28:46.250Z",
    "cancelled": "2025-09-18T10:28:46.250Z",
    "fulfilled": "2025-09-18T10:28:46.250Z",
    "blocked": "2025-09-18T10:28:46.250Z",
    "returned": "2025-09-18T10:28:46.250Z"
  },
  "attemptCount": 5,
  "charges": [
    {
      "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
      "createdTime": "2025-09-18T10:28:46.250Z",
      "currency": "USD",
      "amount": 1180.26,
      "state": "pending",
      "orderId": "9986340012",
      "sourceId": "9986340012",
      "failureCode": "a failure code",
      "failureMessage": "a failure message",
      "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
      "cancels": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captures": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captured": false,
      "refunds": [
        {
          "id": "ref_5823594809",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "orderId": "ord_6645940010",
          "invoiceId": "5823594809",
          "currency": "USD",
          "type": "shipping",
          "amount": 9.99,
          "refundedAmount": 9.99,
          "items": [
            [
              {
                "type": "shipping",
                "skuId": "sku_9234276173",
                "quantity": 1,
                "amount": 5.95
              }
            ]
          ],
          "reason": "requested_by_customer",
          "failureReason": "expired_or_canceled_card",
          "state": "created",
          "tokenInformation": {
            "token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
            "expiresTime": "2025-09-18T10:28:46.250Z"
          },
          "expiresTime": "2025-09-18T10:28:46.250Z",
          "liveMode": false,
          "metadata": {
            "coupon": "iOS"
          }
        }
      ],
      "refunded": false,
      "type": "customer_initiated",
      "liveMode": true
    }
  ],
  "metadata": {
    "coupon": "iOS"
  },
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "chargeType": "merchant_initiated",
  "applicationId": "5774321009",
  "liveMode": false,
  "orderId": "5823594809",
  "upstreamId": "7765374748"
}

Voids an existing invoice

post

This request voids an invoice.

Authorizations
Path parameters
idstringRequired

The unique identifier of the invoice.

Responses
200

200 OK

application/json
post
POST /invoices/{id}/void HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "co_5823594809",
  "createdTime": "2025-09-18T10:28:46.250Z",
  "updatedTime": "2025-09-18T10:28:46.250Z",
  "customerId": "5774321009",
  "email": "[email protected]",
  "sourceId": "src_a78cfeae-f7ae-4719-8e1c-d05ec04e4d37",
  "currency": "USD",
  "description": "text",
  "locale": "en-US",
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "customerType": "individual",
  "sellingEntity": {
    "id": "C5_INC-ENTITY",
    "name": "DR globalTech Inc."
  },
  "subtotal": 200,
  "totalTax": 14.25,
  "totalFees": 0,
  "totalDuty": 0,
  "importerOfRecordTax": true,
  "totalDiscount": 0,
  "totalShipping": 5.76,
  "totalAmount": 214.25,
  "collectionPeriodDays": 30,
  "items": [
    {
      "id": "text",
      "skuId": "sku_5823594809",
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2025-09-18T10:28:46.250Z",
        "endTime": "2025-09-18T10:28:46.250Z"
      },
      "quantity": 2,
      "amount": 18.58,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100
      },
      "tax": {
        "rate": 0.0675,
        "amount": 89
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "line2": "text",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "[email protected]",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "???",
      "phoneticName": "??? ??"
    }
  },
  "state": "open",
  "stateTransitions": {
    "accepted": "2025-09-18T10:28:46.250Z",
    "pending_payment": "2025-09-18T10:28:46.250Z",
    "in_review": "2025-09-18T10:28:46.250Z",
    "complete": "2025-09-18T10:28:46.250Z",
    "cancelled": "2025-09-18T10:28:46.250Z",
    "fulfilled": "2025-09-18T10:28:46.250Z",
    "blocked": "2025-09-18T10:28:46.250Z",
    "returned": "2025-09-18T10:28:46.250Z"
  },
  "attemptCount": 5,
  "charges": [
    {
      "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
      "createdTime": "2025-09-18T10:28:46.250Z",
      "currency": "USD",
      "amount": 1180.26,
      "state": "pending",
      "orderId": "9986340012",
      "sourceId": "9986340012",
      "failureCode": "a failure code",
      "failureMessage": "a failure message",
      "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
      "cancels": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captures": [
        {
          "id": "a6809a63-e6a9-4016-abbc-f33d19fccb5b",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "updatedTime": "2025-09-18T10:28:46.250Z",
          "amount": 1180.26,
          "state": "pending",
          "failureCode": "text",
          "failureMessage": "text"
        }
      ],
      "captured": false,
      "refunds": [
        {
          "id": "ref_5823594809",
          "createdTime": "2025-09-18T10:28:46.250Z",
          "orderId": "ord_6645940010",
          "invoiceId": "5823594809",
          "currency": "USD",
          "type": "shipping",
          "amount": 9.99,
          "refundedAmount": 9.99,
          "items": [
            [
              {
                "type": "shipping",
                "skuId": "sku_9234276173",
                "quantity": 1,
                "amount": 5.95
              }
            ]
          ],
          "reason": "requested_by_customer",
          "failureReason": "expired_or_canceled_card",
          "state": "created",
          "tokenInformation": {
            "token": "bb3f0f17-567a-4c87-8cbd-76d93a750709",
            "expiresTime": "2025-09-18T10:28:46.250Z"
          },
          "expiresTime": "2025-09-18T10:28:46.250Z",
          "liveMode": false,
          "metadata": {
            "coupon": "iOS"
          }
        }
      ],
      "refunded": false,
      "type": "customer_initiated",
      "liveMode": true
    }
  ],
  "metadata": {
    "coupon": "iOS"
  },
  "paymentSessionId": "8cecaa32-f692-44cc-b103-4cf24dc93913",
  "chargeType": "merchant_initiated",
  "applicationId": "5774321009",
  "liveMode": false,
  "orderId": "5823594809",
  "upstreamId": "7765374748"
}

Last updated