Accounts-accountId-paymentInfo:GET
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 91) |
Mike.robski (Talk | contribs) m (1 revision: Release 92) |
||
(One intermediate revision by one user not shown) | |||
Line 20: | Line 20: | ||
;200 OK | ;200 OK | ||
: Success | : Success | ||
+ | |||
+ | ;403 Forbidden | ||
+ | : The user lacks the necessary permissions to access the resource | ||
;404 Not Found | ;404 Not Found | ||
: The account Id was not found. | : The account Id was not found. | ||
− | |||
− | |||
− | |||
=== Response Body === | === Response Body === | ||
Line 31: | Line 31: | ||
{ | { | ||
"list": [{ | "list": [{ | ||
− | " | + | "paymentInfoType": "direct_debit", |
"routingNumber": "564738291", | "routingNumber": "564738291", | ||
"links": [{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/dd-100062441", "rel": "self"}], | "links": [{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/dd-100062441", "rel": "self"}], | ||
− | "accountNumber": "XXXXXXXXXXXX2332" | + | "accountNumber": "XXXXXXXXXXXX2332", |
+ | "default": 0 | ||
}, { | }, { | ||
"links": [{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/cc-100069155", "rel": "self"}], | "links": [{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/cc-100069155", "rel": "self"}], | ||
− | " | + | "paymentInfoType": "credit_card", |
− | " | + | "creditCardType": "visa", |
− | " | + | "accountNumber": "XXXXXXXXXXXX1111", |
− | "expirationDate": "2017-04" | + | "expirationDate": "2017-04", |
+ | "default": 1 | ||
}], | }], | ||
+ | "default": [{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/default/", "rel": "related"}], | ||
"links": [ | "links": [ | ||
{"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/", "rel": "self"} | {"href": "</nowiki>{{APIBaseURL}}<nowiki>/accounts/{accountId}/paymentInfo/", "rel": "self"} | ||
Line 52: | Line 55: | ||
: A collection of dictionaries containing information about specific products | : A collection of dictionaries containing information about specific products | ||
− | :; | + | :; paymentInfoType- ''string'' |
− | :: Describes whether the type of the payment method. Valid values are ''' | + | :: 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'' | :; routingNumber - ''string'' | ||
Line 59: | Line 68: | ||
:: Only available for direct debit. Contains the routing number of the payment method | :: Only available for direct debit. Contains the routing number of the payment method | ||
− | :; | + | :; creditCardType - ''string'' |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
:: ''(OPTIONAL)'' | :: ''(OPTIONAL)'' | ||
:: Only available for credit card. Describes the type of the card | :: Only available for credit card. Describes the type of the card | ||
− | |||
− | |||
− | |||
− | |||
:; expirationDate - ''string'' | :; expirationDate - ''string'' |
Latest revision as of 11:20, 8 April 2014
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