Query and script parameters
Pass aditional data to PayPal to further configure your integration.
Overview
You can include the optional queryParams
and scriptParams
options in the paypalConfig
to personalise your setup and help PayPal determine which funding sources and buttons to display to your shoppers.
Query parameters help define specific content or actions based on the data being passed, while script parameters allow you to provide information you need for your site to work, a single-use token, or information you'd like to capture on a page for analytics reasons.
Query parameters
{
queryParams: {
buyerCountry: "string",
debug: boolean,
integrationDate: "string",
merchantId: "string"
}
Property | Description |
---|---|
| Details about the optional query parameters. |
| The country code for the buyer's country, in ISO-3166-1 alpha-2 format. This determines the eligible funding sources for a given buyer. Any country that you can pass as a locale is a valid buyer country. Defaults to the buyer's IP geolocation. Note: |
| Whether to use debug mode. Debug mode is recommended only for testing and debugging, because it increases the size of the script and negatively impacts performance. Defaults to |
| The date when your PayPal client ID was created ( |
| The merchant ID of the merchant for whom you're facilitating a transaction. Use this parameter only for partner, marketplaces, and cart solutions when you are acting on behalf of another merchant to facilitate their PayPal transactions. |
Script parameters
{
scriptParams: {
cspNonce: "string",
clientToken: "string",
pageType: "string",
userIdToken: "string"
}
}
Parameter | Description |
---|---|
| Details about the optional script parameters. |
| A single-use Content Security Policy (CSP) token, if you use them on your site. |
| The client token used to identify your shoppers. |
| The type of page. Use this to log page type and interactions.
|
| Your user ID token. |
Example
{
queryParams: {
buyerCountry: "US",
debug: false,
integrationDate: "2025-07-01",
merchantId: "ABC123"
},
scriptParams: {
cspNonce: "YOUR_CSP_NONCE",
clientToken: "abc123xyz==",
pageType: "checkout",
userIdToken: "YOUR_USER_ID_TOKEN"
}
}
Updated 13 days ago