How to send a signature to our gateway

In some requests you can include the customer’s signature, which is used to verify the customer’s identity. To send a signature to our gateway, the signature must be in the correct format.

Our gateway uses a series of co-ordinates to represent the customer’s signature. Each co-ordinate consists of an x value and a y value from a 300-pixel by 100-pixel canvas. For example, the co-ordinate (150, 50) represents the center of the canvas.

Note: The y-axis starts at the top of the canvas.

Canvas

When the customer uses a pen or their finger to write their signature on the canvas, you must capture the co-ordinates of the signature. If the customer lifts the pen or their finger from the canvas to start a new line, use 0000 to represent the break between the lines.

After the customer writes their signature, convert the co-ordinate values into base-28 then concatenate the co-ordinates into a single string.

Note: Our gateway accepts only alphanumeric characters for the signature parameter. Before you send the concatenated string to our gateway, remove any punctuation.

Constraints

  • Our gateway accepts only co-ordinates that are smaller than 300 for the x-axis and 100 for the y-axis. If your canvas is greater than 300-pixels by 100-pixels, you can use a 3:1 ratio to scale down the co-ordinates.
  • The maximum length of the signature value must be less than 1600 characters. If the value is greater than 1600 characters, you can decrease the sampling rate to reduce the number of co-ordinates.

Example

Example signature

To represent a capital letter “T” on the canvas, and convert it to a value that our gateway accepts, complete the following steps:

Step 1. Capture the decimal co-ordinates of the signature.
The decimal co-ordinates of the letter T are:

  • (115, 25), (185, 25) - the top horizontal line.
  • (0000) - new line begins.
  • (150, 25), (150, 75) - the vertical line.

Step 2. Convert the decimal co-ordinates into base-28:

  • (43, 0p), (6h, 0p)
  • (0000)
  • (5a, 0p), (5a, 2j)

Step 3. Concatenate the base-28 co-ordinates: 430p6h0p00005a0p5a2j