Accounts-accountId-paymentInfo:GET
From Hostway API Documentation
				
								
				Revision as of 12:20, 8 April 2014 by Mike.robski  (Talk | contribs)
				
			GET /accounts/{accountId}/paymentInfo
Retrieves a list of all active payment methods.
| Contents | 
Request
GET /accounts/{accountId}/paymentInfo
Parameters
- accountId - string
- The Id of the account.
URI Parameters
None.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success
- 403 Forbidden
- The user lacks the necessary permissions to access the resource
- 404 Not Found
- The account Id was not found.
Response Body
{
  "list": [{
    "paymentInfoType": "direct_debit",
    "routingNumber": "564738291",
    "links": [{"href": "https://api.hostway.com/accounts/{accountId}/paymentInfo/dd-100062441", "rel": "self"}],
    "accountNumber": "XXXXXXXXXXXX2332",
    "default": 0
  }, {
    "links": [{"href": "https://api.hostway.com/accounts/{accountId}/paymentInfo/cc-100069155", "rel": "self"}], 
    "paymentInfoType": "credit_card",
    "creditCardType": "visa",
    "accountNumber": "XXXXXXXXXXXX1111",
    "expirationDate": "2017-04",
    "default": 1
  }],
  "default": [{"href": "https://api.hostway.com/accounts/{accountId}/paymentInfo/default/", "rel": "related"}],
  "links": [
    {"href": "https://api.hostway.com/accounts/{accountId}/paymentInfo/", "rel": "self"}
  ]
}
 
Parameters
- list - list
- A collection of dictionaries containing information about specific products
- paymentInfoType- string
- Describes whether the type of the payment method. Valid values are direct_debit or credit_card
 
- default - integer
- Whether the payment method is the default. Allowed values are 0 and 1
 
- accountNumber - integer
- Available for direct debit and credit card. Contains the masked account number or the masked number of the credit card associated with the payment method
 
- routingNumber - string
- (OPTIONAL)
- Only available for direct debit. Contains the routing number of the payment method
 
- creditCardType - string
- (OPTIONAL)
- Only available for credit card. Describes the type of the card
 
- expirationDate - string
- (OPTIONAL)
- Only available for credit card. Contains the expiration date of the card
 
- links - list
- Hypermedia for the individual payment method
 
- links - list
- Hypermedia for this resource. Links to self
See also
