POST v1/Generic/LastUsedSavedCard

Get saved card list for a customer from Midnight based on CustomerID

Request Information

URI Parameters

None.

Body Parameters

LastUsedSavedCardRequest

LastUsedSavedCardRequest
NameDescriptionTypeAdditional information
ObjectType

Provide ObjectType

string

None.

ObjectNumber

Provide ObjectNumber

string

None.

Request Formats

application/json, text/json

Sample:
{
  "ObjectType": "sample string 1",
  "ObjectNumber": "sample string 2"
}

application/xml, text/xml

Sample:
<LastUsedSavedCardRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ObjectType>sample string 1</ObjectType>
  <ObjectNumber>sample string 2</ObjectNumber>
</LastUsedSavedCardRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'LastUsedSavedCardRequest'.

Response Information

Resource Description

Collection of LastUsedSavedCardResponse
NameDescriptionTypeAdditional information
TokenID

Provide TokenID

integer

None.

CustomerId

Provide CustomerId

integer

None.

Token

Provide Token

string

None.

Name

Provide Name

string

None.

CardType

Provide CardType

string

None.

CardNumber

Provide CardNumber

string

None.

Expiry

Provide Expiry

string

None.

ExpiryMonth

Provide ExpiryMonth

string

None.

ACH

Provide ACH = 1 in case of ACH and 0 in case of Card

integer

None.

Default

Is this the default payment for customer and payment method?

boolean

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "TokenID": 1,
    "CustomerId": 2,
    "Token": "sample string 3",
    "Name": "sample string 4",
    "CardType": "sample string 5",
    "CardNumber": "sample string 6",
    "Expiry": "sample string 7",
    "ExpiryMonth": "sample string 8",
    "ACH": 9,
    "Default": true
  },
  {
    "TokenID": 1,
    "CustomerId": 2,
    "Token": "sample string 3",
    "Name": "sample string 4",
    "CardType": "sample string 5",
    "CardNumber": "sample string 6",
    "Expiry": "sample string 7",
    "ExpiryMonth": "sample string 8",
    "ACH": 9,
    "Default": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfLastUsedSavedCardResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <LastUsedSavedCardResponse>
    <TokenID>1</TokenID>
    <CustomerId>2</CustomerId>
    <Token>sample string 3</Token>
    <Name>sample string 4</Name>
    <CardType>sample string 5</CardType>
    <CardNumber>sample string 6</CardNumber>
    <Expiry>sample string 7</Expiry>
    <ExpiryMonth>sample string 8</ExpiryMonth>
    <ACH>9</ACH>
    <Default>true</Default>
  </LastUsedSavedCardResponse>
  <LastUsedSavedCardResponse>
    <TokenID>1</TokenID>
    <CustomerId>2</CustomerId>
    <Token>sample string 3</Token>
    <Name>sample string 4</Name>
    <CardType>sample string 5</CardType>
    <CardNumber>sample string 6</CardNumber>
    <Expiry>sample string 7</Expiry>
    <ExpiryMonth>sample string 8</ExpiryMonth>
    <ACH>9</ACH>
    <Default>true</Default>
  </LastUsedSavedCardResponse>
</ArrayOfLastUsedSavedCardResponse>