latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

Drop-in Checkout Sessions

Creates a new Drop-in checkout session

Creates a new Drop-in checkout session

post/drop-in/checkout-sessions

Request body

upstreamIdstring

The upstream checkout identifier if it is different from the Digital River checkout identifier.

currencystring

A three-letter ISO currency code.

customerIdstring

The identifier of a registered customer.

language'ar' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-us' | 'en-gb' | 'es' | 'es-419' | 'fi' | 'fr' | 'fr-ca' | 'hu' | 'it' | 'ja' | 'ko' | 'nl' | 'no' | 'pl' | 'pt' | 'pt-br' | 'ru' | 'sk' | 'sv' | 'th' | 'tr' | 'zh' | 'zh-hk' | 'zh-tw'

The assigned language.

emailstring email

The customer's email address.

taxInclusiveboolean
browserIpstring

The IP address of the browser used by the customer when checking out.

applicationIdstring

An arbitrary identifier that can be used to track the application type.

localestring

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

customerType'business' | 'individual'

The type of customer.

chargeType'customer_initiated' | 'merchant_initiated' | 'moto'

Represents the charge type.

styleobject

Style for drop-in

metadataMetadata

Key-value pairs used to store additional data. Value can be string, boolean or integer types.

Example request

{
  "upstreamId": "7765374748",
  "currency": "USD",
  "customerId": "354276756332",
  "language": "en",
  "email": "jsmith@digitalriver.com",
  "taxInclusive": true,
  "items": [
    {
      "skuId": "sku_5823594809",
      "productDetails": {
        "id": "100067660336",
        "skuGroupId": "wireless-keyboards",
        "name": "Keyboard",
        "description": "Top rated keyboard",
        "categories": "Sports & Outdoors > Exercise & Fitness > Wearable Technology > Fitness Trackers",
        "url": "https://producturl.com",
        "countryOfOrigin": "US",
        "image": "https://imageurl.com",
        "weight": 20.5,
        "weightUnit": "oz",
        "partNumber": "SWG1224J10L",
        "partnerAccountId": "00g6atnynbl2wFsFG357"
      },
      "logisticsOptions": {
        "deliveryOptions": [
          "[\"direct_delivery_only\",\"additional_handling\"]"
        ],
        "dangerousGoods": [
          "nimh_battery"
        ]
      },
      "subscriptionInfo": {
        "freeTrial": true,
        "autoRenewal": true,
        "terms": "Please accept these terms.",
        "planId": "654321",
        "plan": {
          "interval": "month",
          "intervalCount": 1
        },
        "subscriptionId": "665430999",
        "billingAgreementId": "cfeba2ac-d532-49e4-99f4-7a433507facf",
        "startTime": "2020-05-21T00:00:00Z",
        "endTime": "2021-05-20T11:59:59Z"
      },
      "price": 9.99,
      "aggregatePrice": 9.99,
      "strikeThroughPrice": 9.99,
      "quantity": 2,
      "discount": {
        "amountOff": 5.95,
        "percentOff": 100,
        "quantity": 1
      },
      "shipFrom": {
        "address": {
          "line1": "10380 Bren Rd W",
          "city": "Minnetonka",
          "postalCode": "55129",
          "state": "MN",
          "country": "US"
        },
        "additionalAddressInfo": {
          "neighborhood": "Centro",
          "division": "営業部",
          "phoneticName": "ヤマダ タロ"
        }
      },
      "metadata": {
        "coupon": "iOS"
      }
    }
  ],
  "shipTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "営業部",
      "phoneticName": "ヤマダ タロ"
    }
  },
  "billTo": {
    "address": {
      "line1": "10380 Bren Rd W",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "name": "John Smith",
    "phone": "952-111-1111",
    "email": "jsmith@digitalriver.com",
    "organization": "Digital River",
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "営業部",
      "phoneticName": "ヤマダ タロ"
    }
  },
  "shipFrom": {
    "address": {
      "line1": "10380 Bren Rd W",
      "city": "Minnetonka",
      "postalCode": "55129",
      "state": "MN",
      "country": "US"
    },
    "additionalAddressInfo": {
      "neighborhood": "Centro",
      "division": "営業部",
      "phoneticName": "ヤマダ タロ"
    }
  },
  "discount": {
    "amountOff": 5.95,
    "percentOff": 100
  },
  "browserIp": "111.111.111.111",
  "applicationId": "68f72e0c-cb7d-48e1-93c8-998668ad0ff4",
  "locale": "en_US",
  "customerType": "individual",
  "chargeType": "merchant_initiated",
  "taxIdentifiers": [
    {
      "id": "028af316-2d82-4113-8c5d-72eb82d5d025"
    }
  ],
  "disclosures": [
    {
      "type": "termsOfSale",
      "entityName": "Digital River Inc.",
      "entityId": "DR_INC-ENTITY",
      "localizedText": "Terms of Sale",
      "url": "https://store.digitalriver.com/store/defaults/en_US/DisplayDRTermsAndConditionsPage/eCommerceProvider.Digital%20River%20Inc."
    }
  ],
  "style": {
    "modal": {
      "borderRadius": "8px",
      "fontFamily": "Montserrat, sans-serif",
      "fontVariant": "normal",
      "letterSpacing": "1px",
      "logo": "https://drh.img.digitalriver.com/DRHM/Storefront/Site/drdod15/cm/images/DR-Demo-Store_New.png",
      "themeColor": {
        "headerBackground": "#fff",
        "highlight": "#002f57",
        "mainBackground": "#fff",
        "primary": "#00a7e1",
        "stepperBorder": "#00a7e1"
      }
    },
    "textField": {
      "base": {
        "color": "#000",
        "fontFamily": "Arial, Helvetica, sans-serif",
        "fontSize": "20px",
        "fontVariant": "normal",
        "letterSpacing": "1px"
      }
    }
  },
  "options": {
    "addresses": [
      {
        "address": {
          "line1": "10380 Bren Rd W",
          "city": "Minnetonka",
          "postalCode": "55129",
          "state": "MN",
          "country": "US"
        },
        "name": "John Smith",
        "phone": "952-111-1111",
        "email": "jsmith@digitalriver.com",
        "organization": "Digital River",
        "additionalAddressInfo": {
          "neighborhood": "Centro",
          "division": "営業部",
          "phoneticName": "ヤマダ タロ"
        }
      }
    ],
    "shippingMethods": [
      {
        "amount": 5.95,
        "description": "USPS: Priority (1 day delivery)",
        "serviceLevel": "Standard Ground",
        "deliveryInformation": {
          "businessDaysInTransit": "3 - 5 Business Days",
          "estimatedArrival": {
            "date": "2018-04-25T20:36:00Z",
            "dayOfWeek": "Tuesday"
          },
          "pickupDate": "2018-04-25T20:36:00Z",
          "weekendService": {
            "saturdayDelivery": true
          },
          "supportCutoffTime": "180000"
        }
      }
    ],
    "storeCredits": [
      {
        "amount": 5,
        "name": "Gift card",
        "upstreamId": "7654-2345-0987-123456",
        "iconUrl": "https://test.com/logo.png",
        "lastFour": "7831"
      }
    ]
  },
  "redirects": {
    "successUrl": "https://digitalriver.com/success",
    "cancelUrl": "https://digitalriver.com/cancel"
  },
  "metadata": {
    "coupon": "iOS"
  }
}

Response

201 Created

idstring

The unique checkout session identifier.

linkstring

The domain of the hosted link.

liveModeboolean

Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.

Example response

{
  "id": "028af316-2d82-4113-8c5d-123456789",
  "link": "https://store.digitalriver.com/dropin-checkout/v1/modal?sessionId=028af316-2d82-4113-8c5d-123456789&token=pk_45971nf84m0he7792nmgmhi83mhu49sh"
}