PaymentMethod

The PaymentMethod object contains card details and is used in the following methods:

It supports both new cards (where the raw card number and details are provided) or existing cards (where a Fat Zebra card token is provided).

Pay with a new card

AttributeTypeDescription
typestringSpecify the following value: card
data.numberstringCard number
data.holderstringCard holder name
data.expiryMonthstringExpiry month
2 characters long
Padded with a leading zero, e.g. 01 for January
data.expiryYearstringExpiry year
4 characters long
cvvstringCVV or CVC value on the card
3 or 4 digits depending on the card scheme
{
  type: "card",
  data: {
    number: "4005550000000001",
    holder: "John Doe",
    expiryMonth: "03",
    expiryYear: "2022",
    cvv: "123"
  }
}

Pay with an existing card (card on file)

AttributeTypeDescription
typestringSpecify the following value: card_on_file
data.tokenstringCard token.
See here for more details on how to tokenize a card.
{
  type: "card_on_file",
  data: {
    token: "fke8jmra"
  }
}