Firstoken API Docs
  • ⚙️API Reference
    • Firstoken API
      • Tokenization As A Service
        • Simple Tokenization
        • Simple Detokenization
        • Inspect Token
        • Delete Tokens
      • Transactions
        • Create a Transaction
        • Retrieve a Transaction
        • Inspect a Transaction
        • Delete a Transaction
        • Tokenize a Transaction
      • Proxy
        • Allowed Headers
        • Actions
        • Methods
          • POST - Proxy
          • GET - Proxy
          • PUT - Proxy
          • PATCH - Proxy
          • DELETE - Proxy
        • Get Payload Hash
        • Proxy JOSE
        • Proxy WSSEC
      • Inbound Routes
        • Create an Inbound - POST
      • Payments
        • Attributes of the Request
        • Common response
        • Endpoints
          • Authorizations
          • Reversals
          • Capture
            • Capture Refunds
            • Capture Void
          • Payments
            • Payment Refunds
            • Payment Void
          • Refunds void
          • Credit
            • Credit Void
          • Get Transaction Details
        • Decision Manager
          • How it works
          • Create decision
          • Update Decision
        • Risk Payer Authentication
          • How to use it
          • 3-D Secure Flows
            • Successful Frictionless Authentication
            • Unsuccessful Frictionless Authentication
            • Attempts Processing Frictionless Authentication
            • Unavailable Frictionless Authentication
            • Rejected Frictionless Authentication
            • Authentication not available on Lookup
            • Enrollment check error
            • Time-out
            • Bypassed Authentication
            • Successful Step-Up Authentication
            • Unsuccessful Step-Up Authentication
            • Unavailable Step-Up Authentication
            • Require Method URL
        • Point of Sale Payments
          • Authorization
          • Capture
          • Payment
          • Credit
  • 📖Guides
    • Firstoken Captures Hosted Iframe
      • How Firstoken Captures works
      • Generating a JSON Web Token
      • JSON form Schema
      • Iframe Communication
    • De-scoping Components
      • How Firstoken De-scoping Components works
      • Inbound Routes Module
        • Create an Inbound Route
        • Edit an Inbound Route
        • Delete an Inbound Route
      • Webhook Module
        • Create a Webhook
        • Edit a Webhook
        • Delete a Webhook
        • Webhook events
        • How to sign Webhooks data
      • Proxy Module
        • Create a Proxy
        • Edit a Proxy
        • Delete a Proxy
    • Firstoken Captures SDK JS
      • Getting Started
      • Functions
      • Type of Elements
      • Elements Options
      • CSS Object
      • Full Example of Usage
      • SDK versions
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. Firstoken API
  3. Proxy

Actions

In the FirsToken Proxy there are some elements that allows you to run specifics tasks in the request before being forwarded to the desired destination.

All actions must be send between a double braked string, like this:

"{{ token: detokenize | extract: element | filter: format | encrypt }}"

The actions that are supported are the following:

  • To choose the type of token to process, you can use:

    • :detokenize Used for describe a permanent token. Must be send concatenated to the token, Example: "69a96c12-ad1e-4392-b230-c154f8e4aabd:detokenization"

    • :transaction Used for describe an temporal token. Must be send concatenated to the token. Example: "69a96c12-ad1e-4392-b230-c154f8e4aabd:transaction"

  • extract:element Used for extract an specific element from the token data, for example in a credit card context can be the pan, card holder name, cvv for temporal tokens and the expiration date.

    • Allowed elements:

      • card: get the card number

      • token: gets the card token

      • name: if exist gets the card holder name.

      • expiration: gets the expiration date.

      • cvv: get the cvv value. (works only with transaction - temporal token)

  • filter: format Used to apply an specific date format (Only works with expiration dates values) As expiration just has months and year values, it allows formats like

    • "date: MM/YY"

    • "date: MM/YYYY"

    • "date: MM"

    • "date: YY"

    • "date: YYYY/MM"

  • encrypt

    Used to apply an encryption algorithm to the resulting string value

    • Currently only supports RSA algorithm

    • The key must be sent as part of the request in the ft-encryption header

  • parse: type Converts string values to numeric types. Only works for card-related fields:

    • Applicable fields:

      • expirationYear

      • expirationMonth

      • number

      • securityCode

    • Supported types:

      • integer

      • int

    • Example:

      {
          "card": {
              "expirationYear": "{{token:detokenize|extract:expiration|date:YYYY|parse:integer}}",
              "expirationMonth": "{{token:detokenize|extract:expiration|date:MM|parse:int}}",
              "number": "{{token:detokenize|extract:card}}",
              "securityCode": "897"
          } 
      }
    • Notes:

      • When using parse, the value will be sent as an integer instead of a string

        • Using unsupported types will result in an error:

      {
          "status_code": 400,
          "status": "fail",
          "description": "Invalid action:option combination received. action:option= parse:string",
          "data": ""
      }

The actions must be follow an order, the first action will indicate the token type (temporal or permanent), the second must be the extract task with an allowed element, next can be the filter, encrypt or parse action.

PreviousAllowed HeadersNextMethods

Last updated 3 months ago

Was this helpful?

⚙️