我正在研究PayPal市场。我想为我的账户(合作伙伴账户)创建一个商家(卖家账户)。但是当我调用 POST https://api.sandbox.paypal.com/v1/customer/partner-referrals
API 时,它会抛出AUTHORIZATION_ERROR:您不被允许访问此资源。我已经通过生成令牌在标头中传递了一个令牌https://api.sandbox.paypal.com/v1/oauth2/token
以下是我使用邮递员传递的数据:
{
"customer_data": {
"customer_type": "MERCHANT",
"person_details": {
"email_address": "mca.dipak-facilitator@gmail.com",
"name": {
"prefix": "Mrs.",
"given_name":"Dipak",
"surname": "Bhalodiya",
"middle_name": "Prakash"
},
"phone_contacts": [
{
"phone_number_details": {
"country_code": "91",
"national_number": "8585868489"
},
"phone_type": "HOME"
}
],
"home_address": {
"line1": "11, outer ring road",
"state": "Karnataka",
"city": "Bangalore",
"country_code": "US",
"postal_code": "560103"
},
"date_of_birth": {
"event_type": "BIRTH",
"event_date": "1987-12-29T23:59:59.999Z"
},
"nationality_country_code": "US",
"identity_documents": [
{
"type": "SOCIAL_SECURITY_NUMBER",
"value": "ABCDEF34646",
"partial_value": false,
"issuer_country_code": "US"
}
]
},
"business_details": {
"phone_contacts": [
{
"phone_number_details": {
"country_code": "91",
"national_number": "9740216087"
},
"phone_type": "FAX"
}
],
"business_address": {
"line1": "11, outer ring road",
"state": "Karnataka",
"city": "Bangalore",
"country_code": "US",
"postal_code": "560103"
},
"business_type": "PROPRIETORSHIP",
"category": "1004",
"sub_category": "2025",
"names": [
{
"type": "LEGAL",
"name": "DIPAK STORE"
}
],
"business_description": "Arts and handicrafts",
"event_dates": [
{
"event_type": "ESTABLISHED",
"event_date": "2009-01-31T13:59:45Z"
}
],
"website_urls": [
"https://www.skyproductivity.com"
],
"annual_sales_volume_range": {
"minimum_amount": {
"value": "2000",
"currency": "USD"
},
"maximum_amount": {
"value": "3000",
"currency": "USD"
}
},
"average_monthly_volume_range": {
"minimum_amount": {
"value": "2000",
"currency": "USD"
},
"maximum_amount": {
"value": "3000",
"currency": "USD"
}
},
"identity_documents": [
{
"type": "TAX_IDENTIFICATION_NUMBER",
"value": "ABCDEF34646",
"partial_value": false,
"issuer_country_code": "US"
}
],
"email_contacts": [
{
"email_address": "customer-service@example.com",
"role": "CUSTOMER_SERVICE"
}
]
},
"financial_instrument_data": {
"bank_details": [
{
"nick_name": "Bank of America",
"account_number": "130385868974",
"account_type": "CHECKING",
"currency_code": "USD",
"identifiers": [
{
"type": "ROUTING_NUMBER_1",
"value": "325272063"
}
]
}
]
},
"preferred_language_code": "en_US",
"primary_currency_code": "USD",
"referral_user_payer_id": {
"type": "PAYER_ID",
"value": "2281707"
},
"partner_specific_identifiers": [
{
"type": "TRACKING_ID",
"value": "130370723501"
}
]
},
"requested_capabilities": [
{
"capability": "API_INTEGRATION",
"api_integration_preference": {
"partner_id": "2281707", //My own Partner Id
"rest_api_integration": {
"integration_method": "PAYPAL",
"integration_type": "THIRD_PARTY"
},
"rest_third_party_details": {
"partner_client_id": "My Test Account Client ID", //My Client ID of Test Account
"feature_list": [
"PAYMENT",
"REFUND"
]
}
}
}
],
"web_experience_preference": {
"partner_logo_url": "https://www.example.com/logo/",
"return_url": "http://localhost/skyinvoice/htdocs/",
"action_renewal_url": "http://localhost/skyinvoice/htdocs/"
},
"collected_consents": [
{
"type": "SHARE_DATA_CONSENT",
"granted": true
}
],
"products": [
"EXPRESS_CHECKOUT"
]
}
PayPal 市场是限量发布产品,仅适用于已批准的商家。 因此,他们授予了您的客户端 ID 在您的沙盒环境中使用该 API 的权限。因此,我想建议,如果您遇到上述错误,请邮寄给PayPal。