Orders-orderId-account-paymentInfo:PUT

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
= PUT /orders/''{orderId}''/account/paymentInfo =
 
= PUT /orders/''{orderId}''/account/paymentInfo =
Set the account's payment information for a given order. '''Note: currently only credit cards are supported'''
+
Set the account's payment information for a given order.
 
__TOC__
 
__TOC__
  
Line 39: Line 39:
 
     "street2": ""
 
     "street2": ""
 
   }
 
   }
 +
}
 +
</nowiki>
 +
 +
The following format is for Verizon orders.
 +
<nowiki>
 +
{
 +
  "paymentInfoType": "vz_payment",
 +
  "paymentReference": "123432429034",
 +
  "sessionId": "23432434244",
 
}
 
}
 
  </nowiki>
 
  </nowiki>
Line 46: Line 55:
 
: The type of payment method that will be used.  Allowed value(s) are:
 
: The type of payment method that will be used.  Allowed value(s) are:
 
:: '''credit_card'''
 
:: '''credit_card'''
 +
:: '''vz_payment'''
  
 
; accountNumber - ''string''
 
; accountNumber - ''string''
: Credit card number. Required if paymentInfoType is set to '''credit_card'''.
+
: Credit card number. Must consist of numbers only. Required if paymentInfoType is set to '''credit_card'''.
  
 
; cardHolderName - ''string''
 
; cardHolderName - ''string''
Line 54: Line 64:
  
 
; creditCardType - ''string''
 
; creditCardType - ''string''
: The type of credit card i.e. '''visa''', '''mastercard''', '''discover''', etc. Required if paymentInfoType is set to '''credit_card'''.
+
: 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''
 
; expirationDate - ''string''
: The credit card expiration date in YYYY-MM format. Required if paymentInfoType is set to '''credit_card'''.
+
: The credit card expiration date in YYYY-MM format. Should exceed the current date. Required if paymentInfoType is set to '''credit_card'''.
  
 
; verificationNumber - ''string''
 
; verificationNumber - ''string''
Line 64: Line 74:
 
; billingAddress - ''dictionary''
 
; billingAddress - ''dictionary''
 
: Contains the credit card's billing address. Required if paymentInfoType is set to '''credit_card'''.
 
: 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 ==
 
== Response ==

Revision as of 08:20, 24 September 2013

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