Build onboarding into your software

SDKCurrent

Last updated: Mar 14th, 6:14pm

How it works

Set up your software package to onboard sellers with PayPal if you create a downloadable ecommerce software package for sellers.

A seller signs up with PayPal with a signup link embedded in your software package. After the seller completes signup, PayPal shares the seller’s REST API credentials with the software package. Use the seller’s API credentials to make the API calls to PayPal.

This integration only includes cart capabilities. It does not include other features such as a Platform Fee, Delayed Disbursement, Partner Reporting, or the Disputes API.

Know before you code

Required
To use this integration, you must

  • Be an approved partner.
  • Have an access token
  • Inform your sellers of PayPal's Seller Protection policy, so they are aware of use cases that invalidate that protection, such as shipping to an address other than the one in the transaction confirmation.
Get access token

Required
This integration uses the Partner Referrals API:

  • The payment features available to your sellers vary by the type of onboarding you choose. See onboarding options for more information.
  • Use Postman to explore and test PayPal APIs.
See Partner Referrals API
3

Redirect seller to a return URL

When your seller completes the sign-up flow, they are shown a button that redirects them to the return URL you specified in the partner_config_override/return_url field of the Partner Referrals API.

If you didn’t specify a return URL in your API call, then the button redirects the seller to the return URL set on your account. Work with your account manager to set a return URL. If you don’t set a return URL on your account, then the button sends the seller to the PayPal dashboard for their account.

    1https://<var><Return-URL></var>?merchantIdInPayPal=<var><Merchant-ID-In-PayPal></var>&permissionsGranted=false&accountStatus=BUSINESS_ACCOUNT&consentStatus=false&productIntentID=addipmt&isEmailConfirmed=true&returnMessage=To%20start%20accepting%20payments,%20please%20log%20in%20to%20PayPal%20and%20finish%20signing%20up.

    During the redirect, PayPal loads the return URL in your seller’s browser and attaches the following query parameters:

    Parameter Description
    merchantIdInPayPal The merchant ID of your seller's PayPal account.
    permissionsGranted This parameter is set to false.
    accountStatus Indicates what kind of account was created. For example, BUSINESS_ACCOUNT if a business account was created.
    consentStatus This parameter is set to false.
    productIntentID It is set to addipmt.
    isEmailConfirmed A Boolean indicating whether the seller has confirmed their email with PayPal.
    returnMessage A message containing next steps for the seller to take with PayPal.
    4

    Get seller access token

    When your seller completes the sign-up flow, PayPal returns an authCode and sharedId to your seller’s browser. Use the authCode and sharedId to get the seller’s access token. Then, use this access token to get the seller’s REST API credentials.

    Sample request and response

    Use the following code to get the seller’s access token:

    1. cURL sample request
    2. node sample request
    3. Sample response
    1curl -X POST https://api-m.sandbox.paypal.com/v1/oauth2/token
    2-u SHARED-ID:
    3-d 'grant_type=authorization_code&code=AUTH-CODE&code_verifier=SELLER-TOKEN'
    5

    Get seller REST API credentials

    Use your seller’s REST API credentials to process payments and handle refunds. Get seller REST API credentials using the seller’s access token.

    Modify the sample request

    Copy the sample request and change SELLER-ACCESS-TOKEN to the seller’s access token.

    1. Sample request
    2. Sample response
    1curl -X GET https://api-m.sandbox.paypal.com/v1/customer/partners/PARTNER-MERCHANT-ID/merchant-integrations/credentials/ \
    2 -H 'Authorization: Bearer SELLER-ACCESS-TOKEN' \
    3 -H 'Content-Type: application/json'

    The partner_merchant_id is the merchant ID of your PayPal account.

    To find the merchant ID of your PayPal account, log in to your PayPal account at paypal.com. Hover over your name or profile icon on the top right, select Account Settings > Business information, and look for PayPal Merchant ID.

    To find the merchant ID of your sandbox account, follow the same instructions on sandbox.paypal.com.

    Next steps

    Add more payment methods

    We use cookies to improve your experience on our site. May we use marketing cookies to show you personalized ads? Manage all cookies