Validation of tax number through Xero API - xero-api

I have been struggling for some time whether there is a way to validate if given tax number is a correct one. I have a form where customers enter their invoice data, but we create the invoice in the system when the payment arrives on our bank account.
That means if the vat id is wrong, Xero will return an error when create an invoice. I would like to validate the tax number on invoice data form, instead.
I have checked the API documentation, but I couldn't find anything there. Am I missing something?

I have an app that sends the contact informatiuon to Xero, and validate the VAT numbers first.
I do this using the VIES VAT SOAP Service.
https://www.programmableweb.com/api/vies-vat
http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
My code is in c#, so I just created a web reference via the wsdl and call it with the countryCode and vatNumber arguments.

You can also use https://tin-check.com/en/
They have an API that validate tax number for more than 100 countries
https://api.tin-check.com/
Migth be a good alternative solution.

Related

Prestashop - Optional VAT number for delivery address but mandatory for invoicing

I am using Prestashop 1.7 and I need to make the VAT number only mandatory for billing addresses, but optional for delivery addresses. This is because many of the clients of my store are professionals/companies that need to have the VAT on the invoice, but who send the product directly to their clients from our platform, so they do not have to enter/know the CIF of the client that receives the shipment.
I've searched but can't find anything, so I've tried to do it myself, but I don't get full functionality.
This is what I have done so far:
I marked vat_number as non-mandatory in the Clients->Addresses backend section to be able to control the mandatory nature of the field during the purchase process.
In the payment process (Addresses step), if the customer uses the same address for delivery and invoice, I force him to enter a VAT number.
However, if they use different addresses, I force them to enter a VAT number for the invoicing address only and allow them to leave empty that field in the delivery address.
In the "Your invoicing address" subsection of the "Addresses" section, I disable the addresses that do not have the CIF filled in so that the customer cannot select them.
The problem is this: if the customer goes to their personal "Addresses" section and removes the VAT number from the address used for the invoice (they can do that because I had to mark the field as not required for it to work) and goes back to the checkout process, Prestashop goes directly to the next step (Delivery Method) and allows them to continue with the checkout process and the result is an order with an invoicing address without the VAT number.
Is there any native Prestashop way to do this or any module?
Or does anyone know how can I detect in the "Delivery method" step which addresses the customer has selected and force them to go through the "Addresses" step if there isn't any VAT number in the invoicing address?
Thank you very much
You would have to make your own module for this.
But you need the VAT number for delivery address and not billing address if you want to delivery VAT free according to a intra-Community supply order. Maybe check this (free) module.
If you are going to make a module for this, start with the hookActionValidateCustomerAddressForm hook.

variable monthly charges to users

I have a situation where I am to bill the site users monthly. But the invoice amount that is raised depends on the the leads that our site generates for his business. For example if the user gets 5 leads from my site and I charge him $10 per lead, at the end of month he will be charged $50. similarly leads might vary each month so will the amount.
Now I cant store his cc/ paypal credentials on my site for security reasons nor can I pre bill him or ask him to take credits and then use it. Please let me know the way to handle this situation. How can I handle this using paypal?
There are a few different ways to handle this, but I would recommend Preapproved Payments, which are part of the Adaptive Payments API.
With this method your users would create a profile with you (using the Preapproval API) when they first create their account on your site. That will give you a preapproval key that you can store with your user account. Then in the future when you need to bill them you can use the Pay API with the preapproval key to process funds immediately without further approval.
If you're working with PHP my class library for PayPal will make these calls very simple for you. You would just use the Preapproval.php template to setup the profiles for people, and then use PayWithOptions.php to process payments using the preapproval key(s) accordingly.
If you end up using it and need more help you can contact me directly for support.

Can PayPal REST API payments calculate shipping and taxes?

I have successfully used the PayPal REST API's to create and execute a payment in the sandbox, but even though I have shipping options and tax rates configured, they do not show up for the user. I expected the shipping options and calculated tax to appear before the user "approves" the payment. Is this feature supported via the REST API's, and if so what do I need to pass to make it happen?
The tax and shipping profiles are only for PayPal Standard transactions (the "Buy Now" buttons). API integrations like the Classic API and REST API are for more advanced integrations and are designed where PayPal returns the shipping address selected to you and your system chooses the tax rate and shipping rates before the customer confirms payment.
The PayPal shipping calculator only applies to Website Payments Standard transactions.
Express Checkout transactions will not use the shipping calculator.
https://www.paypal-community.com/t5/Merchant-services-Archive/Using-PayPal-s-shipping-calculator-with-Express-Checkout/td-p/328404
This is related but doesn't answer the question fully I'm afraid.
I've just started looking into applying different state taxes using the PayPal REST API. The override_charge_models option when creating a new BillingAgreement looks hopeful. It allows you to apply a custom tax amount when creating an agreement.

How to get custom fields like Invoice number to show on Paypal receipts

We are using PayPal website payment pro and we can send money live and all is well.
Our issues are:
when we view the recent payment, it should say "payment from John Smith"...but ours just say "payment from". the name of the person does not show up. well our accounting section wants it back. :-) not sure why its not or which parameter of the DoDirectPayment request I need for this.
The user submission form has an invoice number field. I also need the invoice number to show on the details page of the PayPal payment receipt. I was able to get stuff like shipping address to show up by using its parameter, but no idea to have Invoice Number show up.
I know it can be done because the old website had these and they used website payments pro API to send payments. I just am not sure of how to do this. thee is no mention of this in the API references that I see, especially for DoDirectPayments method. Any help appreciated
Norman

Card Number field missing for BMO Group

We use Yodlee API to get the bank code 2483 BMO Financial Group (Canada) Bank.
The issue is that we are missing the card number field for authentication.
We have this issue only with BMO Group.
Can you please check this issue at the earliest and let us know what needs to be done.
Thank you
I was able to get the card number field for authentication for BMO using Yodlee's SDK.
Below is the list of fields which Yodlee's SDK returns for bank code 2483
1)Enter BMO Debit Card(this is the field where you need to enter the debit card number)
2)Enter BMO Credit Card(16 digit) (this is the field where you need to enter the credit card details)
3)Password
You can pass either of the 1st two fields to Yodlee.
Please try once using the Yodlee's sampleApp and if you are still seeing the issue, please raise a service request using Yodlee customer care(YCC) tool. And please mention your cobrandID, SOAP URL which you are using and we will look into it.