Skip to main content

POST /test-tokens

Create a test card token with a long-lived CVC session (1-year TTL). Test CVC sessions are not deleted after use in proxy (unlike production CVC sessions). Use for development and testing. Auth: Same as tokenize: X-Pub-Key and X-API-Key (or JWT). For testing you can use pub key pk_prod_jys4le1jgncomgda_L8HbeakKLNRWdBXoX5A6QJUYOlhUkNle. Do not use this test pub key in production or with sensitive card data. For a production pub key, contact ammar@ozura.com.

Request

{
  "cardNumber": "4111111111111111",
  "expirationMonth": "12",
  "expirationYear": "2025",
  "cvc": "123",
  "firstName": "Test",
  "lastName": "User"
}
FieldTypeRequiredDescription
cardNumberstringYesTest card number
expirationMonthstringYes2-digit month (01–12)
expirationYearstringYes2- or 4-digit year
cvcstringYesSecurity code
firstNamestringNoCardholder first name
lastNamestringNoCardholder last name

Response

201 Created. Includes token, cvc_session_id, mask, bin, test_mode: true, and expires_in (e.g. "1 year (test session)"). The CVC session is long-lived and is not deleted after use in proxy. See POST /tokenize for production tokenization. CVC sessions from /tokenize have a 90-second TTL and are deleted after use.