BMUpdateButton API Operation (NVP)

API

Last updated: Aug 15th, 5:53am

Updates a PayPal-hosted Payments Standard button.

This operation replaces all fields in the specified button. Therefore, you must specify a value for each field to include for the button, whether or not it changed.

BMUpdateButton request

The hosted button ID identifies the button to modify. The remaining request parameters specify the characteristics of your button.

BMUpdateButton request parameters

Field

Description

METHOD

(Required) BMUpdateButton

HOSTEDBUTTONID

(Required) The ID of the hosted button to modify.

BUTTONTYPE

(Required) The kind to update. Value is:

  • BUYNOW. The Buy Now button.

  • CART. The Add to Cart button.

  • SUBSCRIBE. The Subscribe button.

  • DONATE. The Donate button.

  • UNSUBSCRIBE. The Unsubscribe button.

  • VIEWCART. The View Cart button.

  • AUTOBILLING. The Automatic Billing button. Since version 63.0.

BUTTONCODE

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

  • HOSTED. A secure button stored on PayPal. Default for all buttons except for the View Cart and Unsubscribe 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.

BUTTONSUBTYPE

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

  • PRODUCTS. Use this button to purchase products. The default for the Buy Now and Add to Cart buttons.

  • SERVICES. The button to purchase services.

L_BUTTONVARn

(Optional) HTML standard button variables

Lists variables, where n is a digit between 0 and 999, inclusive; do not include leading zeros.

Character length and limitations: 63 single-byte alphanumeric characters each

L_TEXTBOXn

xs:string

(Optional) Text description for a menu item.

Lists variables, where n is a digit between 0 and 1, inclusive.

BUTTONIMAGE

(Optional) The kind of button image. Value is:

  • REG. Regular. The default.

  • SML. Small.

  • CC. The small button image with credit card logos. Not applicable for Unsubscribe or View Cart buttons.

BUTTONIMAGEURL

xs:string

(Optional) The button's URL

BUYNOWTEXT

(Optional) The button text for a Buy Now button. Value is:

  • BUYNOW. The button text is Buy Now. The default.

  • PAYNOW. The button text is Pay Now.

SUBSCRIBETEXT

(Optional) The button text for a Subscribe button. Value is:

  • BUYNOW. The button text is Buy Now.

  • SUBSCRIBE. The button text is Subscribe. The default.

BUTTONCOUNTRY

(Optional) The country in which the transaction occurs. By default, it is the merchant's country of registration with PayPal.

BUTTONLANGUAGE

xs:string

(Optional) The language in which to display the button text. It must be compatible with the country code.

Character length and limitations: Two single-byte alphanumeric characters.

Option details fields

Field

Description

OPTIONnNAME

(Optional) The menu name.

It is one or more variables, in which n is a digit between 0 and 4, inclusive, for hosted buttons; otherwise, it is a digit between 0 and 9, inclusive.

Option selection details fields

L_OPTIONnSELECTx

(Optional) The menu item's name

It is a list of variables for each OPTIONnNAME, in which x is a digit between 0 and 9, inclusive

L_OPTION0PRICEx

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

It is a list of variables for each OPTION0NAME, in which x is a digit between 0 and 9, inclusive

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.

BMUpdateButton response

The response contains the hosted button ID and the code for both the HTML in a website and a link in an email.

BMUpdateButton response fields

Field

Description

WEBSITECODE

HTML code for web pages

EMAILLINK

Code for email links and links in other documents that support external links

HOSTEDBUTTONID

ID of a PayPal-hosted button.

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

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more