Public API for all state tax names - api

Is there any public API which returns the tax names for all the states across all countries ?

Here are some APIs.
About pricing, some are completely free, some are based on usage and others have free trial versions.
Taxjar: github.com*, developers.taxjar.com
AvaTax: developer.avalara.com, www.avalara.com
USGeocoder: usgeocoder.com
FastTax: www.serviceobjects.com
SalesTaxPAL: www.salestaxpal.com
*GitHub link to the Taxjar profile since each language has its own repository.

Related

Currency Code in Twitter Ads Business account

How can I get what currency code is set for twitter ads business account. I have gone through their api-documentation, but i don't seem to find any endpoint mentioning currency code.
On the Ads Getting Started guide, there is a section discussing Currency:
The type of a currency is identified using ISO-4217. This is a three-letter string like “USD” or “EUR”. The value of a currency is represented in micros. For USD, $5.50 is encoded as 5.50*1e6, or 5,500,000. To represent a “whole value”, you need to multiply the local micro by 1e6 (1_000_000) for all currencies.
Currency is associated with a funding instrument and can be programmatically queried using the Funding Instrument API endpoints.

Yodlee Aggregation REST API containerNames

The call to getSiteInfo returns, among other things, a list of enableContainers.
Each of these is a hash eg: { "containerName":"bills", "assetType":0 }
Is there an exhaustive list of containerNames?
Is there an exhaustive list of assetTypes and what do the enums mean?
I have looked through the Yodlee developer's docco but can't find the answers.
There are couple of things to know about this.
This enabled containers varies depending upon which all containers are enabled for you as a customer, for example if you are interested only in bank and credit cards then this can be configured and irrespective of what other container types Yodlee supports you will get only these two container types.
Exhaustive list- bank, credits(for credit cards), loan/mortgage, bills(can have- minutes,telephone,utilities,cable_satellite,bills), insurance, stocks(for investments), miles(for Rewards) and prepay.
Asset Types- can be of 0,1,2 where all you containers which will have your asset will get 1, containers considered as liabilities will have this value as 2 and rest will have 0.

Designing a rest url - filter with multiple params over entities (not last entity)

Let's say I have the following entities in my libraries app - Library Room, shelf, Book.
Where Room has N shelves, and shelves have N Books.
Now the following url brings me a list of books whose
library is 3, room no. is 5 and shelf no. is 43.
.../library/3/room/5/shelf/43/books
Assuming shelf 43 is unique per room only
(There is shelf 43 also in other rooms)
and Rooms are not unique (There's a few room no. 5 ) in the library.
Here is my questions:
I want to filter with more fields on the entities, here is what i want to do
(representation not in rest):
.../library/id=3&type=3/room/decade=21&topic=horror/shelf/location=east&/books
This is not rest.
How do I represent it in rest?
Notes:
I don't want to do this way
.../books&param1=X&param2=X&param3=X&param4=X
because not all params are related to books.
Couple of things that you need to look into while designing your apis.
1) are type, decade, topic etc required fields? if so, I will probably make them a part of the path itself, such as:
../libraries/{libraryId}/type/{typeId}/rooms/{roomId}/decades/{decadeId}/topics/{topicName}/shelves/{shelfId}/locations/{shelfLocation}/books
Here I am assuming that each library can have rooms which have unique room ids per library, each room can have shelves which has unique ids/locations per room (and so on and so forth). Yes, the url is pretty long, but that's kind of expected
2) if these fields are not required, you could use a different approach which is a bit less verbose but a bit more confusing for client developers who have never used such approach here. Here's a straight up example Restful Java with JAX-RS by Bill Burke
#Path("{first}-{last}")
#GET
#Produces("application/xml")
public StreamingOutput getCustomer(#PathParam("first") String firstName,
#PathParam("last") String lastName) {
...
}
Here, we have the URI path parameters {first} and {last}. If our HTTP request is
GET /customers/bill-burke, bill will be injected into the firstName parameter and
burke will be injected into the lastName parameter.
If we follow this somewhat academic approach (I have not seen this implemented on many platforms. Most platforms normally go with approach # 1, a more verbose but clear approach), your URL would look somewhat like this:
../libraries/{libraryId}-{typeId}/rooms/{roomId}-{decadeId}-{topicName}/shelves/{shelfId}-{shelfLocation}/books
This way, if the client developer doesn't pass in the non-required fields, you can handle it at the business logic level and assign these variables a default value, for example:
../libraries/3-/rooms/2-1-horror/shelves/1-/books
With this url, libraryId = 3, typeId = null (thus can be defaulted to it's default value) and so on and so forth. Remember that if libraryId is required field, then you might want to actually make it a part of the pathparam itself
Hope this helps!

Payment using credit card through balanced payment in rails step by step

I am new to use balanced payments.
After get credit card info what is first, second... all steps..
can any one give me step by step so i can do on that way.
Thanks in advance
The steps would depend on what type of application you're trying to develop.
The basis of the system is that you create a Customer for each of your users. balanced.js removes the need for you to be PCI compliant because the sensitive data is submitted directly to Balanced and never goes through your servers. You use balanced.js to tokenize credit cards and bank accounts and add them to specific Customer instances. Once you've got the cards and bank accounts added you can do things like debit customerBuyerA and credit customerSellerB.
Next, I encourage you to read through some of the common fee scenarios to get an idea of what's going to work well for your business. https://docs.balancedpayments.com/current/#collecting-your-fees
Both https://docs.balancedpayments.com/current/overview.html and https://docs.balancedpayments.com/current/api.html have plenty of information to get you going from there.
I encourage you to stop by #balanced on IRC to get any other development questions answered.
I solved using below code in test mode (in RUBY):
Install gem "balanced"
Assign API key
Balanced.configure('API KEY')
Accept user card info
card = Balanced::Card.new( :card_number => "4111111111111111",
:expiration_month => "12",
:expiration_year => "2020"
).save
Create buyer to debit fee
buyer = Balanced::Marketplace.my_marketplace.create_buyer(:card_uri => card.uri)
5 Debit from buyer account
`another_debit = buyer.debit(
:amount => 1000,
:appears_on_statement_as => "MARKETPLACE.COM"
)`
7 Credit to Merchant account (You need to verify Bank account first from here)
merchant = Balanced::Account.find('/v1/marketplaces/TEST-MP6wn7oEW117Yn9gKXuQaTIO/bank_accounts/BANK ACC ID')
merchant.credit('1000')
Hope work for any one and suggestion welcome.

How can I write software that does bank account transfers? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
You know those websites that let you type in your checking account number and the routing number, and then they can transfer money to and from your account?
How does that work? Any good services or APIs for doing that? Any gotchas?
The banks do have APIs for doing this, but only approved people/companies are allowed to interface with these systems. Because it actually involves transferring money around, the security requirements are pretty high in terms of how you handle the account numbers on your system.
Many sites that offer this feature for buying goods actually use a third party system to handle the actual money transfer into their account. This lowers the amount of trouble to implement the API, as well as putting the burden of security on the third party handling the money transfers.
If you are serious about setting up a system where you can accept bank account numbers, and exchange funds, you should contact your bank, and see what the actual requirements for implementing such a system. Each bank has their own system, along with their own rate regarding the cost of these transactions.
Some third parties I'm aware of are
Moneris
Cactus
Beanstream
I'm in Canada, although I think Moneris and Cactus operate in the US. I think Beanstream doesn't. Again, you can talk to your bank, and they can probably get you in touch with a third party who will help you with the transactions.
If you want to be able to initiate transfer of funds between accounts in different financial institutions (using account and routing number), you need to find a payment processing company that offers ACH (http://en.wikipedia.org/wiki/Automated_Clearing_House) transfer services. Usually these companies are subsidiary of a financial institution that already has access to ACH. For example. one such company is ACH Direct (http://www.achdirect.com/). I can't vouch for its services or reliability though, I am just giving it here as an example of what type of companies you need to search.
Of course, technically, you could try to connect to ACH directly. However, to do this, you need to follow the rules and regulations of NACHA (http://en.wikipedia.org/wiki/NACHA-The_Electronic_Payments_Association) when writing your software and pass rigorous certification. It's quite a big investment, so unless you are backed by couple of bilions of dollars, I wouldn't advise attempting this.
You can do this with a Moneris US eSELECTplus merchant account - you just need to have Automated Clearing House (ACH) enabled on your merchant account (unfortunately there is no equivalent to ACH currently available in Canada).
Here's an example of what a debit transaction looks like in the Moneris US PHP API:
<?php
require "../mpgClasses.php";
/************************ Request Variables **********************************/
$store_id='monusqa002'; //account credentials
$api_token='qatoken';
/************************ Transaction Object******************************/
$txnArray=array(type=>'us_ach_debit',
order_id=>'ach-'.date("dmy-G:i:s"),
cust_id=> 'my cust id',
amount=>'1.00'
);
$achTemplate = array(
sec =>'ppd',
cust_first_name => 'Bob',
cust_last_name => 'Smith',
cust_address1 => '101 Main St',
cust_address2 => 'Apt 102,
cust_city => 'Chicago',
cust_state => 'IL',
cust_zip =>'123456',
routing_num => '490000018',
account_num => '23456',
check_num => '100',
account_type => 'savings'
);
$mpgAchInfo = new mpgAchInfo ($achTemplate);
$mpgTxn = new mpgTransaction($txnArray);
$mpgTxn->setAchInfo($mpgAchInfo);
$mpgRequest = new mpgRequest($mpgTxn);
$mpgHttpPost = new mpgHttpsPost($store_id,$api_token,$mpgRequest);
/************************ Response Object **********************************/
$mpgResponse=$mpgHttpPost->getMpgResponse();
print("\nCardType = " . $mpgResponse->getCardType());
print("\nTransAmount = " . $mpgResponse->getTransAmount());
print("\nTxnNumber = " . $mpgResponse->getTxnNumber());
print("\nReceiptId = " . $mpgResponse->getReceiptId());
print("\nTransType = " . $mpgResponse->getTransType());
print("\nReferenceNum = " . $mpgResponse->getReferenceNum());
print("\nResponseCode = " . $mpgResponse->getResponseCode());
print("\nMessage = " . $mpgResponse->getMessage());
print("\nAuthCode = " . $mpgResponse->getAuthCode());
print("\nComplete = " . $mpgResponse->getComplete());
print("\nTransDate = " . $mpgResponse->getTransDate());
print("\nTransTime = " . $mpgResponse->getTransTime());
print("\nTicket = " . $mpgResponse->getTicket());
print("\nTimedOut = " . $mpgResponse->getTimedOut());
?>
The API files and integration guides for Moneris USA are available at:
http://developer.moneris.com (free registration required)
Moneris USA - ACH:
http://www.monerisusa.com/payment-processing-services/ach-direct-debit.aspx
Stripe Connect allows you to transfer money to bank accounts and to accept payments through one unified API. As of December 2015 they provide more thorough documentation and in general seem to be a more popular option among developers than most of the companies mentioned in other answers.
See https://stripe.com/docs/connect for more info.
Paypal has a fairly accessible API you can use within your program to accomplish some of this.
Pretty straightforward way of doing ACH transfers - https://www.dwolla.com/white-label
Depending on what you want to your application to do you'll need different functionality.
If you want to pay (credit) bank accounts. It's pretty straight forward. Here are the steps:
1. Create a member
2. Create a funding source
3. Create a transfer
If you want to debit and credit bank accounts it gets a little more complex. Here are the steps:
1. Create a member
2. Get a funding source authorization
3. Create a transfer
The only reason the authorization is a little harder is because you have to go through a 2 deposit method or a verification flow of some type. This gets a lot easier with Dwolla.js - https://www.dwolla.com/dwollajs-bank-verification