Accounts-accountId-paymentInfo-paymentInfoId:GET
From Hostway API Documentation
(Difference between revisions)
(→Response Body) |
Mike.robski (Talk | contribs) m (1 revision: Release 92) |
Latest revision as of 11:20, 8 April 2014
GET /accounts/{accountId}/paymentInfo/{paymentInfoId}
Retrieves an individual active payment method.
Contents |
Request
GET /accounts/{accountId}/paymentInfo/{paymentInfoId}
Parameters
- accountId - string
- The Id of the account.
- paymentInfoId - string
- The Id of the payment method.
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 or payment info was not found
Response Body
{ "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 }
Parameters
- paymentType - 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 this resource. Links to self
See also