BillingPlans: getCreditCard

Request

HTTP request

GET /v2.1/accounts/{accountId}/billing_plan/credit_card

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

Responses

CodeDescriptionReference
200

Successful response.

creditCardInformation
400

Error encountered.

errorDetails

SDK Method

Billing::getCreditCardInfo

Definitions

addressInformation

Contains address information.

address1string

The first line of the user's address. Maximum length: 100 characters.

address2string

The second line of the user's address. Maximum length: 100 characters.

citystring

The user's city.

countrystring

The user's country.

faxstring

A fax number associated with the address, if one is available.

phonestring

A phone number associated with the address.

postalCodestring

The user's postal code.

stateOrProvincestring

The user's state or province.

creditCardInformation

addressaddressInformation

A complex element containing the credit card billing address information.

This can be the same as billing address and follows the same rules as billingAddress. It contains the following elements: street1, street2, city, state, zip, zipPlus4, phone, fax, and country.

cardNumberstring

The number on the credit card.

cardTypestring

The credit card type. Valid values are: visa, mastercard, or amex.

cvNumberstring

expirationMonthstring

The month that the credit card expires (1-12).

expirationYearstring

The year 4 digit year in which the credit card expires.

nameOnCardstring

The exact name printed on the credit card.

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCodestring

A code associated with the error condition.

messagestring

A brief message describing the error condition.

Examples

Generic JSON Response

Response
{
  "cardNumber": "sample string 1",
  "expirationMonth": "sample string 2",
  "expirationYear": "sample string 3",
  "nameOnCard": "sample string 4",
  "cardType": "sample string 5",
  "address": {
    "street1": "sample string 1",
    "street2": "sample string 2",
    "city": "sample string 3",
    "state": "sample string 4",
    "zip": "sample string 5",
    "phone": "sample string 6",
    "fax": "sample string 7",
    "country": "sample string 8"
  }
}
Generic XML Response

Response
<creditCardInformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <address>
    <city>sample string 3</city>
    <country>sample string 8</country>
    <fax>sample string 7</fax>
    <phone>sample string 6</phone>
    <state>sample string 4</state>
    <street1>sample string 1</street1>
    <street2>sample string 2</street2>
    <zip>sample string 5</zip>
  </address>
  <cardNumber>sample string 1</cardNumber>
  <cardType>sample string 5</cardType>
  <expirationMonth>sample string 2</expirationMonth>
  <expirationYear>sample string 3</expirationYear>
  <nameOnCard>sample string 4</nameOnCard>
</creditCardInformation> 
}} />