With the batch payout API for Paypal, if I send a request with multiple items and there is an error with one of them, will the ones without an error still go through? Or will they all fail?
For example, if I sent a payload of:
{
"sender_batch_header": {
"sender_batch_id": "batch_8",
"email_subject": "You have a payment"
},
"items": [
{
"recipient_type": "EMAIL",
"amount": {
"value": 1.0,
"currency": "USD"
},
"receiver": "test_user#example.com",
"note": "Thank you.",
"sender_item_id": "item_1"
},
{
"recipient_type": "EMAIL",
"amount": {
"value": 1.0,
"currency": "USD"
},
"receiver": "bad_email_address",
"note": "Thank you.",
"sender_item_id": "item_1"
}]
}
Will the payout to test_user#example.com go through since the other item has an invalid email address?
Thanks
If you use
"receiver": "bad_email_address",
PayPal will throw out error as "bad_email_address" is not in email format, the whole payout can't go through, no money sent out.
If you use
"receiver": "bad_email_address#email.com",
The email address is not existed, but it's email format, the whole payment will go through, existed PayPal receiver will get the money, this un-existed email transaction will in Unclaimed status. If someone register this email address, then this person will get the money.
Related
I try to use PayPal payments API to provide parrallel payments to the multiple merchants in the single checkout. I want use this on marketplace and I want to make payments from one buyer to several sellers without intermediate account, How Can I do this?
I considered the payouts (https://developer.paypal.com/docs/payouts/integrate/api-integration/#prerequisites), but I can use this way only on my paypal account
"items": [
{
"recipient_type": "EMAIL",
"amount": {
"value": "9.87",
"currency": "USD"
},
"note": "Thanks for your patronage!",
"sender_item_id": "201403140001",
"receiver": "receiver2#example.com"
},
{
"recipient_type": "EMAIL",
"amount": {
"value": "9.85",
"currency": "USD"
},
"note": "Thanks for your patronage!",
"sender_item_id": "201403140001",
"receiver": "receiver#example.com"
}
I want send post like this, for one customer on my website and several seller.
Everyhing works flawlessly with my PayPal classic implementation in the sandbox. (Marked as deprecated from jan 17 but still supported.) But it simply does not transfer money from the customer to the merchant.
"payment": {
"intent": "sale",
"transactions": [
{
"amount": {
"total": "1.21",
"currency": "EUR",
"details": {
"subtotal": "1.08",
"tax": "0.02",
"handling_fee": "0.11"
}
},
"description": "Description content."
}
]
}
After the customer agrees and executes the payment I receive an authorization:
"onAuthorize": {
"paymentToken": "EC-024873345P059811F",
"orderID": "EC-024873345P059811F",
"payerID": "4M6QNG7UDS626",
"paymentID": "PAY-7W7465253T270972NLO5EG6A",
"intent": "sale",
"returnUrl": "https://www.sandbox.paypal.com/?paymentId=PAY-7W7465253T270972NLO5EG6A&token=EC-024873345P059811F&PayerID=4M6QNG7UDS626"
}
I expect that the money transfer took place but nothing shows. No transactions, no errors, no nothing. As if nothing happened. I also expect that I get a notification if the transaction is not executed due to its deprecation. That is not the case. I am clueless.
I wasn't using the deprecated classic after all but the new Client Side Rest: https://developer.paypal.com/demo/checkout/#/pattern/client
It is close to classic, I only needed to add ...
return actions.payment.execute();
Then the actual transfer takes place. I am a happy coder now.
I am using PayPal's REST API to implement paying via PayPal into my website. When I send an approval request to PayPal it always shows the order total. I really don't want to show this. At the point in which we are asking for approval the user won't even know what their total order amount will be. Is there anyway to hide the order total on the PayPal page?
Are you sending line items in your API request? For example:
"item_list": {
"items": [{
"name": "Test",
"sku": "18",
"price": "7.47",
"currency": "USD",
"quantity": "1"
}
]
}
If you send the items array, the price will be displayed in PayPal's payment page.
However, you can just send a total amount, and it won't appear during buyer approval, for example:
{
"intent": "sale",
"redirect_urls": {
"return_url": "http://URL.com/restapi_test/_payments_execute-an-approved-paypal-payment.html",
"cancel_url": "http://URL.com/restapi_test/_payments_create-a-payment-paypal.html"
},
"payer": {
"payment_method": "paypal"
},
"transactions": [{
"amount": {
"total": "7.47",
"currency": "USD"
},
"description": "This is the payment transaction description."
}]
}
I'm using PayPal REST API via rest-api-sdk-java and would like to ask whether it is possible to get AVS/CVV match results in the response (or error object).
I did couple of tests (with sandbox and negative testing turned on) according to https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/ (parts "Testing AVS errors" and "Testing CVV code"):
Payment request with billing address street "123 AVS_A Street" results in INTERNAL_SERVICE_ERROR:
{
"name": "INTERNAL_SERVICE_ERROR",
"debug_id": "baf56174e98c8",
"message": "An internal service error has occurred",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR"
}
The same payment request with billing address street "123 AVS_M Street" results in successful sale.
Is INTERNAL_SERVICE_ERROR expected error in such scenario (AVS_A) ? Is there any way how to get "raw AVS code" instead of INTERNAL_SERVICE_ERROR or CREDIT_CARD_REJECTED?
My request payload:
{
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
"number": "4446283280247004",
"type": "visa",
"expire_month": 11,
"expire_year": 2018,
"cvv2": "888",
"first_name": "Susan",
"last_name": "Wagner",
"billing_address": {
"line1": "123 AVS_A Street",
"line2": "Billing Address Line 2",
"city": "London",
"country_code": "GB",
"postal_code": "W1T 2BU",
"state": "",
"phone": "12345"
}
}
}
]
},
"transactions": [
{
"amount": {
"currency": "GBP",
"total": "3.55",
"details": {
"shipping": "0.00",
"subtotal": "3.55",
"tax": "0.00"
}
},
"description": "T-Shirt XYZ"
}
]
}
And one more question: Is it possible to use advanced Fraud Management Filters on Sandbox environment? I'm using Pro test account but still can't use the filters (nothing happens when I click "upgrade now" button):
https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_rc-manage
looking at the debug id, the test did work - sort of -
Internal Sandbox API Error is 10555 - Filter Decline
--> https://developer.paypal.com/webapps/developer/docs/classic/api/errorcodes/
The transaction was declined because of a merchant risk filter for AVS. Specifically, the merchant has set the filter to decline transactions when the AVS returns a partial match.
So you've likely enabled the AVS fraud management filter on the sandbox account.
Obviously, there should be a proper error message and not just an internal service error, but it looks like the error hasn't been mapped yet.
Will follow up with the PP Devs to report & fix it ;)
As for AVS / CVV response within REST - there doesn't seem to be a way to retrieve the AVS/CVV response of the issuing bank just yet.
Documentation says:
Chained payments are useful in cases when the primary receiver acts as
an agent for other receivers. The sender deals only with the primary
receiver and does not know about the secondary receivers, including
how a payment is split among receivers.
I'm doing this request:
{
"returnUrl": "http://localhost",
"currencyCode": "USD",
"receiverList": { "receiver": [
{
"amount": "5.00",
"email": "vladimir.sapronov-facilitator#gmail.com",
"priamry": true
},
{
"amount": "10.00",
"email": "vladimir.sapronov-shop#gmail.com"
}]},
"actionType": "PAY",
"cancelUrl": "http://localhost",
"requestEnvelope": {"detailLevel": "ReturnAll", "errorLanguage": "en_US"}
}
I was expecting to see the invoice for $15 to vladimir.sapronov-facilitator#gmail.com which is Primary Receiver. But I see:
facilitator account's Test Store $5.00 USD
VLADIMIR SAPRONOV $10.00 USD
Total: $15.00 US
It doesn't look like "sender deals only with primary receiver". How to make it the way it's described in the documentation - want to see only transaction for $15 to Primary Receiver?
The comment from #antoniom is absolutely right. Also the amount to primary receiver should be changed to be more then amount to secondary receiver.
Here is right working example:
{
"returnUrl": "http://localhost",
"currencyCode": "USD",
"receiverList": { "receiver": [
{
"amount": 15.00,
"email": "vladimir.sapronov-facilitator#gmail.com",
"primary": true
},
{
"amount": 10.00,
"email": "vladimir.sapronov-shop#gmail.com"
}]},
"actionType": "PAY",
"cancelUrl": "http://localhost",
"requestEnvelope": {"detailLevel": "ReturnAll", "errorLanguage": "en_US"}
}