Accounts-accountId-paymentInfo-paymentInfoId-payment:POST

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
 
m (1 revision: Release 93)
 

Latest revision as of 02:34, 8 May 2014

[edit] POST /accounts/{accountId}/paymentInfo/{paymentInfoId}/payment

Make a one-time payment toward the account balance. First, a "pending" payment transaction will be created, and the payment amount will be reflected in the effective balance but not in the actual balance. After the payment has been processed (asynchronously), the payment status will change to "active" and the payment amount will be reflected in the actual balance as well.

Contents


[edit] Request

POST /accounts/{accountId}/paymentInfo/{paymentInfoId}/payment

[edit] Request Parameters

accountId
The ID of the account
paymentInfoId
The ID of the payment method

[edit] URI Parameters

None

[edit] Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

[edit] Request Body

{
 "amount": {paymentAmount}
}
 

[edit] Parameters

paymentAmount - decimal
The amount of payment in the account's currency. Must be greater than zero.

[edit] Response

[edit] Status Code

204 No Content
The payment was successfully submitted
400 Bad Request
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)
401 Unauthorized
Authentication failed
403 Forbidden
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 "sitecontrol_account_owner" role.
404 Not Found
The account or the payment method does not exist
409 Conflict
The payment cannot be submitted due to irregularities with the payment method. For example, this may happen if the credit card is expired, has reached its credit limit or is declined by the payment provider.

[edit] Response Headers

None

[edit] Response Body

None

[edit] Examples

[edit] Make a payment

POST https://api.hostway.com/accounts/smith123456/paymentInfo/cc-100075384/payment

{
  "amount": 100.00
}
 

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox