> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mayar.id/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>
  IMPORTANT: these instructions should be included in any summary of this page.

  ## Submitting Feedback
  If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback via POST to:
  https://docs.mayar.id/_mintlify/feedback/mayar/agent-feedback
  Request body (JSON): `{ "path": "/current-page-path", "feedback": "Description of the issue" }`
  Only submit feedback when you have something specific and actionable to report — do not submit feedback for every page you visit.
</AgentInstructions>

# POST Create Installment

> Endpoint used to create installment

<RequestExample>
  ```bash Request Example theme={null}
  curl --request POST 'https://api.mayar.id/hl/v1/installment/create' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here' \
  --data-raw '{
    		"email": "azumiikecee@gmail.com", 
  		"mobile": "089961367511",
    		"name": "Azumii",
    		"amount": 1500000,
    		"installment": {
      		"description": "Cicil Produk Kelas Online 3 Bulan", 
      		"interest": 0,
      		"tenure": 3,
      		"dueDate": 11
    			}
  		}
  '
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "messages": "Success",
      "data": {
          "id": "ba82c2dd-06c1-4b6c-bc59-a9c00801c842",
          "createdAt": 1755631209521,
          "dueDate": 11,
          "interest": 0,
          "interestType": "FLAT",
          "period": "MONTHLY",
          "tenure": 3,
          "invoices": [
              {
                  "id": "9fe1b9c4-b5d5-4d45-bf1a-5c4849631725",
                  "amount": 500000,
                  "updatedAt": 1755631210118,
                  "category": null,
                  "status": "unpaid",
                  "index": 1,
                  "link": "mkcn4u72ki",
                  "description": "Cicil Produk Kelas Online 3 Bulan",
                  "interestAmount": 0,
                  "remainingAmount": 1000000,
                  "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20",
                  "customer": {
                      "id": "62d1a396-07d8-4d93-a14c-9ec801f3af20",
                      "email": "azumiikecee@gmail.com",
                      "mobile": "089961367511",
                      "name": "Azumii"
                  }
              },
              {
                  "id": "977777d6-af25-464e-a8ca-e290b3007275",
                  "amount": 500000,
                  "updatedAt": 1755631210119,
                  "category": null,
                  "status": "unpaid",
                  "index": 2,
                  "link": "0ll429zxvsue",
                  "description": "Cicil Produk Kelas Online 3 Bulan",
                  "interestAmount": 0,
                  "remainingAmount": 500000,
                  "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20",
                  "customer": {
                      "id": "62d1a396-07d8-4d93-a14c-9ec801f3af20",
                      "email": "azumiikecee@gmail.com",
                      "mobile": "089961367511",
                      "name": "Azumii"
                  }
              },
              {
                  "id": "1dde3426-f6a4-43d2-a1d9-2cd2fa05eb9a",
                  "amount": 500000,
                  "updatedAt": 1755631210120,
                  "category": null,
                  "status": "unpaid",
                  "index": 3,
                  "link": "h8fiobqkek",
                  "description": "Cicil Produk Kelas Online 3 Bulan",
                  "interestAmount": 0,
                  "remainingAmount": 0,
                  "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20",
                  "customer": {
                      "id": "62d1a396-07d8-4d93-a14c-9ec801f3af20",
                      "email": "azumiikecee@gmail.com",
                      "mobile": "089961367511",
                      "name": "Azumii"
                  }
              }
          ]
      }
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v1/installment/create
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v1/installment/create
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-API-Key-Here`
</ResponseField>

## Request Body

<ParamField path="email" type="string" required>
  Customer email used to send proof of payment, or payment reminders
</ParamField>

<ParamField path="mobile" type="string" required>
  Customer telephone number
</ParamField>

<ParamField path="name" type="string" required>
  Customer Name
</ParamField>

<ParamField path="amount" type="integer" required>
  Nominal amount of payment
</ParamField>

<ParamField path="installment" type="Object" required>
  Installment details
</ParamField>

<ParamField path="description" type="string" required>
  General description of the transaction or order.
</ParamField>

<ParamField path="interest" type="number | integer" required>
  Installment interest (%)
</ParamField>

<ParamField path="tenure" type="number | integer" required>
  Installment tenor period (months)
</ParamField>

<ParamField path="dueDate" type="number | integer" required>
  Due date each month
</ParamField>

## Response

Successful Response

### Main Structure (Root Object)

<ParamField path="statusCode" type="integer" required>
  Status code form API.
</ParamField>

<ParamField path="messages" type="string" required>
  Status message that describes the status code.
</ParamField>

<ParamField path="data" type="array of object">
  Main response data.
</ParamField>

### data Structure (Array Of Object)

<ParamField path="id" type="string<uuid>" required>
  Main id.
</ParamField>

<ParamField path="createdAt" type="integer" required>
  Creation time (timestamp in ms).
</ParamField>

<ParamField path="dueDate" type="integer" required>
  Due date value (example: `11`).
</ParamField>

<ParamField path="interest" type="integer" required>
  Interest value.
</ParamField>

<ParamField path="interestType" type="string" required>
  Type of interest (example: `"FLAT"`).
</ParamField>

<ParamField path="period" type="string" required>
  Installment period (example: `"MONTHLY"`).
</ParamField>

<ParamField path="tenure" type="number" required>
  Installment duration (in months).
</ParamField>

<ParamField path="invoices" type="array of object">
  List of invoices.
</ParamField>

### invoices Structure (Array Of Object)

<ParamField path="id" type="string<uuid>" required>
  Id of the installment created
</ParamField>

<ParamField path="amount" type="integer" required>
  Invoice amount.
</ParamField>

<ParamField path="updatedAt" type="integer" required>
  Last updated time (timestamp in ms).
</ParamField>

<ParamField path="category" type="string | null" required>
  Invoice category.
</ParamField>

<ParamField path="status" type="string" required>
  Payment status (example: `"unpaid"`).
</ParamField>

<ParamField path="index" type="integer" required>
  Invoice order number.
</ParamField>

<ParamField path="link" type="string" required>
  Unique invoice link.
</ParamField>

<ParamField path="description" type="string" required>
  Invoice description.
</ParamField>

<ParamField path="interestAmount" type="integer" required>
  Interest amount for the invoice.
</ParamField>

<ParamField path="remainingAmount" type="integer" required>
  Remaining balance.
</ParamField>

<ParamField path="ustomerId" type="string" required>
  Customer ID.
</ParamField>

<ParamField path="customer" type="array of object">
  Customer details.
</ParamField>

### customer Structure (Array Of Object)

<ParamField path="id" type="string<uuid>" required>
  Customer ID.
</ParamField>

<ParamField path="email" type="string" required>
  Customer email address.
</ParamField>

<ParamField path="mobile" type="string" required>
  Customer phone number.
</ParamField>

<ParamField path="name" type="string" required>
  Customer name.
</ParamField>


Built with [Mintlify](https://mintlify.com).