> For the complete documentation index, see [llms.txt](https://docs.number.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.number.tech/api-reference/rest-api/message-pay.md).

# Message Pay

Creates a payment link and sends it via SMS or email along with a message.

<mark style="color:orange;">post:</mark> <https://easypay5.com/APIcardProcNumber/v1.0.0/Other/MsgPay>

This call allows you to create a targeted payment link and send this along with a message to the party (or parties) of your choice.  Used in conjunction with our highly flexible [PayForm](https://docs.number.tech/documentation/getting-started/integration-options/payform) it can be used to collect a targeted amount from a specific party or to route funds for a general purpose or event. &#x20;

This API method allows users to accomplish three typical tasks:&#x20;

1. Send a SMS text with a message and Payment Link&#x20;
2. Send an email with message and Payment Link&#x20;
3. Acquire the Payment Link and use it internally or externally&#x20;

{% tabs %}
{% tab title="Sample Request" %}

```clike
{
   "MsgParams": {
    "MessageType": "SMS",
    "MessageBody": "",
    "MessageSubject": "OK Health",
    "DueOn": "1/7/2027",
    "ExpiresOn": "3/7/2027",
    "SingleUsage": 1
  },
  "InitParams": {
    "MerchID": 1,
    "WTYPE": "PF",
    "PostURL": "https://easypay7.com/swidget/JsonGet.aspx",
    "RedirectURL": "https://easypay8.com/CYWidget/",
    "REF_ID": "A97689#",
    "RPGUID": "92e1e15c-f64a-466b-8733-9b518b9f374c",
    "EndPoint": "PF",
    "EINDEX": "300",
    "Amounts": {
      "Amount": 20,
      "Surcharge": 0,
      "TotalAmt": 20
    },
    "Payer": {
      "Firstname": "John",
      "Lastname": "Doe",
      "BillingAddress": {
        "StreetAddress": "123 Elm St",
        "City": "Tulsa",
        "State": "OK",
        "ZIP": "84048",
        "Country": "USA"
      }, 
      "Email": "Jdoe@acme.net", 
      "Phone": "6078595025",
      "Company": ""
    },
    "WidOptions": {
      "eVisible": "0665",
      "eReadOnly": "0040",
      "eStyles": "0001",
      "eSubmission": "0A01",
      "eFeatures": "0000",
      "eColors": "#ffffff,#428bca,#007bff,#212121,#ffffff,#212121,#ffffff"
    }
  }
} 
```

{% endtab %}

{% tab title="Sample Response" %}

```clike
{
  "MsgPaymentResult": {
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "PaymentUrl": "https://easypay8.com/PayForm?SP=8CBE8D1B2",
    "RespMsg": "Text Sent Successfully to 2075434562"
  }
}
```

{% endtab %}

{% tab title="Header Parameters" %}
**SessKey** string <mark style="color:orange;">required</mark>

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: `A1842D663E9A4A72XXXXXXXX303541303234373138`

***

**Content-Type** string <mark style="color:orange;">required</mark>

Example: `application/json`

***

**Accept** string <mark style="color:orange;">required</mark>

Example: `application/json`
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.number.tech/api-reference/rest-api/message-pay.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
