BillingPlans: getCreditCard

Request

HTTP request

GET /v2/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.

citystring

The city associated with the address.

countrystring

Specifies the country associated with the address.

faxstring

A Fax number associated with the address if one is available.

phonestring

A phone number associated with the address.

statestring

The state or province associated with the address.

street1string

The first line of the address.

street2string

The second line of the address (optional).

zipstring

The zip or postal code associated with the address.

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.

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

An error code associated with the error.

messagestring

A short error message.

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> 
}} />