DocuSign Momentum 2018DocuSign Momentum 2018
{"api":"esign_rest","category":"reference"}

EnvelopeRecipientTabs Resource

The EnvelopeRecipientTabs resource provides methods that let you add, update, and delete tabs from an envelope. Tabs are associated with a specific recipient in an envelope and are only used by the recipient types In Person Signers and Signers.

On this page

Tab Types

This table lists the available tab types.


Tab Type Description
Approve (approve) Allows the recipient to approve documents without placing a signature or initials on the document. If the recipient clicks the tab during the signing process, the recipient is considered to have signed the document. No information is shown on the document of the approval, but it is recorded as a signature in the envelope history.
Checkbox (checkbox) Allows the recipient to select a yes/no (on/off) option.
Company (company) Displays the recipient's company name.
Date Signed (dateSigned) Displays the date that the recipient signed the document.
Date (date) Allows the recipient to enter a date. Date tabs are one-line fields that allow date information to be entered in any format. The tooltip for this tab recommends entering the date as MM/DD/YYYY, but this is not enforced. The format entered by the signer is retained. If you need a particular date format enforced, DocuSign recommends using a Text tab with a validation pattern and a validation message to enforce the format.
Decline (decline) Allows the recipient the option of declining an envelope. If the recipient clicks the tab during the signing process, the envelope is voided.
Email Address (emailAddress) Displays the recipient's email as entered in the recipient information.
Email (email) Allows the recipient to enter an email address. This is a one-line field that checks that a valid email address is entered. It uses the same parameters as a Text tab, with the validation message and pattern set for email information.

When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.
Envelope ID (envelopeId) Displays the envelope ID. Recipients cannot enter or change the information in this tab.
First Name (firstName) Displays the recipient's first name. This tab takes the recipient's name as entered in the recipient information, splits it into sections based on spaces and uses the first section as the first name.
Formula Tab (formulaTab) The value of a formula tab is calculated from the values of other number or date tabs in the document. When the recipient completes the underlying fields, the formula tab calculates and displays the result.

The formula property of the tab contains the references to the underlying tabs. See Calculated Fields in the DocuSign Support Center to learn more about formulas.

If a formula tab contains a paymentDetails property, the tab is considered a payment item. See Requesting Payments Along with Signatures in the DocuSign Support Center to learn more about payments.
Full Name (fullName) Displays the recipient's full name.
Initial Here (initialHere) Allows the recipient to initial the document. May be optional.
Last Name (lastName) Displays the recipient's last name. This tab takes the recipient's name as entered in the recipient information, splits it into sections based on spaces and uses the last section as the last name.
List (list) This tab offers a list of options to choose from. The listItems property is used to specify the selectable options.
Note (note) Displays additional information, in the form of a note, for the recipient.
Number (number) Allows the recipient to enter numbers and decimal (.) points.
Radio Group (radioGroup) This group tab is used to place radio buttons on a document. The radios property is used to add and place the radio buttons associated with the group. Only one radio button can be selected in a group.
Sign Here (signHere) Allows the recipient to sign a document. May be optional.
Signer Attachment (signerAttachment) Allows the recipient to attach supporting documents to an envelope.
SSN (ssn) A one-line field that allows the recipient to enter a Social Security Number. The SSN can be typed with or without dashes. It uses the same parameters as a Text tab, with the validation message and pattern set for SSN information.
Text (text) Allows the recipient to enter any type of text.
Title (title) Displays the recipient's title.
View (view) The View tab is used with the Approve tab to handle supplemental documents.
Zip (zip) Allows the recipient to enter a ZIP code. The ZIP code can be five digits or nine digits in the ZIP+4 format. The zip code can be typed with or without dashes. It uses the same parameters as a Text tab, with the validation message and pattern set for ZIP code information.

Sign Here Tab Alignment

When you provide an x- and y-coordinate for the sign here tab, the tab appears 21 points lower than the value you provide for the y-coordinate. To align the tab as expected, subtract 21 from the expected y-value.

Sign Here Tab Alignment

View Tab

The View tab is used on supplemental documents. To learn more about using the View tab with supplemental documents, see Using Supplemental Documents in the Sending Documents section of the Envelope: create method.


Name Required Type Description
documentId Yes String The document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
pageNumber Yes String Must be set to 1.
recipientId Yes String The recipient associated with the tab. Must refer to an existing recipient's ID attribute.
required No Boolean If true, the recipient is required to select the supplemental document View button during signing.
tabLabel No String The label used for the tab. If an empty string is provided for this, an empty sting is used. If no value is provided, the tab type is used as the value. Maximum of 500 characters.
templateLocked No Boolean Optional. Used only when working with template tabs. If true, the attributes of the tab cannot be changed by the sender.
templateRequired No Boolean Optional. Used only when working with template tabs. If true, the tab cannot be removed by the sender.
xPosition Yes String Required, but can be 0.
yPosition Yes String Required, but can be 0.

Requesting Payments

The Payments feature of the DocuSign eSignature REST API lets you collect payments along with signatures and other information.

To send a request for payment and collect payments, you need a payment gateway account, which is the destination for the payments. Create a payment account with a supported payment gateway, and then connect the payment gateway account to your DocuSign account. To learn how to connect a payment gateway account to your DocuSign account see Managing Payment Gateways in the DocuSign Support Center. You must connect and manage payment gateway accounts manually through the DocuSign Admin console and through your chosen payment gateway. There is no public API for connecting payment gateway accounts to DocuSign accounts or for managing payment gateway accounts.

Currently Stripe is the only supported payment gateway.

How Payments Work

To make a request for payment, use a formulaTab that has a paymentDetails object. This object includes a list of paymentLineItem objects. Each line item refers to a number tab that contains the value of the each item. The purpose of the line items is to transmit them to the payment gateway as metadata, so that you can use the information in the payment processor.

This is an example request for two books. Each book is specified in the number tabs labeled "Hamlet" and "Tempest". The books are referenced as line items by their tab labels within the paymentDetails object of a formula tab. The formula of the formula tab add the values of the same two number tabs.

{
  "documents": [
    {
      "documentBase64": "<base64-encoded PDF document>",
      "documentId": "1",
      "fileExtension": "pdf",
      "name": "payment.pdf"
    }
  ],
  "emailSubject": "Order Some Books",
  "recipients": {
    "signers": [
      {
        "email": "vreader@example.com",
        "name": "Voracious Reader",
        "recipientId": "1",
        "routingOrder": "1",
        "tabs": {
          . . .
          "numberTabs": [
            {
              "value": "10.00",
              "width": 78,
              "required": "true",
              "locked": "true",
              "tabLabel": "Hamlet",
              "documentId": "1",
              "pageNumber": "1",
              "xPosition": "323",
              "yPosition": "134"
            },
            {
              "value": "10.00",
              "width": 78,
              "required": "true",
              "locked": "true",
              "tabLabel": "Tempest",
              "documentId": "1",
              "pageNumber": "1",
              "xPosition": "323",
              "yPosition": "154"
            }
          ],
          "formulaTabs": [
            {
              "required": "true",
              "formula": "([Hamlet] + [Tempest]) * 100",
              "roundDecimalPlaces": "2",
              "paymentDetails": {
                "currencyCode": "USD",
                "lineItems": [
                  {
                    "name": "Hamlet",
                    "description": "The Danish Play",
                    "itemCode": "SHAK1",
                    "amountReference": "Hamlet"
                  },
                  {
                    "name": "Othello",
                    "description": "The one with Caliban in it",
                    "itemCode": "SHAK2",
                    "amountReference": "Tempest"
                  }
                ],
                "gatewayAccountId": "e76668b4-53a9-4413-b551-a208d659e490"
              },
              "tabLabel": "Payment1",
              "documentId": "1",
              "pageNumber": "1",
              "xPosition": 300,
              "yPosition": 200
            }
          ]
        }
      }
    ]
  },
  "status": "sent"
}

Use the EnvelopeRecipients: list method to check the status of a payment. When the payment is successful, the status property of the paymentDetails object is payment_complete.

{
  "signers": [
    {
      "tabs": {
        . . .
        "numberTabs": [
          {
            "value": "10.00",
            "tabLabel": "Hamlet",
            "documentId": "1",
            "recipientId": "1",
            "pageNumber": "1",
            "xPosition": "323",
            "yPosition": "134",
          },
          {
            "value": "10.00",
            "tabLabel": "Tempest",
            "documentId": "1",
            "recipientId": "1",
            "pageNumber": "1",
          }
        ],
        "formulaTabs": [
          {
            "formula": "([Hamlet] + [Tempest]) * 100",
            "roundDecimalPlaces": "2",
            "paymentDetails": {
              "status": "payment_complete",
              "currencyCode": "USD",
              "lineItems": [
                {
                  "name": "Hamlet",
                  "description": "The Danish Play",
                  "itemCode": "SHAK1",
                  "amountReference": "Hamlet"
                },
                {
                  "name": "Tempest",
                  "description": "The one with Caliban in it",
                  "itemCode": "SHAK2",
                  "amountReference": "Tempest"
                }
              ],
              "gatewayAccountId": "e76668b4-53a9-4413-b551-a208d659e490"
            },
            "value": "20",
            "required": "true",
            "locked": "false",
            "tabLabel": "Payment1",
            "documentId": "1",
            "recipientId": "1",
            "pageNumber": "1",
          }
        ]
      },
      "creationReason": "sender",
      "email": "vreader@example.com",
      "name": "Voracious Reader",
      "recipientId": "1",
      "requireIdLookup": "false",
      "status": "completed",
    }
  ],
  . . .
}

Some Things to Keep in Mind About Payments

  • An envelope is not completed until all payments are completed.

  • If a DocuSign account Administrator deletes a payment gateway account connection DocuSign cancels all in-process envelopes that reference the deleted payment gateway account.

  • If the sender voids an envelope, all payment authorizations are canceled.

  • If a required recipient refuses to sign, all authorized payments are canceled.

  • If a required recipient's payment fails authorization, DocuSign attempts to recover by sending the recipient notification about the failed payment authorization. The recipient has the opportunity to correct the payment method information.

  • Each recipient's payment is authorized separately. Accounts are charged and payment made after all required tabs are completed, and all payments in an envelope for all recipients are authorized.

  • Refunds are not supported. Conduct refunds or payment changes with the payment gateway separately from DocuSign.

  • At this time, DocuSign does not charge a per-transaction fee.

Using Custom Tabs in Envelopes and Templates

Custom Tabs can be added to envelopes and templates by setting the customTabId property when creating an envelope or template recipient or when adding a new tab for an existing recipient. The custom tab must be added as the correct tab type. For example if the custom tab type is text, it cannot be used as a number tab.

When the customTabId property is set, the new tab inherits all the custom tab properties. Required information that is not included in the custom tab, such as document ID and page ID, must be included when adding the tab. If the custom tab does not have anchor settings, the X and Y positions must be included.

After the tab is created, it is treated as any other tab for updating or deleting.

Anchoring Tabs

The tab anchoring option allows you to send documents for signature that do not have a fixed layout or format. In these documents you might not know the absolute location of the tabs when you design your API client application because the tabs must move with text. As an alternative to sending X and Y coordinates for tabs, the DocuSign Service can derive an anchor location for the tab by correlating anchor information to data within the document.

When the DocuSign Service receives a request that contains tabs with anchor information, it searches the document for instances of the anchorString property. When found, it places a tab of the specified type for the designated recipient. Tab positions are established by setting offsets for the tab.

When you apply tabs to the document, DocuSign does not remove or replace the text in the anchorString property. You can hide codified anchors by using the same font color as the background of the document. So the anchor can be used by DocuSign processes and it will not be visible on the document.

To use an anchoring option:

  1. Identify the location in the document by text string. You can use a pre-existing text string or add a new one. For best performance DocuSign recommends using single word anchor strings when possible, especially when there are a large number of pages in the envelope. For example, you might want to add a Sign Here tab to the "Borrower's Signature" lines in a document, but that phrase might occur in places in the document where you don't want to tab to appear. In this case, you could add the text "BorrowerSignHere" in white font color (so that isn't visible in the document) to all the places you want Sign Here tabs to appear and use "BorrowerSignHere" as the anchor string.
  2. Reference the anchor through the anchorString property of the tab.
  3. Determine the offset from the anchor string location to where the tab should be placed.

Setting a positive value in the anchorXOffset property moves the tab right on the page and positive values in the anchorYoffset prove moves the tab down the page. The anchorUnits property specifies the units used for the offsets. For Sign Here and Initial Here tabs the bottom-left of the anchor string is equivalent to position (0,0), and the bottom-left of the tab graphic is placed relative to that. For all other tabs the bottom-left of the anchor string is equivalent to position (0,0), and the top-left of the tab graphic is placed relative to that. DocuSign does not currently provide tools to derive the offset values. Determination of the proper offset will likely require some trial-and-error.

Rules for working with anchor tags

When anchor tabs are used, all documents in the envelope are searched for the anchorString property.

  • You set the text of the anchor string in the anchorString property. DocuSign tabs are created for each instance of the anchorString property within the document, so special care must be taken to establish unique anchor strings that do not result in unintentional tabs.
  • You cannot use the same anchored tab for different recipients for the same document.
  • The DocuSign system cannot search for text that is embedded in an image when checking for anchor strings.
  • X or Y offsets supplied for a tab apply to all instances of the tab in the document. To use different offsets at different locations in the document for the same recipient, create multiple, unique anchor tabs.
  • If the Y offset value of an anchor string would force a tab outside of the page boundaries, the tag is placed at the page boundary. If the X offset value places a tab outside of the page boundaries, the error message Invalid_User_Offset is sent. The error message includes the X offset that resulted in the error.
  • The system does not support an anchor string embedded in the form of a PDF X-object in the document.
  • The system does not re-flow the text that surrounds the anchor tabs. It is the responsibility of the document author to provide sufficient white space to contain the potential width of the ultimate tab value.

Tips and Tricks

The following are tips for effective use of anchor tags:

  • In order to avoid unintentional conflicts between text contained in an anchorString property and the text that naturally exists in documents, establish a codified syntax for the anchor string text that is unlikely to appear elsewhere in a document.
  • Develop an extensible and consistent syntax that can be used across multiple document types.
  • Especially for documents that have variable numbers of tabs or signers, author the source document to include hidden anchor tabs for all potential signers/permutations. Then, control the tabs that are actually placed by including/excluding the anchor tabs in the request. This approach allows a single document to be used for all use cases instead of maintaining separate documents for each scenario.

Automatically Populating Tabs

If you want similar tab types to automatically populate with the same data, you must follow these guidelines:

  • Each tabLabel entry must have the characters \\* in front of the label. If you omit the \\* prefix, only the first occurrence of the tab is populated.

    When automatically populating tabs, the tabLabel must not contain any spaces. In the JSON example below, the Text tabs properties StudentLastName and StudentFirstName will be auto-populated as specified ("Doe" and "John") each place they appear throughout the envelope.

    "tabs": {
      "textTabs": [
      {
        "tabLabel": "\\*StudentLastName",
        "value": "Doe"
      },
      {
        "tabLabel": "\\*StudentFirstName",
        "value": "John"
      }]
    }
    
  • Each occurrence of the tab must have identical properties.

    For example, suppose there are two Text tabs in a document, each with tabLabel set to Name. If one tab has the bold property set to true, and the other has the bold property set to false, only the first one will be populated. In order to automatically populate both occurrences of the Name Text tabs, the bold property must be set to the same value for both tabs.

MethodDescription
list
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

Retrieves information about the tabs associated with a recipient in a draft envelope.

update
PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

Updates one or more tabs for a recipient in a draft envelope.

create
POST /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

Adds one or more tabs for a recipient.

delete
DELETE /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

Deletes one or more tabs associated with a recipient in a draft envelope.