GetShippingAddresses API Operation

Use the GetShippingAddresses API operation to obtain the selected shipping address. You must have created the payment or preapproval key that identifies the account holder whose shipping address you want to obtain, or be the primary receiver of the payment or one of the parallel receivers of the payment. The shipping address is available only if it was provided during the embedded payment flow.

GetShippingAddressesRequest Message

GetShippingAddressesRequest Fields

You must specify a value for the key field, which uses the payKey to identify the account holder.

Field

Description

key

xs:string

(Required) The payment paykey that identifies the account holder for whom you want to obtain the selected shipping address.

Note: Shipping information can only be retrieved through the payment payKey; not through the preapprovalKey.

requestEnvelope

common:requestEnvelope

(Required) Information common to each API operation, such as the language in which an error message is returned.

RequestEnvelope Fields

Field

Description

detailLevel

common:DetailLevelCode

(Optional) Level of detail required by the client application for components. It is one of the following values:

  • ReturnAll – This value provides the maximum level of detail (default).

errorLanguage

xs:string

(Required) RFC 3066 language in which error messages are returned; by default it is en_US, which is the only language currently supported.

GetShippingAddressesResponse Message

GetShippingAddressesResponse Fields

Field

Description

selectedAddress

ap:Address

Any number of available shipping addresses. The first address selected in the embedded payment flow.

responseEnvelope

common:ResponseEnvelope

Common response information, including a timestamp and the response acknowledgement status.

Address Fields

Field

Description

addresseeName

xs:string

The name associated with the address.

baseAddress

common:BaseAddress

Street address.

addressId

xs:string

The ID associated with the address.

BaseAddress Fields

Field

Description

city

xs:string

The city of the address.

countryCode

xs:string

The country code of the address.

line1

xs:string

The first line of the address.

line2

xs:string

An second line of the street address.

postalCode

xs:string

The postal code of the address.

state

xs:string

The state for the address

type

xs:string.

The type of address.

ResponseEnvelope Fields

Field

Description

ack

common:AckCode

Acknowledgement code. It is one of the following values:

  • Success – The operation completed successfully.

  • Failure – The operation failed.

  • SuccessWithWarning – The operation completed successfully; however, there is a warning message.

  • FailureWithWarning – The operation failed with a warning message.

build

xs:string

Build number. It is used only by PayPal Merchant Technical Support.

correlationId

xs:string

Correlation identifier. It is a 13-character, alphanumeric string (for example, db87c705a910e) that is used only by PayPal Merchant Technical Support.

Note:

You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.

timestamp

xs:datetime

Date on which the response was sent, for example:

2012-04-02T22:33:35.774-07:00

Note:

You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.

PPFault Message

The PPFaultMessage returns ErrorData and the ResponseEnvelope information to your application if an error occurs.

FaultMessage Fields

Field

Description

error

common:ErrorData

Detailed error information.

responseEnvelope

common:ResponseEnvelope

Common response information, including a timestamp and the response acknowledgement status.

ErrorData Fields

Field

Description

category

common:ErrorCategory

The location where the error occurred.

Possible values are:

  • System – The system encountered errors; try again

  • Application – The application encountered errors; try again

  • Request – The request was incorrect

domain

xs:string

The domain to which this service belongs.

errorId

xs:long

A 6-digit number that uniquely identifies a particular error.

exceptionID

This field is not used.

message

xs:string

A description of the error.

parameter

common:ErrorParameter

Represents contextual information about the error.

severity

common:ErrorSeverity

The severity of the error encountered.

Possible values are:

  • Error – Processing of the request was interrupted

  • Warning – Processing of the request was completed

subdomain

This field is not used.

ResponseEnvelope Fields

Field

Description

ack

common:AckCode

Acknowledgement code. It is one of the following values:

  • Success – The operation completed successfully.

  • Failure – The operation failed.

  • SuccessWithWarning – The operation completed successfully; however, there is a warning message.

  • FailureWithWarning – The operation failed with a warning message.

build

xs:string

Build number. It is used only by PayPal Merchant Technical Support.

correlationId

xs:string

Correlation identifier. It is a 13-character, alphanumeric string (for example, db87c705a910e) that is used only by PayPal Merchant Technical Support.

Note: You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.

timestamp

xs:datetime

Date on which the response was sent, for example:

2012-04-02T22:33:35.774-07:00

Note: You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.

GetShippingAddresses Errors

Code

Message

Additional Information

520002 Internal erro

520003

Authentication failed. API credentials are incorrect.

Since 1.6.0

540031

Operation is not permitted because the credentials do not match those of the initial operation

Since 1.6.0

550001

  • User is not allowed to perform this action.

  • You are not allowed to get the addresses for this key

Since 1.6.0

580001 Invalid request: <value>

Since 1.6.0

580022

  • Invalid request parameter: <value>

  • Invalid request parameter: payKey with value <value>

  • No sender is associated with this key

Since 1.6.0

580029 A pay key, transaction ID, or tracking ID is missing Since 1.6.0

580030

This transaction cannot be processed at this time. Please try again later. Since 1.3.0