GetPaymentOptions API Operation

Important: Adaptive Payments is now a limited release product. It is restricted to select partners for approved use cases and should not be used for new integrations without guidance from PayPal.

Shows the options previously specified in the SetPaymentOptions API.

GetPaymentOptionsRequest Message

GetPaymentOptionsRequest Fields

Field

Description

payKey

xs:string

(Required) The pay key that identifies the payment for which you want to get payment options. This is the pay key you used to set the payment options.

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. Value is:

  • 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.

GetPaymentOptionsResponse Message

GetPaymentOptionsResponse Fields

Field

Description

payKey

xs:string

The pay key that identifies the payment for which you set payment options.

displayOptions

ap:DisplayOptions

Specifies display items in payment flows and emails.

initiatingEntitity

ap:InitiatingEntity

The PayPal financial partner that is initiating the payment. Financial partners must first be set up in the Admin tool before they can use the PayPal APIs.

shippingAddressId

xs:string

Sender's shipping address ID.

senderOptions

ap:SenderOptions

Specifies information to be provided by the sender, and optionally can include the sender address.

receiverOptions

ap:ReceiverOptions

Specifies information about each receiver.

requestEnvelope

common:requestEnvelope

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

DisplayOptions Fields

DisplayOptions fields allow the API caller to provide PayPal with a link to an image.

Field

Description

emailHeaderImageUrl

xs:string

The URL of the image that displays in the in the header of customer emails. The image dimensions are 43 pixels high x 240 pixels wide.

emailMarketingImageUrl

xs:string

The URL of the image that displays in the in customer emails. The image dimensions are 80 pixels high x 530 pixels wide.

headerImageUrl

xs:string

The URL of the image that displays in the header of a payment page. Use this to configure payment flows by passing a different image URL for different scenarios. If set, it overrides the header image URL specified in your account's Profile. The image dimensions are 90 pixels high x 750 pixels wide.

Note: The headerImageUrl and businessName parameters are mutually exclusive; only one of these fields can be used. If you specify both, the image will take precedence over the business name.

businessName

xs:string

The business name to display.

Note: The headerImageUrl and businessName parameters are mutually exclusive; only one of these fields can be used. If you specify both, the image will take precedence over the business name.

InitiatingEntity Fields

Field

Description

institutionCustomer

ap:InstitutionCustomer

(Optional) Details about the party that initiated this payment. This payment is made by the API caller on behalf of the initiating party. The initiating party can be an institution or a customer of the institution. The initiating party must be set up by PayPal Merchant Services.

Institution Customer Fields

Field

Description

countryCode

xs:string

(Required) The two-character country code of the home country of the end consumer

displayName

xs:string

(Required) The full name of the consumer as known by the institution.

Maximum length: 200 characters

email

xs:string

(Optional) The email address of the consumer as known by the institution.

Maximum length: 127 characters

firstName

xs:string

(Required) The first name of the consumer as known by the institution.

Maximum length: 64 characters

institutionCustomerId

xs:string

(Required) The unique identifier assigned to the consumer by the institution.

Maximum length: 64 characters

institutionId

xs:string

(Required) The unique identifier assigned to the institution.

Maximum length: 64 characters

lastName

xs:string

(Required) The last name of the consumer as known by the institution.

Maximum length: 64 characters

SenderOptions Fields

Field

Description

requireShippingAddressSelection

xs:boolean

(Optional) If true, require the sender to select a shipping address during the embedded payment flow; default is false.

referrerCode

xs:string

(Optional) A code that identifies the partner associated with this transaction.

Maximum length: 32 characters.

addressOverride

xs:boolean

(Optional) Determines whether pages in the user interface will enable the user to override the specified shipping address (that is, the address specified in the shippingAddress container). True by default. Only applicable for the embedded payment flow. If addressOverride is true, the specified shipping address is displayed as first, followed by other addresses in the sender's profile, along with an option to add a new shipping address. The sender thus can override the specified shipping address (that is, the sender can override the address in this SetPaymentOptions API call). If addressOverride is false, the sender cannot change the address in this SetPaymentOptions API call. Note that if no address is specified in this SetPaymentOptions API call, the buyer's shipping addresses are presented for selection.

shippingAddress

ap:ShippingAddressInfo

(Optional) Container for the sender's shipping address. After you specify an address using this container, the address will be returned as part of a PaymentDetails API response.

ReceiverOptions Fields

Field

Description

description

xs:string

A description you want to associate with the payment.

Maximum length: 1000 characters

customId

xs:string

An external reference or identifier you want to associate with the payment.

Maximum length: 1000 characters

invoiceData

ap:InvoiceData

Item information for the payment, which could appear on an invoice.

receiver

ap:ReceiverIdentifier

Receiver ID associated with these options.

ShippingAddressInfo Fields

Field

Description

addresseeName

xs:string

(Optional) Person's name associated with this shipping address.

Maximum length: 128 characters

street1

xs:string

(Optional) First street address.

Maximum length: 128 characters

street2

xs:string

(Optional) Second street address.

Maximum length: 128 characters

city

xs:string

(Optional) Name of city.

Maximum length: 128 characters

state

xs:string

(Optional) State or province.

Maximum length: 128 characters

zip

xs:string

(Optional) U.S. ZIP code or other country-specific postal code.

Maximum length: 128 characters

country

xs:string

(Optional) Country code.

Maximum length: 128 characters

phone

ap:PhoneNumber

(Optional) Phone number.

PhoneNumber Fields

Field

Description

type

ap:PhoneType

(Optional) Specifies the type of phone number. Currently, only MOBILE is valid. Other Value is:

  • NONE — None of the other choices
  • HOME — Home phone
  • WORK — Work phone
  • BUSINESS — Business phone
  • MOBILE — Mobile phone
  • FAX_HOME — Fax home phone
  • FAX_BUSINESS — Fax business phone

InvoiceData Fields

Field

Description

item

ap:InvoiceItem

Any number of items associated with the payment.

totalTax

xs:decimal

Total tax associated with the payment.

totalShipping

xs:decimal

Total shipping charge associated with the payment.

InvoiceItem Fields

Field

Description

name

xs:string

Name of item.

identifier

xs:string

External reference to item or item ID.

price

xs:decimal

Price of item.

itemPrice

xs:decimal

Price of an individual item.

itemCount

xs:int

Item quantity.

ReceiverIdentifier Fields

Field

Description

email

xs:string

Receiver's email address.

Maximum length: 127 characters

phone

common:PhoneNumberType

Receiver's phone number.

PhoneNumberType Response Fields

Field

Description

countryCode

xs:string

Telephone country code.

phoneNumber

xs:string

Telephone number.

extension

xs:string

Telephone extension.

ResponseEnvelope Fields

Field

Description

ack

common:AckCode

Acknowledgment code. Value is:

  • 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 acknowledgment status.

ErrorData Fields

Field

Description

category

common:ErrorCategory

The location where the error occurred.

Value is:

  • 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.

Value is:

  • 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

Acknowledgment code. Value is:

  • 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.

GetPaymentOptions Errors

Code

Message

Additional Information

520002 Internal error

520003

Authentication failed. API credentials are incorrect.

Since 1.6.0

540031

You do not have permission to get these payment options

540031

You do not have permission to get these payment options

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

580001 Invalid request: <value>

Since 1.6.0

580022

Invalid request parameter: payKey with value <value>