Pass aditional data to PayPal to further configure your integration.
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.
{
queryParams: {
buyerCountry: "string",
debug: boolean,
integrationDate: "string",
merchantId: "string"
}| Property | Description |
|---|---|
queryParamsobject | Details about the optional query parameters. |
queryParams.buyerCountrystring | 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: buyerCountry is only used in the sandbox. Don't pass this query parameter in production. |
queryParams.debugboolean | 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 false. |
queryParams.integrationDatestring | The date when your PayPal client ID was created (YYYY-MM-DD). This helps the PayPal script automatically apply any backward-compatible updates introduced after that date. |
queryParams.merchantIdstring | 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. |
{
scriptParams: {
cspNonce: "string",
clientToken: "string",
pageType: "string",
userIdToken: "string"
}
}| Parameter | Description |
|---|---|
scriptParamsobject | Details about the optional script parameters. |
scriptParams.cspNoncestring | A single-use Content Security Policy (CSP) token, if you use them on your site. |
scriptParams.clientTokenstring | The client token used to identify your shoppers. |
scriptParams.pageTypestring (enum) | The type of page. Use this to log page type and interactions. Possible values:
|
scriptParams.userIdTokenstring | Your user ID token. |
{
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"
}
}