Capture a signature

An AI skill is available for this guide, get it on the Skills Marketplace (GitHub).

After you configure a device for Payroc Cloud, program your POS to use the Submit Signature Instruction method to send a signature instruction to the payment device.

To capture a cardholder’s signature, complete the following:

  1. Submit a signature instruction to the device.
  2. View the status of the signature instruction.
  3. View the signature.

You can also cancel a signature instruction if it hasn’t yet completed.

Before you begin

Authenticate your requests before making API calls. If your request fails, see Errors.

Step 1. Submit a signature instruction

To submit a signature instruction to a device, send a POST request to the Devices endpoint.

Request parameters

To create the body of your request, use the following parameters:

Request

Example request

POST
/v1/devices/:serialNumber/signature-instructions
1curl -X POST https://api.payroc.com/v1/devices/1850010868/signature-instructions \
2 -H "Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "processingTerminalId": "1234001"
7}'

Response fields

If your request is successful, we send the signature instruction to the device.

Note: The response returns a value of inProgress for the status field and an identifier for the instruction that you can use to check the status of the instruction. To get a link to view the details of the signature capture, go to Step 2.

Response

statusenumRequired
Indicates the current status of the instruction. - `canceled` – The instruction was canceled before it was completed. - `completed` – The instruction has completed. Use the link object to check the resource. - `failure` – The instruction failed. Check the errorMessage field for more information. - `inProgress` – The instruction is currently in progress.
signatureInstructionIdstringRequired1-36 characters
Unique identifier that our gateway assigned to the instruction.
errorMessagestringOptional
Description of the error that caused the instruction to fail. **Note:** We return this field only if the status is `failure`.

Example response

Response
1{
2 "status": "inProgress",
3 "signatureInstructionId": "a37439165d134678a9100ebba3b29597",
4 "link": {
5 "rel": "self",
6 "method": "GET",
7 "href": "https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597"
8 }
9}

Step 2. View the status of a signature instruction

To check for updates to the status of the signature instruction, send a GET request to the Signature Instructions endpoint.

Before our gateway sends a response, it waits for up to a minute for the status of the instruction to change. We recommend that you keep the session open until the status of the instruction changes or the request times out.

If the status of the instruction doesn’t change, send another GET request. Our gateway waits up to a minute for the status of the instruction to change. Continue to send GET requests until the status changes.

Note: Wait until you receive a response from our gateway before you send another request.

Request parameters

To create your request, use the following parameters:

Path parameters

signatureInstructionIdstringRequired1-36 characters
Unique identifier that our gateway assigned to the signature instruction.

Example request

GET
/v1/signature-instructions/:signatureInstructionId
1curl https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597 \
2 -H "Authorization: Bearer <token>"

Response fields

If your request is successful, we return the details of the signature instruction, including HATEOAS links to check the signature. Use the HATEOAS links to get the signatureId, which you need in Step 3.

If the status of the signature instruction is inProgress, our gateway waits up to a minute for the status to change before it returns a response.

Response

statusenumRequired
Indicates the current status of the instruction. - `canceled` – The instruction was canceled before it was completed. - `completed` – The instruction has completed. Use the link object to check the resource. - `failure` – The instruction failed. Check the errorMessage field for more information. - `inProgress` – The instruction is currently in progress.
signatureInstructionIdstringRequired1-36 characters
Unique identifier that our gateway assigned to the instruction.
errorMessagestringOptional
Description of the error that caused the instruction to fail. **Note:** We return this field only if the status is `failure`.

Example response

Response
1{
2 "status": "completed",
3 "signatureInstructionId": "a37439165d134678a9100ebba3b29597",
4 "link": {
5 "rel": "signature",
6 "method": "GET",
7 "href": "https://api.payroc.com/v1/signatures/M2MJOG6O2Y"
8 }
9}

Step 3. View the signature capture

To view the signature that the payment device captured, send a GET request to the Signatures endpoint.

Request parameters

To create your request, use the following parameters:

Path parameters

signatureIdstringRequired=10 characters
Unique identifier that we assigned to the signature.

Example request

GET
/v1/signatures/:signatureId
1curl https://api.payroc.com/v1/signatures/JDN4ILZB0T \
2 -H "Authorization: Bearer <token>"

Response fields

If your request is successful, we return the details of the signature.

Response

Example response

Response
1{
2 "signatureId": "JDN4ILZB0T",
3 "processingTerminalId": "1024",
4 "createdOn": "2024-07-02",
5 "contentType": "image/png",
6 "signature": "iVBORw0KGgoAAAANSUhEUgAAASwAAABkCAYAAAA8AQ3AAAAJT0lEQVR4Xu3dW4hN7x/H8UnOF5ScSaGcY4hyvJiSQ6RE3FDIkEuHNDdcKacc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QimcFFIKK4UWgP80Ciw1mO7du7txk7RJshwshN4oVP6pDCxmzAtIq0aBtXDhQtdgmqI7Kt+6dcttRqcdP+fMmeMGlZPebrgQ5VoOaiBdJbh6tWl8owCi8ldgqQTp169f1nd37Zq5c+dON4isgFJQKbAUXAqwMLeGL6VyLAd1iU9NTY1bUKrxwrSV4EDU6gNLIaWwyjZu8vDhQ5s0aZJ76LmPyqkc1MXUmzZtcrc/0wXUz58/D54CIIv6wFIZqHKwoUyvSg1LH/W5r8qhHNQ1iXv37nU7kGormmK3eQaaGxdYGjfRQHvD6fM09KoyVAaqlC1lOajSWdcwTp482a5duxZ8GUAIFRo30WBvZmFi5mJijav43qvKKGU5ePbsWRs9erR76DmAwlVosLeqqqrg7Vp8UIpyUL0o9abUq1LvCkDxKnT5SBQb4pWrpGcHNS6l8SmNU2m8qtC9tAA0VqE9ohpuMpc2SZWDmunTjJ8mKDQDqJlAANFyPawXL14Ej6dGHOWgNuGrq6uz2tpaq66utsrKSjeorzVVYbdPBpC/Rivd00ZBcv/+/eDh0LKFk3ax0Ed9ruN6PYqdRAHklvrAUrkbtuQlnIDylvrAUrmbz37vhBNQvlIfWADSg8AC4A0CC4A3CCwA3iCwAHiDwALgDQILgDcILADeILAAeIPAAuANAguANwgsAN4gsAB4g8AC4A0CC4A3CCwA3iCwAHiDwALgDQILgDcILADeILAAeIPAAuANAguANwgsAN4gsAB4g8AC4A0CC4A3CCwA3iCwAHiDwALgDQILgDcILADeILAAeIPAAuANAguANwgsAN4gsAB4g8AC4A0CC4A3CCwA3iCwAHiDwALgDQILgDcILADeILAAeIPAAuANAguANwgsAN4gsAB4g8AC4A0CC4A3/gdbd1ZfSyjQ+QAAAABJRU5ErkJggg=="
7}

(Optional) Cancel a signature instruction

To cancel a signature instruction, send a DELETE request to the Signature Instructions endpoint.

Note: You can cancel a signature instruction only if its status is inProgress.

Request parameters

To create your request, use the following parameters:

Path parameters

signatureInstructionIdstringRequired1-36 characters
Unique identifier that our gateway assigned to the signature instruction.

Example request

Path parameters

signatureInstructionIdstringRequired1-36 characters
Unique identifier that our gateway assigned to the signature instruction.

Response

Response

If your request is successful, we cancel the signature instruction.