BMCreateButton API Operation (SOAP)

APILegacyLast updated: October 12th 2021, @ 6:58:00 pm


Important: NVP/SOAP is a legacy integration method. We accept new integrations and support existing integrations, but there are newer solutions. If you're starting an integration, we recommend our latest solutions.

Creates a PayPal Payments Standard button.

Important:

The Button Manager API is deprecated. For new integrations, see the associated topic.

Button See

Buy Now

PayPal Checkout Overview

Add to Cart

Solution Providers

Donate

Create a Donate button

Automatic Billing

Subscribe

Subscriptions Overview

You can create either a button that is hosted on PayPal or a non-hosted button.

BMCreateButton request

The request parameters specify the characteristics of your button, which include associated menu items related to the button. You can specify up to five menu items, each of which can include up to 10 possible selections.

BM CreateButton request Message Diagram

OptionsDetailsType Diagram

OptionSelectionDetailsType Diagram

BMCreateButton request parameters

Field

Description

ButtonCode

ebl:ButtonCodeType

(Optional) The kind of button code to create. Value is:


  • HOSTED. A secure button that is stored on PayPal. The default for all buttons except the View Cart, Unsubscribe, and Pay Now buttons.

  • ENCRYPTED. An encrypted button, not stored on PayPal. The default for View Cart button.

  • CLEARTEXT. An unencrypted button, not stored on PayPal. The default for Unsubscribe button.

  • TOKEN. A secure button, not stored on PayPal, used only to initiate the Hosted Solution checkout flow. The default for Pay Now button. Since version 65.1.

ButtonType

ebl:ButtonTypeType

(Required) The kind of button you want to create. Value is:


  • BUYNOW. Buy Now button.

  • CART. Add to Cart button.

  • SUBSCRIBE. Subscribe button.

  • DONATE. Donate button.

  • UNSUBSCRIBE. Unsubscribe button.

  • VIEWCART. View Cart button.

  • AUTOBILLING. Automatic Billing button. Since version 63.0.

  • PAYMENT. Pay Now button. Since version 65.1.

Notes:
  • Do not specify BUYNOW if BUTTONCODE=TOKEN; specify PAYMENT instead. Do not specify PAYMENT if BUTTONCODE=HOSTED.
  • BMCreateButton does not create a button to upload the contents of a third-party shopping cart. To upload a cart's contents, use the cart upload command.

ButtonSubType

ebl:ButtonSubTypeType

(Optional) The use of button you want to create. Value is:


  • PRODUCTS. The button is used to purchase products. The default for Buy Now and Add to Cart buttons

  • SERVICES. The button to purchase services.

ButtonVar

xs:string

(Optional) HTML standard button variables.

Option details fields

Field

Description

OptionName

xs:string

(Optional) The menu name.

OptionSelectionDetails

ns:OptionSelectionDetailsType

(Optional) Menu items.

Option selection details fields

OptionSelection

xs:string

(Optional) The menu item's name

Price

xs:string

(Optional) The price associated with the first menu item.

Note: If you specify a price, you cannot set a button variable to amount.

Button language options

The button language must be compatible with the country identified by the country code.

Country

Button language options

All countries not identified below


  • en. English. The default.

Austria


  • de. German. The default

  • en. English

Belgium


  • en. English. The default.

  • nl. Dutch

  • fr. French.

Canada


  • en. English. The default.

  • fr. French.

China (worldwide)


  • en. English. The default.

  • zh. Chinese

France


  • fr. French. The default.

  • en. English

Germany


  • de. German. The default

  • en. English

Hong Kong


  • zh. Chinese. The default

  • en. English

Italy


  • it. Italian. The default

  • en. English

Japan


  • ja. Japanese. The default

  • en. English

Mexico


  • es. Spanish. The default

  • en. English

Netherlands


  • nl. Dutch. The default

  • en. English

Poland


  • pl. Polish. The default

  • en. English

Spain


  • es. Spanish. The default

  • en. English

Switzerland


  • de. German. The default

  • fr. French.

  • en. English

United States


  • en. English. The default.

  • fr. French.

  • es. Spanish

  • zh. Chinese

BMCreateButton response

The response contains an ID if the button is hosted on PayPal, and code for HTML in a website and for a link in email.

BM CreateButton response Message Diagram

BMCreateButton response fields

FieldDescription

Website

xs:string

HTML code for web pages

Email

xs:string

Code for email links, links in other documents that support external links, and links to the Hosted Solution checkout flow

HostedButtonID

xs:string

ID of a PayPal-hosted button or a Hosted Solution token

BMCreateButton errors

Error codeShort and long messagesUser action
10001Internal Error
Internal Error
To learn more about possible causes and corrective actions, see What is API error code 10001?.
11923Invalid Argument
The button image value specified is invalid.
11924Invalid Argument
The button image URL specified is invalid.
11925Invalid Argument
The button type specified is invalid.
11926Invalid Data
One of the parameters specified using ButtonVar is invalid.
11927Invalid Argument
The Buy Now button text specified is invalid.
11928Invalid Argument
The email or merchant ID specified is invalid.
11929Invalid Data
A cart button must have an item name and amount specified.
11931Invalid Argument
The subscription button text specified is invalid.
11932Invalid Data
You must specify a corresponding number of entries for option names and selections.
11933Invalid Data
You cannot skip index numbers for option selections. Option selections must be specified sequentially.
11934Invalid Data
You must specify the same number of entries for option prices and selections.
11936Invalid Data
You cannot specify both an item price and prices for individual selections within an option.
11937Invalid Argument
A text box name specified is invalid. Text box names must not exceed 64 characters.
11938Invalid Argument
The button code value specified is invalid.
11940Invalid Argument
An option name specified is invalid. Option names must not exceed 64 characters.
11941Invalid Argument
An option selection value specified is invalid. Option selection values must not exceed 64 characters.
11942Invalid Argument
An option price value specified is invalid. Make sure any punctuation marks are in the correct places.
11943Invalid Argument
The button country value specified is invalid.
11945Invalid Data
The button country and language code combination specified is invalid.
11947Invalid Argument
The tax rate specified is invalid. Make sure any punctuation marks are in the correct places and value specified is in the range 0.0 to 100.
11948Invalid Argument
The amount specified is invalid. Make sure any punctuation marks are in the correct places.

12210

Invalid Argument
The currency code value specified is invalid.

13117

Invalid Argument
Subtotal amount is not valid.

13118

Invalid Argument
Tax amount is not valid.

13119

Invalid Argument
Handling amount is not valid.

13120

Invalid Argument
Shipping amount is not valid.