Developer Guide Menu

Generate Key

A POST request to the
/keys
resource generates a single-use public key and a key ID. The public key and key ID can be used in a follow-on POST request to the
/tokens
resource, which encrypts the card number. The key used to encrypt the card number on the cardholder’s device or browser is valid for 15 minutes and must be used to verify the signature in the response message.
Cybersource recommends creating a new key for each order. To generate a key, send an authenticated POST request from your server to the
/keys
resource before requesting the tokenized card data.
The keys resource is located here:
  • Test:
    https://apitest.cybersource.com/flex/v1/keys
  • Live:
    https://api.cybersource.com/flex/v1/keys
  • Live in India:
    https://api.in.cybersource.com/flex/v1/keys
Top