PayPal Billing Plan doesn't allow users to use PayPal balance - paypal

I setup a PayPal plan with a trialing period of 1 month.
When users sign-up for the Billing Agreement, they are unable to use their PayPal balance.
Is there any reason why that would happen? I read on one forum that PayPal may force users to use a card or bank account when the Billing Plan is setup incorrectly, however I don't think that is the case.
My REST call to setup the plan:
curl -v -X POST https://api.paypal.com/v1/payments/billing-plans/ \
-H "Content-Type:application/json" \
-H "Authorization: Bearer <Access Key>" \
-d '{
"name": "Plan",
"description": "Plan desc",
"type": "FIXED",
"payment_definitions": [
{
"name": "Regular payment definition",
"type": "REGULAR",
"frequency": "MONTH",
"frequency_interval": "1",
"amount": {
"value": "45",
"currency": "USD"
},
"cycles": "12",
"charge_models": [
]
},
{
"name": "Trial payment definition",
"type": "TRIAL",
"frequency": "MONTH",
"frequency_interval": "1",
"amount": {
"value": "0",
"currency": "USD"
},
"cycles": "1",
"charge_models": [
]
}
],
"merchant_preferences": {
"return_url": "http://www.paypal.com",
"cancel_url": "http://www.paypal.com/cancel",
"auto_bill_amount": "YES",
"initial_fail_amount_action": "CANCEL",
"max_fail_attempts": "0"
}
}'
Any help or insight would be greatly appreciated.
Thanks!

Talked to PayPal support.
Turns out this is intended behavior. To protect the merchants PayPal requires customers to have at least one additional payment method other than their PayPal Balance.
Therefore, if they do not they cannot subscribe. However, one thing I'd like to mention is that even though they require this, according to the representative, the PayPal Balance will always be used first.

Related

How to remove Upi(External wallet) from Razorpay - FLUTTER

I am using Razorpay for the payment in an e- commerce app, Actually in only need card payment in the payment method of razorpay. But how can i remove all the external payment from the options.
You can configure the payment methods of your choice on the Checkout section of the Payment Links to provide a highly personalized experience for your customers.
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/payment_links/ \
-H 'Content-type: application/json' \
-d '{
"amount": 1000,
"currency": "INR",
"accept_partial": true,
"first_min_partial_amount": 100,
"reference_id": "#523442",
"description": "Payment for policy no #23456",
"customer": {
"name": "Gaurav Kumar",
"contact": "+919999999999",
"email": "gaurav.kumar#example.com"
},
"notify": {
"sms": true,
"email": true
},
"reminder_enable": true,
"options": {
"checkout": {
"method": {
//here you have to specify
"netbanking": "1",
"card": "1",
"upi": "0",
"wallet": "0"
}
}
}
}'
Edit
official docs: https://razorpay.com/docs/payments/payment-methods/

PayPal APIs - Set multiple curriences in a single order

I'm trying to set more than one currency code within a single order.
I sent this json to the PayPal API Create order with two currency codes, EUR and USD, distributed at random.
{
"intent": "CAPTURE",
"brand_name": "Miller-Miller",
"cancel_url": "https://adkins-knight.biz/login/",
"landing_page": "LOGIN",
"return_url": "https://kennedy.net/",
"shipping_preference": "NO_SHIPPING",
"user_action": "PAY_NOW",
"payer_email_address": "lindaholland#gmail.com",
"payer_address_line_1": "98169 Tina Ramp Apt. 548",
"payer_address_line_2": "Unions",
"payer_admin_area_1": "United States Virgin Islands",
"payer_admin_area_2": "South Veronicaborough",
"payer_country_code": "BE",
"payer_postal_code": "16858",
"payer_full_name": "Jeremy Martin Jr.",
"payer_given_name": "Sarah",
"payer_middle_name": "Richard",
"payer_prefix": "Dr.",
"payer_suffix": "DDS",
"payer_surname": "Donovan",
"user": null,
"purchase_units": [
{
"custom_id": "3cef9acd-acfd-4b57-9426-fe25b993b51f",
"description": "Process would successful not stage girl.\nEat economy air stuff wind box city. Suffer scene deal much. Rise or friend provide.",
"invoice_id": "0f2ac8bf-c763-48a2-8207-6c15a422cf44",
"reference_id": "0ea30992-6cc2-4e3f-9f9f-bb2a1ff9458d",
"soft_descriptor": "break",
"amount_currency_code": "EUR",
"amount_value": 9998008.45,
"breakdown_discount_currency_code": "EUR",
"breakdown_discount_value": 9999889.5,
"breakdown_handling_currency_code": "USD",
"breakdown_handling_value": 9999884.8,
"breakdown_insurance_currency_code": "EUR",
"breakdown_insurance_value": 9997223.61,
"breakdown_item_total_currency_code": "USD",
"breakdown_item_total_value": 9994971.56,
"breakdown_shipping_currency_code": "USD",
"breakdown_shipping_value": 9991250.62,
"breakdown_shipping_discount_currency_code": "USD",
"breakdown_shipping_discount_value": 9997344.57,
"breakdown_tax_total_currency_code": "USD",
"breakdown_tax_total_value": 9999229.59,
"shipping_type": "SHIPPING",
"shipping_address_line_1": "2359 Greene Path Suite 645",
"shipping_address_line_2": "Springs",
"shipping_admin_area_1": "Hong Kong",
"shipping_admin_area_2": "South Debra",
"shipping_country_code": "CU",
"shipping_postal_code": "95591",
"shipping_full_name": "Ashley Stone",
"items": [
{
"category": "PHYSICAL_GOODS",
"description": "Despite should allow. Military determine up she goal.",
"name": "Mary Harper",
"quantity": 4405,
"sku": "total",
"tax_currency_code": "USD",
"tax_value": 9997113.36,
"unit_amount_currency_code": "USD",
"unit_amount_value": 9998795.33
},
{
"category": "PHYSICAL_GOODS",
"description": "Hospital cover job rest new. Only citizen I generation raise present. Majority president stuff west.",
"name": "Lucas Parker",
"quantity": 1759,
"sku": "little",
"tax_currency_code": "USD",
"tax_value": 9996456.8,
"unit_amount_currency_code": "USD",
"unit_amount_value": 9999554.88
}
]
}
]
}
I got this response:
{
"name": "UNPROCESSABLE_ENTITY",
"details": [
{
"issue": "MULTI_CURRENCY_ORDER",
"description": "Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code."
}
],
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "527aca32094a2",
"links": [
{
"href": "https://developer.paypal.com/docs/api/orders/v2/#error-MULTI_CURRENCY_ORDER",
"rel": "information_link",
"method": "GET"
}
]
}
I have searched through the PayPal documentation and on Google, but it is not clear if it is possible to set up two or more currencies in a single order.
The inserted curriences (EUR & USD) are both approved in my PayPal settings following these steps from PayPal FAQ:
EDIT:
If I need to set multiple products with two curriences in a single transaction, I cannot do it? Have I do separate the order in two order, apply a single currency code for each of them?
Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code.

PayPal REST API Create Invoice with Template

Has anybody ever successfully created a PayPal invoice with a specific chosen template?
I can't seem to get it to work.
Have tried specifying the template_id in the call, and have also tried setting the desired template as the default. In both cases, the API response contains the chosen template ID, but when the invoice is sent, it does not use the chosen template (can tell because there's no logo).
This the the API call:
curl -v -X POST https://api.paypal.com/v1/invoicing/invoices/ \
-H "Content-Type:application/json" \
-H "Authorization: Bearer <Access-Token>" \
-d '{
"template_id": "TEMP-66B140465N059453G",
"items": [
{
"name": "Part E",
"quantity": 2,
"unit_price": {
"currency": "USD",
"value": "10.15"
}
}
],
"shipping_info": {
"first_name": "John",
"last_name": "Doe",
"business_name": "Not applicable",
"phone": {
"country_code": "001",
"national_number": "5039871234"
},
"address": {
"line1": "1234 Broad St.",
"city": "Portland",
"state": "OR",
"postal_code": "97216",
"country_code": "US"
}
},
"shipping_cost": {
"amount": {
"currency": "USD",
"value": "15.01"
}
},
"allow_tip": false
}'
This is the response:
"id":<Invoice ID>,
"number":"0004",
"template_id":"TEMP-66B140465N059453G",
"status":"DRAFT",
"merchant_info":{},
"shipping_info":{"first_name":"John","last_name":"Doe","business_name":"Not applicable","phone":{"country_code":"001","national_number":"5039871234"},"address":{"line1":"1234 Broad St.","city":"Portland","state":"OR","postal_code":"97216","country_code":"US"}},
"items":[{"name":"Part E","quantity":2.0,"unit_price":{"currency":"USD","value":"10.15"}}],
"invoice_date":"2017-05-30 PDT",
"shipping_cost":{"amount":{"currency":"USD","value":"15.01"}},
"tax_calculated_after_discount":false,
"tax_inclusive":false,
"total_amount":{"currency":"USD","value":"35.31"},
"metadata":{"created_date":"2017-05-30 13:35:39 PDT"},
"allow_tip":false
If anybody has any ideas, would be happy to hear them.
Thanks.
We are correcting the instructions for how you use a Template ID. Sorry for the confusion.
When you are doing a basic integration to create and send an invoice, you don't need to use Template at all.
Template is useful if you are creating a full invoicing app where you want the end user (invoicer) to be able to create templates and access them when creating invoices. See the PayPal.com website for how templates are used.
Regards,
Kristen
I ended up getting in touch with someone at PayPal. They said that the merchant_info has to be passed in the request in order for the template to work.
That basically defeated the purpose of using the templates for us, so I never bothered testing that.
In the end, I just decided to not use a template.
if you are just looking to add your logo to your API created invoice, put this line at the end of your JSON before POSTing your draft:
},
"note": "Thank you for your business!",
"terms": "no refunds after 30 days",
"logo_url": "https://link_to_your_log.PNG"
}

PayPal hide order total

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."
}]
}

PayPal recurring payments: How to add initial payment.

I have been using implementing a function that use can do recurring payments using PayPal with this request (copied from https://developer.paypal.com/webapps/developer/docs/api/#create-a-plan)
curl -v POST https://api.sandbox.paypal.com/v1/payments/billing-plans \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer <Access-Token>' \
-d '{
"name": "T-Shirt of the Month Club Plan",
"description": "Template creation.",
"type": "fixed",
"payment_definitions": [
{
"name": "Regular Payments",
"type": "REGULAR",
"frequency": "MONTH",
"frequency_interval": "2",
"amount": {
"value": "100",
"currency": "USD"
},
"cycles": "12",
"charge_models": [
{
"type": "SHIPPING",
"amount": {
"value": "10",
"currency": "USD"
}
},
{
"type": "TAX",
"amount": {
"value": "12",
"currency": "USD"
}
}
]
}
],
"merchant_preferences": {
"setup_fee": {
"value": "1",
"currency": "USD"
},
"return_url": "http://www.return.com",
"cancel_url": "http://www.cancel.com",
"auto_bill_amount": "YES",
"initial_fail_amount_action": "CONTINUE",
"max_fail_attempts": "0"
}
}'
the above request will create regular recurring payment. I want to add initial payment to the request above. I found a way with Classic API as in https://developer.paypal.com/docs/classic/paypal-payments-pro/integration-guide/WPRecurringPayments/ Specifying an Initial Payment part. However I could not find a way to add initial payment using REST API. Thanks!
Hey this is avi from PayPal here. The setup_fee under the merchant_preferences section for rest billing plans corresponds to the initial payment for recurring payments in the classic api. That fee is charged only once when after user consents to billing plan to form billing agreement.