Orders-orderId-account-paymentInfo:PUT

From Hostway API Documentation
Revision as of 16:31, 27 September 2013 by Mike.robski (Talk | contribs)
Jump to: navigation, search

PUT /orders/{orderId}/account/paymentInfo

Set the account's payment information for a given order.

Contents


Request

PUT /orders/{orderId}/account/paymentInfo

Request Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.
contact_type - string
Contact Type (regular, billing, administrator or technical)

URI Parameters

None.

Request Headers

Content-Type
Required. Set this header to application/json; charset=UTF-8
Cookie
A cookie named OwnerId to identify the client (for most browser clients, the browser will do this automatically, depending on the browser configuration). The value of the cookie would come from the response to the create order request in the Set-Cookie response header.

Request Body

The request format depends on the type of payment method that is added. The following format is required for credit cards.

{
  "paymentInfoType": "credit_card",
  "accountNumber": "4111111111111111",
  "cardHolderName": "John Smith",
  "creditCardType": "visa",
  "expirationDate": "2012-08",
  "verificationNumber": "123",
  "billingAddress": {
    "city": "Chicago",
    "countryCode": "US",
    "postalCode": "60606",
    "stateOrProvince": "IL",
    "street1": "100 N Riverside",
    "street2": ""
  }
}
 

The following format is for Verizon orders.

{
  "paymentInfoType": "vz_payment",
  "paymentReference": "123432429034",
  "sessionId": "23432434244",
}
 

Parameters

paymentInfoType - string
The type of payment method that will be used. Allowed value(s) are:
credit_card
vz_payment
accountNumber - string
Credit card number. Must consist of numbers only. Required if paymentInfoType is set to credit_card.
cardHolderName - string
The owner name as it appears on the card. Required if paymentInfoType is set to credit_card.
creditCardType - string
The type of credit card - visa, mastercard, discover, amex, discover, switch, solo, delta, korean, jcb. Required if paymentInfoType is set to credit_card.
expirationDate - string
The credit card expiration date in YYYY-MM format. Should exceed the current date. Required if paymentInfoType is set to credit_card.
verificationNumber - string
The credit card security code. This is only used to validate the credit card and will not be stored. Required if paymentInfoType is set to credit_card.
billingAddress - dictionary
Contains the credit card's billing address. Required if paymentInfoType is set to credit_card.
paymentReference - string
Contains Verizon payment reference id. Required if paymentInfoType is set to vz_payment.
sessionId - string
Contains Verizon payment session id. Required if paymentInfoType is set to vz_payment.

Response

Status Code

204 No Content
The operation was successfully completed.
400 Bad Request
The request body contains invalid JSON or the values do not adhere to the restrictions set for them.
404 Not Found
An account has not been added to the given order or the order does not exist.

Response Body

None.

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox