Paypal not accept INR currency when i do credit-card payment
https://api.sandbox.paypal.com/v1/payments/payment (POST Method)
I'm trying to pay with INR currency, which is supported by PayPal, but get the Currency is not supported error
Note: Using Indian Paypal account and primary currency is INR
**Request:**
{
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card_token": {
"credit_card_id": "CARD-7MR51074AF730652RL4J724Y",
"expire_month": 0,
"expire_year": 0
}
}
]
},
"transactions": [
{
"amount": {
"currency": "INR",
"total": "11.61"
},
"description": "Monthly Subscription"
}
]
}
**Response:**
{
"name": "CURRENCY_NOT_ALLOWED",
"message": "Currency is not supported.",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "809873b4c9820"
}
I'm trying in spring boot, paypal dependency.
<dependency>
<groupId>com.paypal.sdk</groupId>
<artifactId>rest-api-sdk</artifactId>
<version>LATEST</version>
</dependency>
thanks for advance.
As you can read from here, INR is supported as you said in the question, however has a side note that tells you that:
This currency is supported as a payment currency and a currency balance for in-country PayPal India accounts only.
So I suppose you are not complying this note
Related
I'm trying to create a recurring payment plan which allow me to get the user first payment immediately, for doing this I've used the option setup_fee setted as 14.99 but for some reason I can't get this working. Infact, the sandbox user that I used for this doesn't have any funds, and the subscription shouldn't be approved just as it happens. These are the payment details:
{
"name": "Monthly Plan",
"description": "Monthly plan based subscription",
"status": "ACTIVE",
"usage_type": "LICENSED",
"product_id": "PROD-32M79039A8219464Y",
"billing_cycles": [
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1,
"pricing_scheme": {
"fixed_price": {
"value": "0",
"currency_code": "EUR"
}
}
},
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 0,
"pricing_scheme": {
"fixed_price": {
"value": "14.99",
"currency_code": "EUR"
}
}
}
],
"payment_preferences": {
"auto_bill_outstanding": true,
"setup_fee": {
"value": "14.99",
"currency_code": "EUR"
},
"setup_fee_failure_action": "CANCEL",
"payment_failure_threshold": 0
},
"taxes": {
"percentage": "0",
"inclusive": false
},
"merchant_preferences": {
"initial_fail_amount_action": "CANCEL",
"max_fail_attempts": 0
}
}
I've specified merchant_preferences, that must cancel the subscription process in the PayPal smart buttons process. But this doesn't do anything. The expected behavior:
User approve a subscription using the PayPal smart buttons
The user has no funds so PayPal should stop the process as merchant_preference configuration
If the user has found, then the subscription must be created and the funds must be sent to merchant account in order to activate the subscription in my server
What country is the sandbox user, and what funding sources are on the account? Most sandbox users have infinite funds from a default bank account funding source, or a credit card. It does not matter that their PayPal balance is zero.
In general it is not possible to create a PayPal subscription with only a PayPal balance -- a backup funding source is required.
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.
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 am trying to set up Billing Agreements using PayPal REST API with paypal-rest-api-sdk for Java on PayPal Sandbox. So, far I've been able to create a billing plan and pass it's id to create a Billing Agreement. However, the response that I get after creating a Billing Agreement does not have approval_url and redirect_url. The following is my request
{
"name": "MYOP Recurring Contribution Agreement",
"description": "Agreement for MYOP Recurring Contributions",
"start_date": "2014-12-13T06:26:32Z",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
"number": "XXXXXXXXXXXX",
"type": "visa",
"expire_month": 1,
"expire_year": 2015,
"cvv2": 874,
"first_name": "Joe",
"last_name": "Young",
"billing_address": {
"line1": "52 N Main ST",
"city": "Johnstown",
"country_code": "US",
"postal_code": "43210",
"state": "OH"
}
}
}
]
},
"plan": {
"id": "P-85A16162MC374104FU7KAYMQ"
}
}
As a response to my create Billing Agreement request, I receive only the following:
{
"id": "I-77GK9WNNV04U",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-77GK9WNNV04U",
"rel": "self",
"method": "GET"
}
]
}
When I fetch the created Billing Agreement with a GET request on the agreement id, I receive information about the agreement that has a 'links' array that does not contain approval_url or redirect_url.
I am unable to proceed to send the payer to an approval url to then execute the agreement. Help please.
You are using ("payment_method":"credit_card") Change the ("Payment_method":"PAYPAL")
'{
"name": "T-Shirt of the Month Club Plan",
"description": "Template creation.",
"start_date": "2016-03-31T00:37:04Z",
"plan": {
"id":"'.$plan_id.'"
},
"payer": {
"payment_method": "PAYPAL"
},
"shipping_address": {
"line1": "111 First Street",
"city": "Saratoga",
"state": "CA",
"postal_code": "95070",
"country_code": "US"
}
}';
Thanks
The approval and the redirect url is only applicable when you make the PayPal Payments so that the buyers can login to their PayPal account and approve the transaction .
Since you are making the billing agreement on credit card , the recurring profile will be created right away and need not go thru any redirect url .
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"}
}