On this page
No Headings
Last updated: June 26, 2026
After generating your Partner Referral URL and client token, use the Partner SDK to embed PayPal's merchant onboarding experience directly into your platform.
PayPal's Embedded SDK provides the necessary pre-built tools to render the embedded merchant onboarding flow on your webpage.
For production environment: https://www.paypalobjects.com/sdk/v1/js/partner.js
For sandbox environment: https://www.paypalobjects.com/sdk/v1/js/sandbox.partner.js
Result: The script introduces a window.Paypal.onboard element for initializing and rendering the merchant onboarding experience.
<script src="https://www.paypalobjects.com/sdk/v1/js/partner.js" defer></script>
<!-- or for sandbox -->
<script src="https://www.paypalobjects.com/sdk/v1/js/sandbox.partner.js" defer></script>Important information
Use the window.Paypal.onboard.initialize() method to create a Partner SDK instance and include the following parameters:
accessToken: The browser-safe client token generated from the OAuth API.actionUrl: The merchant onboarding URL generated from the Partner Referrals API.style: Optional styling object to customize the onboarding experience appearance. For more information about styling options, see Customize SDK styles.callbacks: Optional callback functions for handling onboarding events and user interactions. For more information about Partner SDK callbacks, see Handle Partner SDK callbacks.Response: Creates an initialized onboarding instance ready to render the merchant signup experience on your platform.
<script>
window.Paypal.onboard.initialize({
accessToken: ACCESS_TOKEN,
actionUrl: ACTION_URL,
style: PAYPAL_THEME, // custom styling
... // callbacks
});
</script>After initializing the Embedded SDK, render the merchant onboarding experience on your webpage.
To render the onboarding experience:
window.Paypal.onboard.render() method with your specific block-level element ID. Replace ELEMENT_ID with your specific block-level element id attribute.<div id="ELEMENT_ID"></div>
<script>
window.Paypal.onboard.render('ELEMENT_ID');
</script>Result: Renders the merchant onboarding experience for your customers.
Notes:
tracking_id from your Partner Referrals API requestManage onboarding events and user interactions by using callback functions during Partner SDK initialization.
The Partner SDK supports three main callback types:
Implement logic in your app to handle when the merchant reaches the final page of the onboarding flow. Use the onComplete() callback function to handle completion events. This function runs immediately before the Done page appears, marking the final state of onboarding.
The final state may be any of the following:
Response: Handles completion events when the merchant finishes the onboarding process.
window.Paypal.onboard.initialize({
accessToken: 'CLIENT_TOKEN',
actionUrl: 'ACTION_URL',
onComplete: function() {
alert("Onboard completed!");
window.location.href = "https://www.mypartnerwebsite.com/";
}
}).render('root');In your app code, include the logic to handle errors during the merchant onboarding process. Use the onError() callback function, which receives error and errorInfo parameters. The error parameter contains the error thrown by the component, while errorInfo provides additional context including the componentStack trace.
Response: Processes onboarding-specific errors and provides error details for troubleshooting onboarding failures, including terminal errors after reaching maximum retry attempts.
window.Paypal.onboard.initialize({
accessToken: 'CLIENT_TOKEN',
actionUrl: 'ACTION_URL',
onError: function(error, errorInfo) {
alert("There is an error\nError: " + error + "\nError Description: \n" + errorInfo);
window.location.reload();
}
}).render('root');Add logic to manage SDK-specific errors, such as module federation fetch failures. Use the onSDKError() callback function, which receives error and errorInfo parameters. By default, the SDK displays an error page with a retry button. This callback lets you define the behavior when merchants click the retry button.
Response: This callback handles SDK-specific errors, such as failures when fetching PayPal onboarding components. When errors occur, the SDK displays a default error page with a retry button. This callback defines what happens when merchants click retry.
window.Paypal.onboard.initialize({
accessToken: 'CLIENT_TOKEN',
actionUrl: 'ACTION_URL',
onSDKError: function(error, errorInfo) {
alert("There is an error\nError: " + error + "\nError Description: \n" + errorInfo.componentStack);
window.location.reload();
}
}).render('root');After initializing the Partner SDK and rendering the onboarding experience, you can code your app to check on the merchant onboarding status in two ways:
Webhook events are external events your app does not know about unless it receives event notifications. For example, when a merchant account gets created or changes status, this triggers a webhook event.
You can subscribe to such events and register a callback (listener) URL. When the event occurs, PayPal sends a notification to the registered callback URL. You can code your app to complete relevant actions based on the event notification it receives.
To handle webhook events:
CUSTOMER.MANAGED-ACCOUNT.ACCOUNT-CREATED: Occurs when PayPal creates a merchant accountCUSTOMER.MANAGED-ACCOUNT.ACCOUNT-STATUS-CHANGED: Occurs when PayPal changes the merchant's verification statusCUSTOMER.MANAGED-ACCOUNT.ACCOUNT-UPDATED: Occurs when PayPal updates the merchant account dataFor more information, see webhooks overview and webhooks integration guide.
To check the status of merchant onboarding, you can send periodic GET requests to fetch the merchant status. Contact your PayPal Account Manager for the specific endpoints and implementation details.
After sending the GET request, analyze the response to verify that the required capabilities show an ACTIVE status. The following tables show the capabilities for each product and the possible status values:
| Product | Capability |
|---|---|
| PayPal Branded (PayPal, PayLater, Venmo) | RECEIVE_MONEY |
| Withdraw to Bank Account | WITHDRAW_MONEY |
| Card Fields | CUSTOM_CARD_PROCESSING |
| Vaulting | PAYPAL_WALLET_VAULTING_ADVANCED |
| Google Pay | GOOGLE_PAY |
| Apple Pay | APPLE_PAY |
| Capability status | Description |
|---|---|
| ACTIVE | Merchant is ready to use this capability. |
| APPROVED | Merchant cannot use this capability for a short duration. |
| PENDING/NEED_DATA/IN-REVIEW | Merchant currently cannot use this capability until they provide more data via PayPal |
| SUSPENDED/REVOKED/DENY/INACTIVE | Merchant cannot use this capability. |