Providing address information

Learn how to provide ship from and ship to information for products in your Checkout

The Checkout resource contains attributes that allow you to set shipping addresses. Digital River then uses these values to determine the correct selling entity and process your order.

When you create a Checkout that contains one or more physical products, you are required to provide shipFrom and shipTo values and specify an address.country for each.

We don't perform real-time address validation. We expect you to validate the customer's address before you supply it to us.

Ship from address

The shipFrom attribute contains information on the address from which your physical product is shipped and consists of child attributes address and additionalAddressInfo. Use address to provide basic information on the shipment's origin and additionalAddressInfo to give us more specialized information.

Ship to address

Specify a customer's shipping information using shipTo. It consists of child attributes address and additionalAddressInfo. Use address to provide basic information on the shipment's origin and additionalAddressInfo to give us more specialized information.

The shipTo attribute also contains other child attributes that allow you to provide the customer's name, phone number, email, and organization.

Digital River uses the data contained in these objects to ensure we accurately compute taxes and comply with local invoicing regulations.

Basic address information

An Address represents basic address information. To construct this object, specify the child parameters of shipFrom.address and shipTo.address in a create Checkout request.

The following provides a description of each attribute in the Address object:

Parameter

Required/Optional

Description

line1

Optional

The first line of the address

line2

Optional

The second line of the address.

postalCode

Optional

ZIP or postal code.

state

Optional

State, County, Province, or Region.

country

Required

A two-letter Alpha-2 country code as described in the ISO 3166 international standard.

If your order contains physical goods, you must specify, at a minimum, a country value. Digital River rejects any Checkout creation requests with physical products that fail to provide this value.

The Address object can be inherited from a Customer or Source associated with a Checkout.

Additionally, shipping destinations within the United States must include the postalCode and state.

Example checkout with physical products

The following create Checkout request contains physical products in the items array. As a result, when submitting the request, you must provide shipTo and shipFrom addresses with a specified country.

Since both addresses are in the United States, the state and postalCode are also required.

cURL
cURL
curl --location --request POST 'https://api.digitalriver.com/checkouts' \
--header 'Authorization: Bearer <API_key>' \
--header 'Content-Type: text/plain' \
--data-raw '{
...
"shipTo": {
"address": {
"line1": "476 5th Ave",
"city": "New York",
"postalCode": "10018",
"state": "NY",
"country": "US"
},
"name": "William Brown",
"phone": "555-555-5555",
"email": null@digitalriver.com
},
"shipFrom": {
"address": {
"line1": "10380 Bren Road West",
"line2": "Suite 201",
"city": "Minnetonka",
"postalCode": "55343",
"state": "MN",
"country": "US"
}
},
"items": [
{
"skuId": "f4f06b2b-f091-41b4-b18f-5c59a7414659",
"quantity": 3,
"price": 5.99
}
]
}'

Additional address information

Use the additionalAddressInfo attribute to capture any information that's not included in the basic address. This is especially useful for Brazilian neighborhoods and Japanese phonetics and divisions.

Brazilian Neighborhoods

Brazilian addresses require a neighborhood for a Checkout to be successfully created. The following example shows how to specify this value for an address in Brazil.

cURL
cURL
curl --location --request POST 'https://api.digitalriver.com/checkouts' \
--header 'Authorization: Bearer <API_key>' \
--header 'Content-Type: text/plain' \
--data-raw '{
...
"shipTo": {
"address": {
"line1": "Av. Paulista, 1098, 1º andar",
"line2": "apto. 101",
"city": "São Paulo",
"postalCode": "01310-000",
"state": "SP",
"country": "BR"
},
"name": "João Ribeiro",
"phone": "98765-4321",
"email": "jribeiro@acme.com",
"additionalAddressInfo": {
"neighborhood": "Bela Vista"
}
},
...
}'

Japanese phonetics and divisions

For Japanese addresses, customers can provide their division within their organization (for example, sales department). Additionally, customers can enter their name in two scripting styles: Hiragana and Katakana. Hiragana is the traditional script while Katakana is the phonetic spelling. Customer and courier services often want the phonetic spelling so they can correctly pronounce the customer's name when making a delivery. Katakana is also used by foreigners living in the country who don't have a Japanese name.

Use the phoneticName and division child attributes of additionalAddressInfo to provide this information:

cURL
cURL
curl https://api.digtalriver.com/customers
-u sk_test_db9682a2-b04a-4e94-8e11-35fe8ec0b324: \
-d currency=JPY \
-d email="shopxTest@digitalriver.com" \
-d items[0][skuId]=sku_9234276173 \
-d items[0][price]=9.29 \
-d items[0][quantity]=2 \
-d shipTo[name]="山田 太郎" \
-d shipTo[phone]="03-1234-1234" \
-d shipTo[email]="shopxTest@digitalriver.com" \
-d shipTo[address][line1]="新宿区新宿1-1-1" \
-d shipTo[address][line2]="新宿ビル203" \
-d shipTo[address][city]="田原市" \
-d shipTo[address][postalCode]="123-1234" \
-d shipTo[address][country]="JP" \
-d shipTo[additionalAddressInfo][phoneticName]="ヤマダ タロ" \
-d shipTo[additionalAddressInfo][division]="営業部" \
-d shipTo[amount]="5.95" \
-d shippingChoice[name]="USPS: Priority (1 day delivery)"

US states and territories

The following lists the enumerated two-letter state values that Digital River uses to represent states, territories, APO/FPO military addresses, and the District of Columbia. When you specify one of these state enumerations in a request, you must also specify US as the country parameter.

Two-letter Abbreviation

State Name

AK

Alaska

AL

Alabama

AR

Arkansas

AZ

Arizona

CA

California

CO

Colorado

CT

Connecticut

DE

Delaware

FL

Florida

GA

Georgia

HI

Hawaii

IA

Iowa

ID

Idaho

IL

Illinois

IN

Indiana

KS

Kansas

KY

Kentucky

LA

Louisiana

MA

Massachusetts

MD

Maryland

ME

Maine

MI

Michigan

MN

Minnesota

MO

Missouri

MS

Mississippi

MT

Montana

NC

North Carolina

ND

North Dakota

NE

Nebraska

NH

New Hampshire

NJ

New Jersey

NM

New Mexico

NV

Nevada

NY

New York

OH

Ohio

OK

Oklahoma

OR

Oregon

PA

Pennsylvania

RI

Rhode Island

SC

South Carolina

TN

Tennessee

TX

Texas

UT

Utah

VT

Vermont

WA

Washington

WV

West Virginia

WY

Wyoming

Two-letter Abbreviation

Federal District

DC

District of Columbia

Two-letter Abbreviation

Territories

AS

American Samoa

GU

Guam

MP

Northern Mariana Islands

PR

Puerto Rico

VI

U.S. Virgin Islands

Two-letter Abbreviation

APO/FPO Military Addresses

AE

Armed Forces

AP

Armed Forces Pacific

AA

Armed Forces America