---
title: "Send document invite with payment request"
url: "https://docs.signnow.com/docs/request-payments/operations/post-document-document_id-invite"
type: "endpoint"
section: "request-payments"
slug: "request-payments/operations/post-document-document_id-invite"
method: "POST"
path: "/document/{document_id}/invite"
operation_id: "post-document-document_id-invite"
authorization: "bearer"
---

# Send document invite with payment request

`POST /document/{document_id}/invite`

This endpoint allows users to send a document invite with a payment request. Recipients will be redirected to the payment page after completing the documents.

> To request a payment, users must either connect to the payment service individually or accept an invitation to an organization already connected to the payment service.

- To invite a user to an organization, see [Add members](/docs/organization/operations/post-v2-organizations-org_id-members). 

- To accept an invitation to an organization, the user can click the link they receive, or see [Accept invite to organization](/docs/organization/operations/post-v2-organizations-org_id-members-user_id-accept).

- To connect your organization to the payment service, see [Connect to merchant account](/docs/request-payments/operations/post-organizations-org_id-merchantaccount).

A payment request can be linked to a specific field (`calculated` type) or set as a fixed amount (`fixed`type).

This article lists only the parameters required for a payment request. For other field invite parameters, see [Send field invite](/docs/document-field-invite/operations/post-field_invite).


<details>

**<summary>Use additional attributes to customize the request</summary>**

| Parameter | Description | Example |
| --- | --- | --- |
| `field_type` | Type of the field that sets the payment amount. Required if the request `type` is `calculated`. For a payment request invite, `filed_type` is `text_fields`. |<img src="/reference-assets/images/Request_payments/payment_request_field_name_type.png" alt="Field type"> |
| `field_name` | Name of the field that sets the payment amount. Used if the `type` is `calculated`. Can be found in the [Get document response](/docs/document/operations/get-document) (fields.name). | See the screenshot above.  |
| `type` | Defines how the payment amount is set. Allowed values: `fixed` (the amount is set in the amount field) and `calculated` (set using a document field).<br><br> Learn how to [add a payment request field](/docs/request-payments/operations/put-document-document_id). |<img src="/reference-assets/images/Request_payments/payment_request_type.png" alt="Payment type"> |
| `currency` | Payment currency in ISO format. |<img src="/reference-assets/images/Request_payments/payment_request_amount_currency.png" alt="Currency"> |
| `amount` | Amount of payment. Required if `type` is 'fixed'. | See the screenshot above. |

</details>

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_id` | string | Yes | Document ID. |

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "to",
    "from"
  ],
  "properties": {
    "to": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "properties": {
          "role": {
            "type": "string",
            "example": "Recipient 1",
            "description": "Recipient's role. Can be found in the response to [Get document](/docs/document/operations/get-document) request (roles.name)."
          },
          "email": {
            "type": "string",
            "example": "signer@email.com",
            "description": "Recipient's email address."
          },
          "payment_request": {
            "type": "object",
            "required": [
              "type",
              "currency",
              "merchants"
            ],
            "properties": {
              "type": {
                "type": "string",
                "example": "calculated",
                "description": "Defines how the payment amount is set. Possible values: `fixed` (the payment amount is set in the amount field) and `calculated` (the payment amount is set using a document field)."
              },
              "amount": {
                "type": "string",
                "example": "1000",
                "description": "Payment amount. Required if `type` is `fixed`.",
                "x-stoplight": {
                  "id": "ai5r848z73xpb"
                }
              },
              "currency": {
                "type": "string",
                "example": "USD",
                "description": "Payment currency in ISO format."
              },
              "field_id": {
                "type": "string",
                "example": "6d1511309f7f4d80b4df8e19a804d58846504000",
                "description": "ID of the field that sets the payment amount. Required if the request `type` is `calculated`. Can be found in the [Get document](/docs/document/operations/get-document) response (fields.id)."
              },
              "merchants": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "44bdae1e20624166b8073b58560066fc68440000"
                },
                "description": "IDs of connected payment service accounts. Found in the [Get user](/docs/user/operations/get-user-info) response and [Get merchant account](/docs/request-payments/operations/get-organizations-org_id-merchantaccount-merchant_account_id) response."
              },
              "field_name": {
                "type": "string",
                "example": "payment_field",
                "description": "Name of the field that sets the payment amount. Used if the `type` is `calculated`. Can be found in the [Get document](/docs/document/operations/get-document) response (fields.name)."
              },
              "field_type": {
                "type": "string",
                "example": "text_fields",
                "description": "Type of the field that sets the payment amount. Required if the request `type` is `calculated`. Allowed value is `text_fields`.\n"
              }
            },
            "description": "Payment request details."
          }
        }
      },
      "description": "An array of objects with email addresses and settings for all recipients."
    },
    "from": {
      "type": "string",
      "example": "sender@email.com",
      "description": "Sender's email address."
    }
  },
  "x-examples": {
    "Example 1": {
      "to": [
        {
          "role": "Signer 1",
          "email": "signer@email.com",
          "order": 1,
          "role_id": "dc594a43ed1d43b3abe4f50302420df507119111",
          "payment_request": {
            "type": "calculated",
            "currency": "USD",
            "field_id": "6d1511309f7f4d80b4df8e19a804d58846504000",
            "merchants": [
              "44bdae1e20624166b8073b58560066fc68440000",
              "e314905b9fa546f999013bf2551225f4e0190000"
            ],
            "field_name": "payment_field",
            "field_type": "text_fields"
          }
        }
      ],
      "from": "sender@email.com",
      "document_id": "2274bf62786844e981584543275cdc0c88d67d45"
    }
  }
}
```

**Example** (`Fixed amount`)

```json
{
  "to": [
    {
      "role": "Signer 1",
      "email": "signer@email.com",
      "payment_request": {
        "type": "fixed",
        "amount": "1000",
        "currency": "USD",
        "merchants": [
          "4bdae1e20624166b8073b58560066fc68440000",
          "e314905b9fa546f999013bf2551225f4e0190000"
        ]
      }
    }
  ],
  "from": "sender@email.com"
}
```

**Example** (`Calculated amount`)

```json
{
  "to": [
    {
      "role": "Signer 1",
      "email": "signer@email.com",
      "order": 1,
      "payment_request": {
        "type": "calculated",
        "currency": "USD",
        "field_id": "6d1511309f7f4d80b4df8e19a804d58846504000",
        "merchants": [
          "44bdae1e20624166b8073b58560066fc68440000",
          "e314905b9fa546f999013bf2551225f4e0190000"
        ],
        "field_name": "payment_field",
        "field_type": "text_fields"
      }
    }
  ],
  "from": "sender@email.com"
}
```

## Responses

### 200

Success.

**Example** (`Success`)

```json
{
  "status": "success"
}
```

### 400

- `field_id` is empty or missing. 
- `field_type` is missing or incorrect.
- `amount` is empty or missing.
- `currency` is missing.
- `type` is missing.
- `merchants` is empty.
- Merchant ID is incorrect.

**Example** (`Merchants empty`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Required at least one merchant account in payment request"
    }
  ]
}
```

**Example** (`currency missing`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Must provide currency type for payments"
    }
  ]
}
```

**Example** (`Merchant ID incorrect`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Invalid merchant_id in payment_field_request"
    }
  ]
}
```

**Example** (`amount empty or missing`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "For fixed payment types, please enter non zero amount"
    }
  ]
}
```

**Example** (`field_id empty or missing`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Invalid field id provided"
    }
  ]
}
```

**Example** (`field_type missing or incorrect`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "Invalid field type, valid types are: text_fields"
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/document/{document_id}/invite" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": [{"role": "Signer 1", "email": "signer@email.com", "payment_request": {"type": "fixed", "amount": "1000", "currency": "USD", "merchants": ["4bdae1e20624166b8073b58560066fc68440000", "e314905b9fa546f999013bf2551225f4e0190000"]}}], "from": "sender@email.com"}'
```

---
*Full reference: https://docs.signnow.com/docs/request-payments/operations/post-document-document_id-invite*
