# Tokenize a Payment Account Data Creates a secure token for various payment data account including ACH Bank Account, Credit Card, and Apple Pay. Endpoint: POST /token-service/tokens Version: 0.0.8 Security: bearerAuth ## Request fields (application/json): - `paymentType` (object, required) Payment account type. - `paymentType.ach` (object) ACH payment account details. - `paymentType.ach.bankAccount` (object, required) Bank account details - `paymentType.ach.bankAccount.accountNumber` (string, required) The bank account number. Example: "459887746321Z" - `paymentType.ach.bankAccount.routingNumber` (string, required) The bank routing number. Example: "123456789" - `paymentType.ach.bankAccount.accountType` (string, required) The type of bank account. Enum: "Savings", "Checking" - `paymentType.ach.bankAccount.tenderType` (string) The bank tender type. Enum: "Consumer", "Commercial" - `paymentType.creditCard` (object) Credit card payment account details. - `paymentType.creditCard.card` (object, required) The credit card information. - `paymentType.creditCard.card.cardNumber` (string, required) The credit card number. Example: "4111111111111122" - `paymentType.creditCard.card.expiration` (string, required) The card expiration date with a two-digit month and two-digit year. Example: "0329" - `paymentType.creditCard.card.cardVerificationValue` (string) The three- or four-digit security code printed on the credit card. Example: "123" - `paymentType.applePay` (object) Apple Pay payment account details. - `paymentType.applePay.encryptedPaymentData` (object) Encrypted payment data fields returned by Apple - `paymentType.applePay.encryptedPaymentData.data` (string, required) Encrypted payment data Example: "6b2xlM8Lh/dSF+9jBqel7A6sdh6B2NJjp6wLbt/EIijjkKAh+9ynMlS4=" - `paymentType.applePay.encryptedPaymentData.ephemeralPublicKey` (string, required) Ephermal public key bytes Example: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcHx3LJUWiPhwscjvmoJ694bSNITEwGBtVWdzcuwVnMURCgGhVWFyFCnmE4oiHKLdPKfsFE1MSlS6b50jqnnatA==" - `paymentType.applePay.encryptedPaymentData.publicKeyHash` (string, required) Hash of the X.509 encoded publick key bytes of the merchant's certificate Example: "pGfiHRVxjhNOYgELoULbS0ay6m56j1+tPI96p74gLpg=" - `paymentType.applePay.encryptedPaymentData.transactionId` (string, required) Transaction Identifier generated on the device Example: "13baacb6feb4d9b86bcddd786ecc701a6d76158f3d04ca3dd7b020489db3cb49" - `paymentType.applePay.encryptedPaymentData.signature` (string, required) Signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm Example: "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhk" - `paymentType.applePay.encryptedPaymentData.version` (string, required) Version information about the payment token. The token uses EC_v1 for ECC-encrypted data and RSA_v1 for RSA-encrypted data Enum: "EC_v1", "RSA_v1" - `tokenGroup` (string) Token group name. Example: "COMPANYTG" ## Response 200 fields (application/json): - `responseCode` (string, required) A code that represents the outcome of the transaction Example: "0" - `responseMessage` (string) A list of brief descriptions about the error encountered. If multiple messages need to be returned, it will be separated with ';' character Example: "An unexpected system error occurred. Please check with support." - `token` (string) Token in UUID format Example: "85ce5afd-31b2-4612-a6ef-c1e2aba3ca71" - `formatPreservedToken` (string) Format preserved token Example: "3464594731bvtegfdstgv463" - `bin` (string) Bank Identification Number Example: "40212300" - `binLevel` (string) Only present for CC: card level like classic, platinum etc. Example: "Classic" - `category` (string) Only present for CC: credit card, debit card, cash card Example: "Credit Card" - `lastFour` (string) Only present for CC: last 4 of card number Example: "4444" - `binLength` (integer) Only present for CC: BIN length Example: 8 - `network` (string) Only present for CC: card brand like Visa Example: "VISA" - `isoCountry` (string) Country code representing the country associated with the payment account Example: "UNITED STATES OF AMERICA (THE)" - `isoCountryCode` (string) Country code indicating the country where the payment account's issuing institution is located Example: "840" - `isInternational` (boolean) Flag indicating whether the payment account is considered international - `tokenGroupName` (string) Name of the token group Example: "Credit Card Tokens"