I'm integrating PayPal multiparty seller functionality into my website. Companies can sign up and receive payments from clients. The site is built on core PHP. Currently, I'm encountering an issue related to defining the features required to complete the onboarding status in sandbox mode. These features will be used in the oauth_third_party parameter when accessing the API below:
curl --location 'https://api-m.sandbox.paypal.com/v1/customer/partners/4ABCD37YHTXH4/merchant-integrations/A6HQUJ247OKGQ' \
--header 'PayPal-Partner-Attribution-ID: MANAGEMYDSPLLC_SP_PPCP' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer this_is_paypal_access_token' \
--data ''
I received the following response from the API mentioned above using the above CURL:
{
"merchant_id": "TESTAIFBIBTOITNA",
"tracking_id": "SMPsYrAR4N",
"products": [
{
"name": "PPCP_STANDARD",
"vetting_status": "SUBSCRIBED",
"capabilities": [
"INSTALLMENTS",
"SUBSCRIPTIONS",
"ACCEPT_DONATIONS",
"PAYPAL_CHECKOUT",
"SPEND_FROM_BALANCE",
"GUEST_CHECKOUT",
"PAYPAL_CHECKOUT_ALTERNATIVE_PAYMENT_METHODS",
"SEND_INVOICE",
"QR_CODE",
"WITHDRAW_FUNDS_TO_DOMESTIC_BANK",
"PAYPAL_CHECKOUT_PAY_WITH_PAYPAL_CREDIT"
]
},
{
"name": "MOBILE_PAYMENT_ACCEPTANCE",
"status": "ACTIVE"
},
{
"name": "PPCP_CUSTOM",
"vetting_status": "SUBSCRIBED",
"capabilities": [
"CARD_PROCESSING_VIRTUAL_TERMINAL",
"COMMERCIAL_ENTITY",
"DEBIT_CARD_SWITCH",
"FRAUD_TOOL_ACCESS",
"AMEX_OPTBLUE",
"CUSTOM_CARD_PROCESSING"
]
}
],
"capabilities": [
{
"name": "DEBIT_CARD_SWITCH",
"status": "ACTIVE"
},
{
"name": "PAYPAL_CHECKOUT_ALTERNATIVE_PAYMENT_METHODS",
"status": "ACTIVE"
},
{
"name": "PAYPAL_CHECKOUT_PAY_WITH_PAYPAL_CREDIT",
"status": "ACTIVE"
},
{
"name": "SEND_INVOICE",
"status": "ACTIVE"
},
{
"name": "AMEX_OPTBLUE",
"status": "ACTIVE"
},
{
"name": "SUBSCRIPTIONS",
"status": "ACTIVE"
},
{
"name": "CARD_PROCESSING_VIRTUAL_TERMINAL",
"status": "ACTIVE"
},
{
"name": "CUSTOM_CARD_PROCESSING",
"status": "ACTIVE"
},
{
"name": "ACCEPT_DONATIONS",
"status": "ACTIVE"
},
{
"name": "QR_CODE",
"status": "ACTIVE"
},
{
"name": "INSTALLMENTS",
"status": "ACTIVE"
},
{
"name": "PAYPAL_CHECKOUT",
"status": "ACTIVE"
},
{
"name": "WITHDRAW_FUNDS_TO_DOMESTIC_BANK",
"status": "ACTIVE"
},
{
"name": "COMMERCIAL_ENTITY",
"status": "ACTIVE"
},
{
"name": "FRAUD_TOOL_ACCESS",
"status": "ACTIVE"
},
{
"name": "GUEST_CHECKOUT",
"status": "ACTIVE"
}
],
"payments_receivable": true,
"legal_name": "Test Store",
"primary_email_confirmed": true
}
As per the documentation, the response mentioned above should also include the following data:
"oauth_integrations": [{
"integration_type": "OAUTH_THIRD_PARTY",
"integration_method": "PAYPAL",
"oauth_third_party": [{
"partner_client_id": "B_AhEDQSJmQb9fK4ljbgiuasgioasiogac1pt16Mb9h6Ua9pnq1SYvjSy1fOuKXFA2NLw",
"merchant_client_id": "B_AGDGPKGC1P28B65QYRvOmmNe-7JKnEMqIt_H_CMFsXLaQBtIKiatmJsv5_ZtxLvp_qPkptoHg",
"scopes": [
"https://uri.paypal.com/services/payments/realtimepayment",
"https://uri.paypal.com/services/reporting/search/read",
"https://uri.paypal.com/services/payments/refund",
"https://uri.paypal.com/services/customer/merchant-integrations/read",
"https://uri.paypal.com/services/payments/payment/authcapture"
]
}]
}],
I've completed all the coding for this task but need assistance with one final issue. Once resolved, I'll be able to approve the company's status.
Note: I've configured the oAuth features in sandbox mode within the PayPal app settings.
Before this, I am request for sign up link using the following curl command
curl --location 'https://api-m.sandbox.paypal.com/v2/customer/partner-referrals' \
--header 'PayPal-Partner-Attribution-ID: ABCTEST_SP_PPCP' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer A31AAIB1RY2kraedIzAfsuDIp2hBo05JQCJwV5_X6KIaCvB6VokrixuaeMOuLYvXjRKlhdlEzgDEPbkyHyQG_kKmTwW0jJ4yw' \
--data-raw '{
"individual_owners": [
{
"names": [
{
"full_name": "Arslan Ahmed Awan",
"type": "LEGAL"
}
],
"type": "PRIMARY"
}
],
"business_entity": {
"business_type": {
"type": "INDIVIDUAL"
},
"names": [
{
"business_name": "Test-Company",
"type": "LEGAL_NAME"
}
],
"emails": [
{
"email": "arslan.awan163@gmail.com"
}
],
"addresses": [
{
"address_line_1": "Colorado, USA",
"type": "WORK"
}
],
"phones": [
{
"country_code": "1",
"national_number": "7745458900"
}
]
},
"email": "arslan.awan163@gmail.com",
"preferred_language_code": "en-US",
"product_name": "Project Name",
"tracking_id": "TrackAR4N",
"partner_config_override": {
"partner_logo_url": "https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg",
"return_url": "https://example.com/company/paypal_connect.php?paypal_return_url=1",
"return_url_description": "-",
"action_renewal_url": "https://example.com/company/paypal_connect.php?paypal_action_renewal_url=1",
"show_add_credit_card": true
},
"operations": [
{
"operation": "BANK_ADDITION"
}
],
"legal_consents": [
{
"type": "SHARE_DATA_CONSENT",
"granted": true
}
],
"products": [
"EXPRESS_CHECKOUT"
]
}'
Thanks.
I'm hoping someone can explain how the oauth_third_party parameter will be available in the response.
This appears to be the issue
"operations": [
{
"operation": "BANK_ADDITION"
}
],
You probably need more operations, such as PAYMENT, to get the response you want.
Try with the example from the documentation.
curl -v -X POST https://api-m.sandbox.paypal.com/v2/customer/partner-referrals \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ACCESS-TOKEN" \
-d '{
"tracking_id": "TRACKING-ID",
"operations": [{
"operation": "API_INTEGRATION",
"api_integration_preference": {
"rest_api_integration": {
"integration_method": "PAYPAL",
"integration_type": "THIRD_PARTY",
"third_party_details": {
"features": [
"PAYMENT",
"REFUND"
]
}
}
}
}],
"products": [
"EXPRESS_CHECKOUT"
],
"legal_consents": [{
"type": "SHARE_DATA_CONSENT",
"granted": true
}]
}
'