BillingPlans: getCreditCard

This method returns information about a credit card associated with an account.

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

This object contains information about a credit card that is associated with an account.

addressaddressInformation

A complex element containing the credit card billing address information.

cardNumberstring

The credit card number.

cardTypestring

The type of credit card. Valid values are:

  • visa
  • mastercard
  • amex

cvNumberstring

The 3 or 4-digit card verification value (CVV) number associated with the credit card. CVV numbers are also referred to as card security codes (CSCs).

expirationMonthstring

The month that the credit card expires, expressed as a number from 1 to 12.

expirationYearstring

The year in which the credit card expires, in 4-digit format.

nameOnCardstring

The exact name as it appears on the credit card.

errorDetails

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

errorCodestring

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