On this page
No Headings
Last updated: June 18, 2026
You can use the steps in this section to ensure that your accounts and environment are set up to accept Afterpay payments.
A PayPal business account with Expanded Checkout enabled. You'll set up your environment first, then enable Afterpay with KYC verification completed.
Sign up for a PayPal developer account. On successful signup, PayPal automatically creates your sandbox environment. The sandbox environment mimics real-world transactions and includes a business account by default. You can create additional business accounts as needed.
Set up the sandbox environment:
1. Go to your PayPal developer account sandbox and toggle to Sandbox.
2. Go to Apps & Credentials and select Create App.
3. Enter your app name, set the Type to Merchant, choose the sandbox business account, and select Create App. The app details page will be displayed.
4. Configure a webhook listener for the app and subscribe to events:
The webhook listener is now configured, and a Webhook ID is displayed. Store the ID for verification in your app code. For more information, see Use webhooks.
Retrieve sandbox app credentials: To integrate and test Afterpay payments, you need the following sandbox credentials:
To retrieve the sandbox credentials:
Retrieve sandbox account credentials: To test your Afterpay integration end-to-end, run your app, simulate a checkout flow, log in to your personal PayPal account to approve the Afterpay payment, and confirm that money is received in your business PayPal account. You need sandbox login credentials for both accounts. For information on accessing or resetting these credentials, see Get sandbox account credentials.
Log in to the PayPal Developer Dashboard and switch to the Live environment.
Go to Apps & Credentials and create a new app or select an existing app.
In the app's Features tab, ensure Accept payments is enabled.
Configure a webhook listener for the app and subscribe to events:
CHECKOUT.ORDER.COMPLETED: Successful Afterpay paymentPAYMENT.CAPTURE.DENIED: Failed captureThe webhook listener is successfully configured, and a Webhook ID is displayed. You can store the ID and use it in your app code to verify the source sending messages to your listener. For more information on webhooks, see Use webhooks.
Copy your Client ID and Secret for the live app.
Complete Afterpay certification before going live (contact your Afterpay Account manager to begin the process).
Enable Afterpay for the production account.
You can enable Afterpay using one of the following methods:
If you have an eligible PayPal business account with KYC verification completed, you can enable Afterpay directly from your dashboard:
Once enabled, go to Payment Options to manage your Afterpay settings or continue integration.
If you don't see Afterpay in your dashboard, contact your PayPal account manager to enable Afterpay payments for your business account. Afterpay payments are activated after PayPal verifies eligibility and completes a compliance review.
As a partner, you can onboard your merchants to accept Afterpay as a payment method. You can also build the onboarding process into your software.
Use a valid access token and send a POST request to /v2/customer/partner-referrals with all required request parameters to generate a sign-up link that directs your merchants to PayPal onboarding. Ensure to include your merchant's information in the API call to pre-fill the PayPal sign-up flow.
Note: To accept Afterpay payments, set products to ["AFTERPAY"]. This is only supported with the v2 Partner Referrals API.
curl -v -X POST https://api-m.sandbox.paypal.com/v2/customer/partner-referrals \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Access-Token>" \
-H "PayPal-Partner-Attribution-Id: <BN-CODE>" \
-d '{
"email": "afterpay+US@gmail.com",
"preferred_language_code": "en-{{country_code}}",
"tracking_id": "{{tracking_id}}",
"partner_config_override": {
"partner_logo_url": "https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg",
"return_url": "https://testenterprises.com/merchantonboarded",
"return_url_description": "the url to return the merchant after the paypal onboarding process.",
"action_renewal_url": "https://testenterprises.com/renew-exprired-url",
"show_add_credit_card": true
},
"individual_owners": [
{
"names": [
{
"prefix": "Mr.",
"given_name": "John",
"surname": "Doe",
"middle_name": "Middle",
"suffix": "Jr.",
"full_name": "first Middle Doe Jr.",
"type": "LEGAL"
}
],
"citizenship": "{{country_code}}",
"addresses": [
{
"address_line_1": "006590 Ocean Bay Plaza #25",
"address_line_2": "Apt 100",
"admin_area_2": "Pencil Bluff",
"admin_area_1": "AR",
"postal_code": "71965",
"type": "HOME",
"country_code":"{{country_code}}"
}
],
"type": "PRIMARY"
}
],
"business_entity": {
"business_type": {
"type": "INDIVIDUAL",
"subtype": "ASSO_TYPE_INCORPORATED"
},
"business_industry": {
"category": "1004",
"mcc_code": "8111",
"subcategory": "8931"
},
"business_incorporation": {
"incorporation_country_code": "{{country_code}}",
"incorporation_date": "1986-12-29"
},
"names": [
{
"business_name": "Test Enterprise",
"type": "LEGAL_NAME"
}
],
"emails": [
{
"type": "CUSTOMER_SERVICE",
"email": "customerservice@example.com"
}
],
"website": "https://mystore.testenterprises.com",
"addresses": [
{
"address_line_1": "006590 Ocean Bay Plaza #25",
"address_line_2": "Apt 100",
"admin_area_2": "Pencil Bluff",
"admin_area_1": "AR",
"postal_code": "71965",
"country_code": "{{country_code}}",
"type": "WORK"
}
],
"phones": [
{
"country_code": "1",
"national_number": "9177270835",
"extension_number": "1234",
"type": "CUSTOMER_SERVICE"
}
],
"beneficial_owners": {
"individual_beneficial_owners": [
{
"names": [
{
"prefix": "Mr.",
"given_name": "John",
"surname": "Doe",
"middle_name": "Middle",
"suffix": "Jr.",
"full_name": "John Middle Doe Jr.",
"type": "LEGAL"
}
],
"citizenship": "{{country_code}}",
"addresses": [
{
"address_line_1": "006590 Ocean Bay Plaza #25",
"address_line_2": "Apt 100",
"admin_area_2": "Pencil Bluff",
"admin_area_1": "AR",
"postal_code": "71965",
"type": "HOME",
"country_code": "{{country_code}}"
}
],
"phones": [
{
"country_code": "1",
"national_number": "9177270835",
"extension_number": "1234",
"type": "MOBILE"
}
],
"birth_details": {
"date_of_birth": "1995-12-29"
},
"percentage_of_ownership": "50"
}
],
"business_beneficial_owners": [
{
"business_type": {
"type": "INDIVIDUAL",
"subtype": "ASSO_TYPE_INCORPORATED"
},
"business_industry": {
"category": "1004",
"mcc_code": "2025",
"subcategory": "8931"
},
"business_incorporation": {
"incorporation_country_code": "{{country_code}}",
"incorporation_date": "1986-12-29"
},
"names": [
{
"business_name": "Test Enterprise",
"type": "LEGAL_NAME"
}
],
"emails": [
{
"type": "CUSTOMER_SERVICE",
"email": "customerservice@example.com"
}
],
"website": "https://mystore.testenterprises.com",
"addresses": [
{
"address_line_1": "006590 Ocean Bay Plaza #25",
"address_line_2": "Apt 100",
"admin_area_2": "Pencil Bluff",
"admin_area_1": "AR",
"postal_code": "71965",
"country_code": "{{country_code}}",
"type": "WORK"
}
],
"phones": [
{
"country_code": "1",
"national_number": "9177270835",
"extension_number": "1234",
"type": "CUSTOMER_SERVICE"
}
],
"percentage_of_ownership": "50"
}
]
},
"office_bearers": [
{
"names": [
{
"prefix": "Mr.",
"given_name": "John",
"surname": "Doe",
"middle_name": "Middle",
"suffix": "Jr.",
"full_name": "John Middle Doe Jr.",
"type": "LEGAL"
}
],
"citizenship": "{{country_code}}",
"addresses": [
{
"address_line_1": "79 Sheppard Ave",
"address_line_2": "Apt 123",
"admin_area_2": "Toronto",
"admin_area_1": "Ontario",
"postal_code": "M1S 1T4",
"country_code": "{{country_code}}",
"type": "HOME"
}
],
"phones": [
{
"country_code": "1",
"national_number": "4168374117",
"extension_number": "1234",
"type": "MOBILE"
}
],
"birth_details": {
"date_of_birth": "1955-12-29"
},
"role": "DIRECTOR"
}
],
"annual_sales_volume_range": {
"minimum_amount": {
"currency_code": "USD",
"value": "10000"
},
"maximum_amount": {
"currency_code": "USD",
"value": "50000"
}
},
"average_monthly_volume_range": {
"minimum_amount": {
"currency_code": "USD",
"value": "1000"
},
"maximum_amount": {
"currency_code": "USD",
"value": "50000"
}
},
"purpose_code": "P0104"
},
"operations": [
{
"operation": "API_INTEGRATION",
"api_integration_preference": {
"rest_api_integration": {
"integration_method": "PAYPAL",
"integration_type": "THIRD_PARTY",
"third_party_details": {
"features": [
"PAYMENT",
"REFUND"
]
}
}
}
}
],
"products": [
"AFTERPAY"
],
"legal_consents": [
{
"type": "SHARE_DATA_CONSENT",
"granted": true
}
]
}Select a tab to view either the required request parameters or the expected response parameters for order creation.
| Parameter name | Description |
|---|---|
tracking_idstring | Partner's unique identifier for this merchant. Use this ID to track the status of your merchant as they complete onboarding. |
business_entityRequired, object | Merchant's business details, including type, industry classification, incorporation information, and addresses. |
business_entity.business_typeRequired, object | Business structure classification with type and subtype for legal entity identification. |
business_entity.business_industryRequired, object | Industry classification details including category, MCC code, and subcategory for business categorization. |
business_entity.business_incorporationRequired, object | Incorporation information including country code and date of incorporation. |
business_entity.namesRequired, array | Business legal name registration for official identification. |
business_entity.addressesRequired, array | Business location details for verification and compliance. |
business_entity.annual_sales_volume_rangeRequired, object | Expected annual transaction volume range in local currency for risk assessment. |
business_entity.average_monthly_volume_rangeRequired, object | Expected monthly transaction volume range in local currency for account configuration. |
business_entity.purpose_codeRequired, string | Business purpose classification code for regulatory compliance. |
operationsRequired, array | API integration preferences and configuration for technical setup. |
productsRequired, array | PayPal products to enable for the merchant. For Afterpay payments, set to AFTERPAY. |
legal_consentsRequired, array | Consents received from the merchant. If SHARE_DATA_CONSENT is not granted, PayPal does not store the customer data. |
Note: When you send a GET request to /v2/customer/partner-referrals/{partner_referral_id}, the response only includes the user data you provided for the merchant. It does not include any information the merchant may have entered directly on PayPal.com.
Partner specific information
If you are a platform, pass the build notation (BN) code of the partner in the PayPal-Partner-Attribution-Id header for server-side calls to the Orders API. PayPal uses this information for reporting and tracking purposes. To find your BN code, see Code and Credential Reference.
URL onboarding is a process where merchants are redirected to a specific PayPal sign-up URL to complete their onboarding. Use URL onboarding only if you have previously onboarded merchants with this method or have a specific use case for it.
The URL contains parameters that pre-fill merchant information and configures the onboarding flow for required products. Merchants must complete all required fields and have a PayPal business account to finish onboarding. Casual merchants are not supported.