Deprecated API Reference

This API Reference is being deprecated. Please use the New API Reference.

Create a Payment Card

attention

Creating cards directly using the Finix API should only be done for testing purposes. You must use the Tokenization Hosted Fields or JavaScript client to remain out of PCI scope.

Copy
Copied
curl https://finix.sandbox-payments-api.com/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -H 'Finix-Version:2022-02-01' \
    -u  USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
    -d '
	{
	    "name": "John Smith",
	    "expiration_year": 2029,
	    "tags": {
	        "card_name": "Business Card"
	    },
	    "number": "5200828282828210",
	    "expiration_month": 12,
	    "address": {
	        "city": "San Francisco",
	        "region": "CA",
	        "postal_code": "94404",
	        "line1": "900 Metro Center Blv",
	        "country": "USA"
	    },
	    "security_code": "022",
	    "type": "PAYMENT_CARD",
	    "identity": "IDgWxBhfGYLLdkhxx2ddYf9K"
	}'

HTTP Request

POST https://finix.sandbox-payments-api.com/payment_instruments

Request Arguments

Field Type Description
address object, required Billing address (Full description of child attributes below).
Note: Including a postal or zip code when tokenizing a card can lower the interchange on credit card transactions.
expiration_month integer, required Expiration month (e.g. 12 for December).
expiration_year integer, required 4-digit expiration year.
identity string, required ID of the Identity that the card should be associated.
name string, required Full name of the registered card holder.
number string, required Primary account number (no dashes in between numbers).
type string, required
  • Type of Payment Instrument.
  • Available values include:
    • PAYMENT_CARD
    • APPLE_PAY
    • GOOGLE_PAY
security_code string, required The 3-4 digit security code for the card (i.e. CVV code).
third_party_token string, optional Stringified token provided by Apple or Google. Required if using Apple or Google Pay.

Address-object Request Arguments

Field Type Description
city string, optional City (max 20 characters)
country string, optional 3-Letter Country code
line1 string, optional First line of the address (max 35 characters)
line2 string, optional Second line of the address (max 35 characters)
postal_code string, required Zip or Postal code (max 7 characters)
region string, optional 2-letter State code

Example Response:

Copy
Copied
{
  "id" : "PIgHFzzdUGYi2iaiMhGVZffq",
  "application" : "APgPDQrLD52TYvqazjHJJchM",
  "fingerprint" : "FPRiCenDk2SoRng7WjQTr7RJY",
  "tags" : {
    "card_name" : "Business Card"
  },
  "expiration_month" : 12,
  "expiration_year" : 2029,
  "bin" : "520082",
  "last_four" : "8210",
  "brand" : "MASTERCARD",
  "card_type" : "DEBIT",
  "name" : "John Smith",
  "address" : {
    "line1" : "900 Metro Center Blv",
    "line2" : null,
    "city" : "San Francisco",
    "region" : "CA",
    "postal_code" : "94404",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "issuer_country": "USA",
  "created_at" : "2022-07-22T02:36:56.75Z",
  "updated_at" : "2022-07-22T02:36:56.75Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "enabled" : true,
  "identity" : "IDgWxBhfGYLLdkhxx2ddYf9K",
  "_links" : {
    "self" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIgHFzzdUGYi2iaiMhGVZffq"
    },
    "authorizations" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIgHFzzdUGYi2iaiMhGVZffq/authorizations"
    },
    "transfers" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIgHFzzdUGYi2iaiMhGVZffq/transfers"
    },
    "verifications" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIgHFzzdUGYi2iaiMhGVZffq/verifications"
    },
    "application" : {
      "href" : "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
    },
    "identity" : {
      "href" : "https://finix.sandbox-payments-api.com/identities/IDgWxBhfGYLLdkhxx2ddYf9K"
    },
    "updates" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIgHFzzdUGYi2iaiMhGVZffq/updates"
    }
  }
}

The type of card that gets saved is detailed in card_type. Available values for Payment Instruments with type PAYMENT_CARD include:

  • CREDIT
  • DEBIT
  • HSA_FSA
  • NON_RELOADABLE_PREPAID
  • RELOADABLE_PREPAID
  • UNKNOWN