Skip to content
developers

Submit disclosure instruction

Browse API reference

POST/devices/{serialNumber}/disclosure-instructionssendDisclosureInstruction

Use this method to submit an instruction to present terms and conditions or consent documents on a payment device and capture the cardholder's response.

You can present up to 10 disclosures in a single instruction. For each disclosure, you supply the document inline as a Base64-encoded value and indicate how the device should capture the cardholder's response.

The maximum request size is 1 MB. The total size of the Base64-encoded content across all of your disclosures must not exceed 750 KB. If it does, we return an instruction-too-large error.

Any signatures captured through this method are not compliant with eIDAS or ESIGN regulations and do not carry the legal equivalence of a wet signature.

Our gateway returns information about the disclosure instruction and a disclosureInstructionId, which you need for the following methods:

Note: After a disclosure instruction completes, the device needs time to return to the ready state before it can accept another instruction. If your flow sends multiple instructions, wait before you send the next one. The required wait depends on the flow and on the features that are enabled on the payment device. In the current version of the app, wait 2 seconds after the disclosure instruction completes successfully. This wait doesn't apply to a cancel instruction, because you must send it before the previous instruction completes.

Parameters

NameInTypeDescription
serialNumberRequiredpathstring

Serial number that identifies the merchant’s payment device.

Idempotency-KeyRequiredheaderstring

Unique identifier that you generate for each request. You must use the UUID v4 format for the identifier. For more information about the idempotency key, go to Idempotency.

Request body

application/json · required
  • disclosuresobject[]required
    Array of disclosures that you want the device to present. You can present up to 10 disclosures in a single instruction. If you send more, we return a too-many-documents error. Note: The total size of the Base64-encoded content across all disclosures must not exceed 750 KB. If it does, we return an instruction-too-large error.1–10 items
    • captureModestringrequired
      Indicates how you want the device to capture the cardholder's response. displayOnly Device displays the document without capturing a response. acceptDecline Device prompts the cardholder to accept or decline the document. signature Device prompts the cardholder to sign the document. acceptAndSign Device prompts the cardholder to accept the document and provide a signature. Note: The current version of the POS SDK supports only acceptAndSign. If you send any other value, the POS returns a validation error.displayOnlyacceptDeclinesignatureacceptAndSign
    • contentTypestringrequired
      MIME type that indicates the format of the document. Note: In this version, our gateway supports only text/plain, optionally with charset=utf-8. We return the value as text/plain in the acknowledgement.
    • hashstringrequired
      SHA-256 hash of the decoded document, as a 64-character hexadecimal string. Our gateway calculates the hash of the decoded document and compares it against this value. If the values do not match, we reject the request with a document-hash-mismatch error.64–64 chars
    • referencestring
      Opaque identifier that you assign to the disclosure. We echo the value on the acknowledgement. The reference must be unique within the request. Note: Do not include any personally identifiable information (PII) or protected health information (PHI) in this field.1–50 chars
    • sourceobjectrequired
      Polymorphic object that indicates how you supply the document. The value of the type parameter determines which variant you should use: inline Document is supplied directly in the request as a Base64-encoded value.
      • inlineobject
        Object that contains a document supplied directly in the request.
        • contentstringbyterequired
          Document to present on the device, as a Base64-encoded value. Encode the document with the standard Base64 alphabet defined in RFC 4648, not the URL-safe alphabet, and send the value without line breaks. Padding with = is optional. If we can't decode the value, we return an invalid-base64 error.
        • typestringrequired
          Indicates how you supply the document.inline
  • operatorstring
    Operator who initiated the request.0–50 chars
  • processingTerminalIdstringrequired
    Unique identifier that we assigned to the terminal.4–50 chars

Responses

Successful request. We accepted the disclosure instruction.

202 Accepted · application/json
{
  "disclosureInstructionId": "b48540276e245789ba211fcca4c30698",
  "link": {
    "href": "https://api.payroc.com/v1/disclosure-instructions/b48540276e245789ba211fcca4c30698",
    "method": "GET",
    "rel": "self"
  },
  "status": "inProgress"
}
Response schema · 7 fields
  • errorMessagestring
    Description of the error that caused the instruction to fail. Note: We return this field only if the status is failure.
  • linkobject
    Object that contains HATEOAS links for the resource.
    • hrefstringrequired
      URL of the target resource.
    • methodstringrequired
      HTTP method that you need to use with the target resource.
    • relstringrequired
      Indicates the relationship between the current resource and the target resource.
  • statusstringrequired
    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.canceledcompletedfailureinProgress
  • disclosureInstructionIdstringrequired
    Unique identifier that our gateway assigned to the instruction.1–36 chars

Search documentation

API reference173
Guides131
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer