<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docs.hostway.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docs.hostway.com/index.php?action=history&amp;feed=atom&amp;title=Accounts-accountId-paymentInfo%3APOST</id>
		<title>Accounts-accountId-paymentInfo:POST - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docs.hostway.com/index.php?action=history&amp;feed=atom&amp;title=Accounts-accountId-paymentInfo%3APOST"/>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-paymentInfo:POST&amp;action=history"/>
		<updated>2026-05-04T17:43:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://docs.hostway.com/index.php?title=Accounts-accountId-paymentInfo:POST&amp;diff=1260&amp;oldid=prev</id>
		<title>Mike.robski: 1 revision: Release 92</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-paymentInfo:POST&amp;diff=1260&amp;oldid=prev"/>
				<updated>2014-04-08T17:20:48Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision: Release 92&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:20, 8 April 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mike.robski</name></author>	</entry>

	<entry>
		<id>http://docs.hostway.com/index.php?title=Accounts-accountId-paymentInfo:POST&amp;diff=1259&amp;oldid=prev</id>
		<title>Dinh.anh: /* Add a direct debit payment info */</title>
		<link rel="alternate" type="text/html" href="http://docs.hostway.com/index.php?title=Accounts-accountId-paymentInfo:POST&amp;diff=1259&amp;oldid=prev"/>
				<updated>2014-04-01T11:07:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Add a direct debit payment info&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= POST /accounts/{accountId}/paymentInfo =&lt;br /&gt;
Create a new payment information for a particular account&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Request ==&lt;br /&gt;
&amp;lt;code&amp;gt;POST /accounts/{accountId}/paymentInfo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Request Parameters ====&lt;br /&gt;
;accountId&lt;br /&gt;
: The ID of the account&lt;br /&gt;
&lt;br /&gt;
=== URI Parameters ===&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
=== Request Headers ===&lt;br /&gt;
{{Authorization}}&lt;br /&gt;
&lt;br /&gt;
=== Request Body ===&lt;br /&gt;
For adding a credit card&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;paymentInfoType&amp;quot;: {paymentInfoType},&lt;br /&gt;
 &amp;quot;accountNumber&amp;quot;: {accountNumber},&lt;br /&gt;
 &amp;quot;cardHolderName&amp;quot;: {cardHolderName},&lt;br /&gt;
 &amp;quot;expirationDate&amp;quot;: {expirationDate},&lt;br /&gt;
 &amp;quot;verificationNumber&amp;quot;: {verificationNumber},&lt;br /&gt;
 &amp;quot;billingAddress&amp;quot;: {&lt;br /&gt;
    &amp;quot;street1&amp;quot;: {street1},&lt;br /&gt;
    &amp;quot;street2&amp;quot;: {street2},&lt;br /&gt;
    &amp;quot;city&amp;quot;: {city},&lt;br /&gt;
    &amp;quot;stateOrProvince&amp;quot;: {stateOrProvince},&lt;br /&gt;
    &amp;quot;postalCode&amp;quot;: {postalCode},&lt;br /&gt;
    &amp;quot;countryCode&amp;quot;: {countryCode}&lt;br /&gt;
 },&lt;br /&gt;
 &amp;quot;routingNumber&amp;quot;: {routingNumber},&lt;br /&gt;
 &amp;quot;accountOwner&amp;quot;: {accountOwner},&lt;br /&gt;
 &amp;quot;accountName&amp;quot;: {accountName},&lt;br /&gt;
 &amp;quot;bankName&amp;quot;: {bankName},&lt;br /&gt;
 &amp;quot;bankCity&amp;quot;: {bankCity},&lt;br /&gt;
 &amp;quot;bankCountry&amp;quot;: {bankCountry}&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
;paymentInfoType - ''string''&lt;br /&gt;
: ''Required.'' Type of the payment method. Allowed values are '''credit_card''' and '''direct_debit'''.&lt;br /&gt;
&lt;br /&gt;
;accountNumber - ''string''&lt;br /&gt;
: ''Required.'' Payment account number. This the credit card number or the bank account number.&lt;br /&gt;
&lt;br /&gt;
;cardHolderName - ''string''&lt;br /&gt;
: ''Required.(For credit cards only)'' Name of the card holder. Generally, it is the name that appears on the CC.&lt;br /&gt;
 &lt;br /&gt;
;expirationDate - ''string''&lt;br /&gt;
: ''Required.(For credit cards only)'' Expiration date of the credit card. Should be in the '''yyyy-m''' format.&lt;br /&gt;
&lt;br /&gt;
;verificationNumber - ''string''&lt;br /&gt;
: ''Required.(For credit cards only)'' The CVV number (Card Verification Value) of the credit card.&lt;br /&gt;
&lt;br /&gt;
; billingAddress - ''dictionary''&lt;br /&gt;
: ''Required.(For credit cards only)'' The billing address of the credit card. It's important that the address provided matches the one with which the credit card was registered as the card will be validated through an AVS (Address Verification Service)&lt;br /&gt;
::; street1 - ''string''&lt;br /&gt;
::: ''Required.'' The address line 1 of the billing address.&lt;br /&gt;
::; street2 - ''string''&lt;br /&gt;
::: ''Optional.'' The address line 2 of the billing address.&lt;br /&gt;
::; city - ''string''&lt;br /&gt;
::: ''Required.'' The city of the billing address.&lt;br /&gt;
::; stateOrProvince - ''string''&lt;br /&gt;
::: ''Optional.'' The state Or province of the billing address.&lt;br /&gt;
::; postalCode - ''string''&lt;br /&gt;
::: ''Optional.'' The postal code of the billing address.&lt;br /&gt;
::; countryCode - ''string''&lt;br /&gt;
::: ''Optional.'' The country code of the billing address.&lt;br /&gt;
&lt;br /&gt;
; routingNumber - ''string''&lt;br /&gt;
: ''Required.(For direct debit only)''. The bank routing number.&lt;br /&gt;
&lt;br /&gt;
; accountOwner - ''string''&lt;br /&gt;
: ''Optional.(For direct debit only)''. Name as it Appears on the Check.&lt;br /&gt;
&lt;br /&gt;
; accountName - ''string''&lt;br /&gt;
: ''Optional.(For direct debit only)''. Name for the account.&lt;br /&gt;
&lt;br /&gt;
; bankName - ''string''&lt;br /&gt;
: ''Optional.(For direct debit only)''. The bank name.&lt;br /&gt;
&lt;br /&gt;
; bankCity - ''string''&lt;br /&gt;
: ''Optional.(For direct debit only)''. The bank city.&lt;br /&gt;
&lt;br /&gt;
; bankCountry - ''string''&lt;br /&gt;
: ''Optional.(For direct debit only)''. The bank country.&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
&lt;br /&gt;
=== Status Code ===&lt;br /&gt;
;201 Created&lt;br /&gt;
: The payment information was successfully created&lt;br /&gt;
&lt;br /&gt;
;400 Bad Request&lt;br /&gt;
: The request body was missing a required field or one of the fields did not comply with the requirements (in this case, the response body will contain hints for what went wrong)&lt;br /&gt;
&lt;br /&gt;
;401 Unauthorized&lt;br /&gt;
: Authentication failed&lt;br /&gt;
&lt;br /&gt;
;403 Forbidden&lt;br /&gt;
: Authentication succeeded, but the logged-in user is not allowed to create users in this account. The only users allowed to create users in this account are sales agents and account owners of ''this'' account. An account owner is any account user with the &amp;quot;sitecontrol_account_owner&amp;quot; role.&lt;br /&gt;
&lt;br /&gt;
;404 Not Found&lt;br /&gt;
: The account does not exist&lt;br /&gt;
&lt;br /&gt;
;409 Conflict&lt;br /&gt;
: The payment information cannot be created because another payment account with the same information already exists for this user. '''OR'''&lt;br /&gt;
: The credit card information has been rejected. Some reasons for CC validation failures are:&lt;br /&gt;
:: - Invalid or expired credit card;&lt;br /&gt;
:: - Invalid CVV number;&lt;br /&gt;
:: - Invalid credit card billing address;&lt;br /&gt;
:: - Black-listed credit card&lt;br /&gt;
&lt;br /&gt;
=== Response Headers ===&lt;br /&gt;
;Location&lt;br /&gt;
: The URI for the newly created payment information&lt;br /&gt;
&lt;br /&gt;
=== Response Body ===&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Add an credit card payment info ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
POST http://&amp;lt;serverName&amp;gt;/accounts/&amp;lt;accountId&amp;gt;/paymentInfo&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;paymentInfoType&amp;quot;: &amp;quot;credit_card&amp;quot;,&lt;br /&gt;
 &amp;quot;accountNumber&amp;quot;: &amp;quot;111111111111111111&amp;quot;,&lt;br /&gt;
 &amp;quot;cardHolderName&amp;quot;: &amp;quot;John Smith&amp;quot;,&lt;br /&gt;
 &amp;quot;verificationNumber&amp;quot;: &amp;quot;555&amp;quot;,&lt;br /&gt;
 &amp;quot;creditCardType&amp;quot;: &amp;quot;amex&amp;quot;,&lt;br /&gt;
 &amp;quot;expirationDate&amp;quot;: &amp;quot;2015-06&amp;quot;,&lt;br /&gt;
 &amp;quot;billingAddress&amp;quot;: {&lt;br /&gt;
    &amp;quot;street1&amp;quot;: &amp;quot;Address Line 1&amp;quot;,&lt;br /&gt;
    &amp;quot;street2&amp;quot;: &amp;quot;Address Line 2&amp;quot;,&lt;br /&gt;
    &amp;quot;countryCode&amp;quot;: &amp;quot;US&amp;quot;,&lt;br /&gt;
    &amp;quot;city&amp;quot;: &amp;quot;Chicago&amp;quot;,&lt;br /&gt;
    &amp;quot;postalCode&amp;quot;: &amp;quot;60606&amp;quot;,&lt;br /&gt;
    &amp;quot;stateOrProvince&amp;quot;: &amp;quot;IL&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response headers&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Location    http://&amp;lt;serverName&amp;gt;/accounts/&amp;lt;accountId&amp;gt;/paymentInfo/cc-&amp;lt;newly_created_id&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add a direct debit payment info ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
POST http://&amp;lt;serverName&amp;gt;/accounts/&amp;lt;accountId&amp;gt;/paymentInfo&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;paymentInfoType&amp;quot;: &amp;quot;direct_debit&amp;quot;,&lt;br /&gt;
 &amp;quot;routingNumber&amp;quot;: &amp;quot;123456789&amp;quot;,&lt;br /&gt;
 &amp;quot;accountNumber&amp;quot;: &amp;quot;1234&amp;quot;,&lt;br /&gt;
 &amp;quot;accountName&amp;quot;: &amp;quot;My Account Name&amp;quot;,&lt;br /&gt;
 &amp;quot;accountOwner&amp;quot;: &amp;quot;John Smith&amp;quot;,&lt;br /&gt;
 &amp;quot;bankName&amp;quot;: &amp;quot;My Bank&amp;quot;,&lt;br /&gt;
 &amp;quot;bankCity&amp;quot;: &amp;quot;Chicago&amp;quot;,&lt;br /&gt;
 &amp;quot;bankCountry&amp;quot;: &amp;quot;US&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response headers&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Location    http://&amp;lt;serverName&amp;gt;/accounts/&amp;lt;accountId&amp;gt;/paymentInfo/dd-&amp;lt;newly_created_id&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Account|Account Management API]]&lt;br /&gt;
* [[Common Features]]&lt;br /&gt;
&lt;br /&gt;
{{disqus}}&lt;br /&gt;
[[Category:Hostway API]]&lt;br /&gt;
[[Category:Account Management API]]&lt;/div&gt;</summary>
		<author><name>Dinh.anh</name></author>	</entry>

	</feed>