partner_referrals API Questions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The company I work for has been authorized to use PayPal for Marketplaces. I'm working with the Partner Referrals API, and when I try to create a referral (using https://api.sandbox.paypal.com/v1/customer/partner-referrals), I get a Bad Request error. I've looked at the format a few times, and I'm wondering if the problem is I'm not supplying a field that is required or something. What fields in the request body are REQUIRED? Also, as a note for the future API docs, could you possibly highlight which fields are required? Or, if a field is required and not supplied, an error stating what field is missing rather than a simple Bad Request error would be helpful. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well don't I look foolish. I found in the documentation the mention of what fields are required. Thank you for having that info. Though the request for info in the error return as to which field you are missing could still perhaps be helpful...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, back to the required fields...I see under each object which fields are required, but are there any objects that are absolutely required??? My current request body looks like this:
my $post_data = {
customer_data => {
customer_type => 'MERCHANT',
person_details => {
email_address => $user_email,
name => {
given_name => $seller_info->{first_name},
surname => $seller_info->{last_name}
},
phone_contacts => [
{
phone_number_details => {
country_code => 1,
national_number => $seller_info->{user_phone1}
},
phone_type => 'OTHER'
}
],
home_address => {
line1 => $seller_info->{user_address1},
line2 => $seller_info->{user_address2},
state => $seller_info->{user_state},
city => $seller_info->{user_city},
country_code => $seller_info->{user_country},
postal_code => $seller_info->{user_zip}
}
},
business_details => {
phone_contacts => [
{
phone_number_details => {
country_code => 1,
national_number => $seller_info->{seller_phone1}
},
phone_type => 'OTHER'
}
],
business_address => {
line1 => $seller_info->{seller_address1},
line2 => $seller_info->{seller_address2},
state => $seller_info->{seller_state},
city => $seller_info->{seller_city},
country_code => $seller_info->{seller_country},
postal_code => $seller_info->{seller_zip}
},
names => [
{
type => 'DOING_BUSINESS_AS',
name => $seller_info->{seller_name}
}
],
website_urls => [ $seller_info->{seller_url} ],
email_contacts => [
{
email_address => $user_email,
role => 'CUSTOMER_SERVICE'
}
]
},
referral_user_payer_id =>
{ type => 'PAYER_ID', value => $payer_id },
partner_specific_identifiers => [
{
type => 'TRACKING_ID',
value => $seller_id
}
],
},
requested_capabilities => [
{
capability => 'API_INTEGRATION',
api_integration_preference => {
partner_id => $payer_id,
rest_api_integration => {
integration_method => 'PAYPAL',
integration_type => 'THIRD_PARTY'
},
rest_third_party_details => {
partner_client_id => $client_id,
feature_list => [
'PARTNER_FEE', 'PAYMENT',
'REFUND', 'DELAY_FUNDS_DISBURSEMENTS'
]
}
}
}
],
collected_consents =>
[ { type => 'SHARE_DATA_CONSENT', granted => 'true' } ],
products => ['EXPRESS_CHECKOUT']
};
If anyone is curious, this is a Perl hash reference. I know the data has to be in json, and I convert it to that before I send it. I'm just showing this now so actual seller data isn't displayed. So, I ask again, are there any particular fields missing in this request? I'd greatly appreciate any help. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Issue with Empty store_info in Response Using /v1/reporting/transactions on Sandbox API in REST APIs
- Website using Paypal SDK - telephone question in SDKs
- What happened to PayPal Buttons?! in PayPal Payments Standard
- Question about the ButtonSource field when converting an integration from SOAP/NVP to REST API v1. in REST APIs
- Recurring payments for cart with multiple individually subscribable items? in PayPal Payments Standard