Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time

Digitalriver APIs Client Library for PHP

Use this SDK to integrate Digital River API into your commerce app.

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2022
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen


PHP 7.2 and later

Installation & Usage


To install the bindings via Composer, add the following to composer.json:

  "repositories": [
      "type": "vcs",
      "url": ""
  "require": {
    "digitalriver/digital-river-php": "*@dev"

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/Digitalriver APIs Client Library for PHP/vendor/autoload.php');


To run the unit tests:

composer install

Getting Started

Please follow the installation procedure and then run the following:

require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer authorization: bearerAuth
// The following example will create a checkout. Replace YOUR_ACCESS_TOKEN with your confidential API key.
$config = DigitalRiver\ApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new DigitalRiver\ApiSdk\Api\CheckoutsApi(
  // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  // This is optional, `GuzzleHttp\Client` will be used as default.
  new GuzzleHttp\Client(),
  $checkout_request = new \DigitalRiver\ApiSdk\Model\CheckoutRequest(); // \DigitalRiver\ApiSdk\Model\CheckoutRequest |
  // Refer \DigitalRiver\ApiSdk\Model\CheckoutRequest::$setters in digital-river-php/lib/Model/CheckoutRequest.php to set the properties.

  $ship_from_address = new DigitalRiver\ApiSdk\Model\Address();
  $ship_from_address->setLine1('10380 Bren Road West');
  $ship_from = new DigitalRiver\ApiSdk\Model\ShipFrom();

  $ship_to_address = new DigitalRiver\ApiSdk\Model\Address();
  $ship_to_address->setLine1('123 Sesame Street');
  $ship_to_address->setLine2('Suite 1a');

  $ship_to =  new DigitalRiver\ApiSdk\Model\Shipping();
  $ship_to->setName('John Doe');
  $ship_to->setOrganization('Company Name (optional)');

  $shipping_choice = new DigitalRiver\ApiSdk\Model\ShippingRequest();
  $shipping_choice->setDescription("Client provides-Standard Ground - US");
  $shipping_choice->setServiceLevel("Client provides shipping service");
  $item_1 = new DigitalRiver\ApiSdk\Model\SkuRequestItem();
  $item_2 = new DigitalRiver\ApiSdk\Model\SkuRequestItem();
  $item_3 = new DigitalRiver\ApiSdk\Model\SkuRequestItem();

try {
  $result = $apiInstance->createCheckouts($checkout_request);
  } catch (Exception $e) {
    echo 'Exception when calling CheckoutsApi->createCheckouts: ', $e->getMessage(), PHP_EOL;

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
ChargesApi retrieveCharges GET /charges/{id} Gets a charge by ID
CheckoutsApi attachSourceToCheckout POST /checkouts/{id}/sources/{sourceId} Attach source to checkout.
CheckoutsApi createCheckouts POST /checkouts Creates a new checkout
CheckoutsApi deleteCheckouts DELETE /checkouts/{id} Deletes a checkout by ID.
CheckoutsApi detachSourceToCheckout DELETE /checkouts/{id}/sources/{sourceId} Deletes a checkout association to source.
CheckoutsApi listCheckouts GET /checkouts Returns a list of checkouts
CheckoutsApi retrieveCheckouts GET /checkouts/{id} Gets a checkout by ID.
CheckoutsApi updateCheckouts POST /checkouts/{id} Updates an existing checkout
CountrySpecificationsApi listCountrySpecifications GET /country-specs Returns an array containing a country specification
CustomersApi createCustomerSource POST /customers/{id}/sources/{sourceId} Attaches a source to a customer
CustomersApi createCustomerTaxIdentifier POST /customers/{id}/tax-identifiers/{taxId} Attaches a tax identifier to a customer
CustomersApi createCustomers POST /customers Creates a new customer
CustomersApi deleteCustomerSource DELETE /customers/{id}/sources/{sourceId} Detaches a source from a customer
CustomersApi deleteCustomers DELETE /customers/{id} Deletes a customer by ID
CustomersApi listCustomers GET /customers Returns a list of customers
CustomersApi retrieveCustomers GET /customers/{id} Gets a customer by ID
CustomersApi updateCustomers POST /customers/{id} Updates an existing customer
DropInCheckoutLinksApi createDropInCheckoutLink POST /drop-in/checkout-links Creates a new Drop-in checkout link
DropInCheckoutLinksApi deleteDropInCheckoutLinks DELETE /drop-in/checkout-links/{id} Deletes a Drop-in checkout link by ID.
DropInCheckoutLinksApi listDropInCheckoutLink GET /drop-in/checkout-links List Drop-in checkout links
DropInCheckoutSessionsApi createDropInCheckoutSession POST /drop-in/checkout-sessions Creates a new Drop-in checkout session
DropInShippingQuotesApi listShippingMethodQuotes POST /checkout/shipping-quotes Returns shipping method quotes
EventsApi listEvents GET /events Returns a list of events
EventsApi retrieveEvents GET /events/{id} Gets an event by identifier
FeesApi createFees POST /fees Creates a fee
FeesApi deleteFees DELETE /fees/{id} Deletes a fee by identifier
FeesApi listFees GET /fees Returns a list of fees
FeesApi retrieveFees GET /fees/{id} Gets a Fee by identifier
FeesApi updateFees POST /fees/{id} Updates an existing Fee
FileLinksApi createFileLinks POST /file-links Creates a file link
FileLinksApi deleteFileLinks DELETE /file-links/{id} Deletes a file link by ID.
FileLinksApi listFileLinks GET /file-links Returns a list of file links
FileLinksApi retrieveFileLinks GET /file-links/{id} Gets a file link by identifer
FileLinksApi updateFileLinks POST /file-links/{id} Updates a file link
FilesApi createFiles POST /files Creates a file.
FilesApi deleteFiles DELETE /files/{id} Deletes a file by ID.
FilesApi downloadFiles GET /files/{id}/content Gets file content by ID.
FilesApi listFiles GET /files Returns a list of files.
FilesApi retrieveFiles GET /files/{id} Gets a file by ID.
FulfillmentCancellationsApi createFulfillmentCancellations POST /fulfillment-cancellations Creates a cancellation
FulfillmentCancellationsApi listFulfillmentCancellations GET /fulfillment-cancellations Returns a list of fulfillment cancellations
FulfillmentCancellationsApi retrieveFulfillmentCancellations GET /fulfillment-cancellations/{id} Gets a fulfillment cancellation by its unique identifier.
FulfillmentOrdersApi createFulfillmentOrders POST /fulfillment-orders Creates a new Fulfillment order
FulfillmentOrdersApi listFulfillmentOrders GET /fulfillment-orders Returns a list of Fulfillment orders.
FulfillmentOrdersApi retrieveFulfillmentOrders GET /fulfillment-orders/{id} Gets a Fulfillment order by ID.
FulfillmentReturnsApi createFulfillmentReturns POST /fulfillment-returns Creates a return
FulfillmentReturnsApi listFulfillmentReturns GET /fulfillment-returns Returns a list of fulfillment returns
FulfillmentReturnsApi retrieveFulfillmentReturns GET /fulfillment-returns/{id} Gets a fulfillment return by its unique identifier
FulfillmentsApi createFulfillments POST /fulfillments Creates a Fulfillment
FulfillmentsApi listFulfillments GET /fulfillments Returns a list of Fulfillments.
FulfillmentsApi retrieveFulfillments GET /fulfillments/{id} Gets a Fulfillment by unique identifier
InventoryItemsApi createInventoryItems POST /inventory-items Creates an inventory item.
InventoryItemsApi deleteInventoryItems DELETE /inventory-items/{id} Deletes an inventory item by ID.
InventoryItemsApi listInventoryItems GET /inventory-items Returns a list of inventory items.
InventoryItemsApi retrieveInventoryItems GET /inventory-items/{id} Gets an inventory item by ID.
InventoryItemsApi updateInventoryItems POST /inventory-items/{id} Updates an inventory item.
InventoryLevelsApi listInventoryLevels GET /inventory-levels Returns a list of inventory levels.
InvoicesApi attachSourceToInvoice POST /invoices/{id}/sources/{sourceId} Attach source to invoice.
InvoicesApi createInvoices POST /invoices Creates a new invoice
InvoicesApi deleteInvoices DELETE /invoices/{id} Deletes an invoice.
InvoicesApi detachSourceToInvoice DELETE /invoices/{id}/sources/{sourceId} Deletes a invoice association to source.
InvoicesApi listInvoices GET /invoices Returns a list of invoices
InvoicesApi openInvoices POST /invoices/{id}/open Opens an existing invoice
InvoicesApi retrieveInvoices GET /invoices/{id} Gets an invoice by identifier
InvoicesApi updateInvoices POST /invoices/{id} Updates an existing invoice
InvoicesApi voidInvoices POST /invoices/{id}/void Voids an existing invoice
LogisticsReturnsApi createLogisticsReturns POST /logistics-returns Creates a return
LogisticsReturnsApi listLogisticsReturns GET /logistics-returns Returns a list of returns
LogisticsReturnsApi retrieveLogisticsReturns GET /logistics-returns/{id} Gets a return by ID
OrdersApi createOrders POST /orders Creates a new order.
OrdersApi listOrders GET /orders Returns a list of orders.
OrdersApi retrieveOrders GET /orders/{id} Gets an order by ID.
OrdersApi updateOrders POST /orders/{id} Updates an existing order.
PayoutTransactionsApi listPayoutTransactions GET /payouts/{id}/transactions Lists the payout transactions for a payout.
PayoutsApi listPayouts GET /payouts Returns a list of payouts
PayoutsApi retrievePayouts GET /payouts/{id} Gets a payout by ID.
PlansApi createPlans POST /plans Creates a Plan
PlansApi deletePlans DELETE /plans/{id} Deletes a Plan by ID
PlansApi listPlans GET /plans Returns a list of Plans
PlansApi retrievePlans GET /plans/{id} Gets a Plan by ID
PlansApi updatePlans POST /plans/{id} Updates a Plan
RefundsApi createRefunds POST /refunds Creates a refund for an order.
RefundsApi listRefunds GET /refunds Returns a list of refunds
RefundsApi retrieveRefunds GET /refunds/{id} Gets a refund by ID.
RefundsApi updateRefunds POST /refunds/{id} Updates a refund for an order or a specific order charge.
ReservationsApi createReservations POST /reservations Create a reservation
ReservationsApi deleteReservations DELETE /reservations/{id} Cancels a reservation by ID.
ReturnsApi createReturns POST /returns Creates a return
ReturnsApi listReturns GET /returns Returns a list of returns
ReturnsApi retrieveReturns GET /returns/{id} Gets a return by ID
ReturnsApi updateReturns POST /returns/{id} Updates an existing return
SKUsApi createSkus POST /skus Creates a SKU
SKUsApi deleteSkus DELETE /skus/{id} Deletes a SKU by ID
SKUsApi listSkus GET /skus Returns a list of SKUs
SKUsApi retrieveSkus GET /skus/{id} Gets a SKU by ID
SKUsApi updateSkus POST /skus/{id} Updates a SKU
SKUsApi upsertSkus PUT /skus/{id} Upserts a SKU
SalesSummariesApi listSalesSummaries GET /sales-summaries Returns a list of sales summaries
SalesSummariesApi retrieveSalesSummaries GET /sales-summaries/{id} Gets a sales summary by ID.
SalesTransactionsApi listSalesTransactions GET /sales-transactions Returns a list of sales transactions
SalesTransactionsApi retrieveSalesTransactions GET /sales-transactions/{id} Gets a sales transaction by ID.
ShipmentsApi listShipments GET /shipments Returns a list of shipments
ShipmentsApi retrieveShipments GET /shipments/{id} Gets a shipment by ID.
ShippingLabelsApi createShippingLabel POST /shipping-labels Returns shipping label
ShippingLabelsApi listShippingLabel GET /shipping-labels Returns shipping label
ShippingQuotesApi postShippingQuotes POST /shipping-quotes Returns shipping quotes
SkuGroupsApi listSkuGroups GET /sku-groups Returns a list of SKU Groups
SourcesApi createSources POST /sources Posts a source
SourcesApi retrieveSources GET /sources/{id} Gets a source by identifier
StoreCreditCalloutApi storeCreditsCallout POST /checkouts/store-credits Store credit callout
SubscriptionsApi deleteSubscriptions DELETE /subscriptions/{id} Deletes a Subscription by ID
SubscriptionsApi listSubscriptions GET /subscriptions Returns a list of Subscriptions
SubscriptionsApi retrieveSubscriptions GET /subscriptions/{id} Gets a Subscription by ID
SubscriptionsApi updateSubscriptions POST /subscriptions/{id} Updates a Subscription
TaxIdentifiersApi createTaxIdentifiers POST /tax-identifiers Creates a new tax identifier
TaxIdentifiersApi deleteTaxIdentifiers DELETE /tax-identifiers/{id} Deletes a tax identifier by ID.
TaxIdentifiersApi listTaxIdentifiers GET /tax-identifiers Returns a list of tax identifiers
TaxIdentifiersApi retrieveTaxIdentifiers GET /tax-identifiers/{id} Gets a tax identifier by ID.
WebhooksApi createWebhooks POST /webhooks Creates a new webhook
WebhooksApi deleteWebhooks DELETE /webhooks/{id} Deletes a webhook endpoint by ID.
WebhooksApi listWebhooks GET /webhooks Returns a list of webhooks
WebhooksApi retrieveWebhooks GET /webhooks/{id} Gets a webhook endpoint by ID.
WebhooksApi updateWebhooks PATCH /webhooks/{id} Updates an existing webhook endpoint

Documentation For Models

Documentation For Authorization


  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header


  • Type: Bearer authentication



PHP SDK for integrating the Digital River API into your commerce app.






No packages published