A Credit Card is a representation of a payment method. They exist independently of transactions, but they are required to be associated with a transaction when a transaction is created.
Credit Card and CVV numbers are never stored
PaidYET performs a tokenization on each credit card that is received through the API. This means that the original card number will never be retrievable after it is tokenized. CVV numbers are never tokenized and never stored.
Properties
Property | Type | Description | Example |
---|---|---|---|
id | Number (integer) | A read-only unique identifier. | 1234567890 |
external_id | String | Unique identifier used to look up customer. This is not generated by PaidYET. | "1234567890" |
type | String | Visa, MasterCard, etc. | "MasterCard" |
name | String | Name on the card. | "Firstname M Lastname" |
email | String (email format) | Email address associated with the card. | "[email protected]" |
description | String | A description about the card. | "This is an example card." |
billing_address | Object (Address object) | The billing address for the card. | See Address Example |
cvv | Number (integer) | CVV (not saved, not returned) | 000 |
funding | String | "credit" , "debit" , "prepaid" , "charge" , or "deferred debit" | "credit" |
product_segment | String | "consumer" , "business" , "commercial" , "government" , "all" , or "other" | "all" |
product_name | String | Type of card. | "Visa Classic" |
issuing_country | String | Country code of account. | "US" |
issuer | String | Name of the issuer. | "Visa" |
custom_fields | Array (of Custom Field objects) | Custom Fields associated with the Transaction. | See Custom Field Example |
token * | String | The token representing a provided card's number and exp . Generated by PaidYET. | "abcd1234" |
number ** | String | The card number. | "4111111111111111" |
exp ** | String (MM/YY) | Date in the format 'MM/YY'. | "01/23" |
bin | Number (6 or 8 digit integer) | Bank Identification Number. | 516693 |
last4 | String (XXXXXXXXXXXXNNNN) | The last for digits of the card number (NNNN) with all preceding digits redacted with an 'X' character. | "XXXXXXXXXXXX1234" |
Requirements
*Required when creating a Transaction without specifying the credit card's number
or exp
.
**Required when creating a new Card. Required when creating a Transaction without specifying the credit card's token
.
Examples
Non-Tokenized
This example Credit Card shows all possible properties of a non-tokenized credit card.
{
"id": 1234567890,
"external_id": "1234567890",
"type": "MasterCard",
"name": "Firstname M Lastname",
"email": "[email protected]",
"description": "This is an example card.",
"billing_address": {
"id": 1234567890,
"address": "1234 Test Street S.",
"city": "Test City",
"state": "CA",
"postal": 50001
},
"cvv": 0,
"funding": "credit",
"product_segment": "all",
"product_name": "Visa Classic",
"issuing_country": "US",
"issuer": "Visa",
"custom_fields": [
{
"id": 1234567890,
"key": "shoesize",
"value": "9"
}
],
"number": "4111111111111111",
"exp": "01/23",
"bin": 516693,
"last4": "XXXXXXXXXXXX1111"
}
Tokenized
This example Credit Card shows all possible properties of a tokenized credit card. A non-tokenized card would have the number
and exp
properties instead of the token
property.
{
"id": 1234567890,
"external_id": "1234567890",
"type": "MasterCard",
"name": "Firstname M Lastname",
"email": "[email protected]",
"description": "This is an example card.",
"billing_address": {
"id": 1234567890,
"address": "1234 Test Street S.",
"city": "Test City",
"state": "CA",
"postal": 50001
},
"cvv": 0,
"funding": "credit",
"product_segment": "all",
"product_name": "Visa Classic",
"issuing_country": "US",
"issuer": "Visa",
"custom_fields": [
{
"id": 1234567890,
"key": "shoesize",
"value": "9"
}
],
"token": "abcd1234",
"bin": 516693,
"last4": "XXXXXXXXXXXX1111"
}