Signature collection on a device
Collect a user's signature on a terminal device
When processing payments with terminal devices, Rainforest supports collecting a signature on a device and displaying a digital signature in reporting components.
Collect a signature
To prompt a device to collect a signature, create the payin config with the device_signature_mode
set to ATTEMPT
, which will prompt for a signature on devices that support the signature capability.
{
"amount": 202, // $2.02
"currency_code": "USD",
+ "device_signature_mode": "ATTEMPT"
}
Present the payin on the device and process the payin. After the payin is approved, the device will prompt for signature collection. The payin will stay in the status Presenting
until the payin is processed and the signature is collected. If the user does not complete the signature, then the payment will not process and the payin status will move to Canceled
.
Display a signature
Payin Details and Receipt Components
Pass the prop show-signature
to display a signature in the Payin Details Component and Payin Receipt Component.
<rainforest-payin-details
+ show-signature
></rainforest-payin-details>
Report Components
Pass the prop show-payin-signature
into various reporting components that integrate with the Payin Details Component, such as the Payment Report Component.
<rainforest-payment-report
+ show-payin-signature
></rainforest-payment-report>
API
The get payin endpoint returns a signature image, formatted as a base64 encoded data URI, in the device_data.signature
field.
You can display this image to your user with an HTML <img>
tag.
<img :src="{{signature}}" />
Verification type
Payins processed with a device will return a verification type in the device data in the get payin endpoint and displayed in the Payin Details Component in the Related info section. The value is determined by the card network and defines how the user processing the payment was verified as the cardholder.
Verification types
Type | Description |
---|---|
SIGNATURE | The user provided a signature on the device. |
OFFLINE_PIN | The user entered their pin on the device and it was verified by the EMV chip card. |
ONLINE_PIN | The user entered their pin on the device and it was verified by the card issuer. |
OFFLINE_PIN_SIGNATURE | The user entered their PIN and provided a signature on the device. |
NONE | The user could not be verified. |
Simulate signature collection in sandbox
In order to simulate collecting a signature on a virtual device in sandbox, we support two registration codes.
VIRTUAL_DEVICE
- does not support signature capabilityVIRTUAL_DEVICE_SIGNATURE
- does support signature capability
Register a device with the registration code VIRTUAL_DEVICE_SIGNATURE
. This will register a virtual device with the signature capability.
Then, configure the payin to collect a signature and present the payin on the registered device. Once the payin is presenting on the device, simulate the device interaction. An example signature will be returned on approved payins if the payin config device_signature_mode
is set toATTEMPT
and the virtual device supports signature collection.
Updated 27 days ago