Associate a Token

attention

This API is available for Finix Flex and Finix Core customers.

Associate the newly tokenized payment card or bank account with the Payment Instrument owner's Identity.

warning

Tokens should be associated immediately. Tokens not associated within 30 minutes of creation will be invalidated.

Copy
Copied
curl https://finix.sandbox-payments-api.com/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
    -d '
	{
	    "token": "TKiMxe323RE5Dq3wLVtG8kSW",
	    "type": "TOKEN",
	    "identity": "IDpYDM7J9n57q849o9E9yNrG"
	}'

Example Response:

Copy
Copied
{
  "id" : "PIs4ZXrQB1RjbYJSgkfbcrbM",
  "application" : "APgPDQrLD52TYvqazjHJJchM",
  "fingerprint" : "FPRw9NoorETQgCjFgwKPvcGsV",
  "tags" : { },
  "expiration_month" : 12,
  "expiration_year" : 2029,
  "bin" : "495703",
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : null,
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2022-01-27T07:37:27.42Z",
  "updated_at" : "2022-01-27T07:37:27.42Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "IDpYDM7J9n57q849o9E9yNrG",
  "_links" : {
    "self" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIs4ZXrQB1RjbYJSgkfbcrbM"
    },
    "authorizations" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIs4ZXrQB1RjbYJSgkfbcrbM/authorizations"
    },
    "transfers" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIs4ZXrQB1RjbYJSgkfbcrbM/transfers"
    },
    "verifications" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIs4ZXrQB1RjbYJSgkfbcrbM/verifications"
    },
    "application" : {
      "href" : "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
    },
    "identity" : {
      "href" : "https://finix.sandbox-payments-api.com/identities/IDpYDM7J9n57q849o9E9yNrG"
    },
    "updates" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIs4ZXrQB1RjbYJSgkfbcrbM/updates"
    }
  }
}

HTTP Request

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

Request Arguments

Field Type Description
identity string, required ID for the Identity resource which the account is to be associated
token string, required ID for the Token that was returned via the tokenization client or hosted iframe
type string, required Must pass TOKEN as the value