# MoonClerk

> Read MoonClerk forms, recurring payment plans and payments.

App · 6 actions. Web page: https://docs.lodol.com/docs/integrations/moonclerk

## Actions

### Get customer

Get a customer

**Inputs**

- ID (`id`, number, required): MoonClerk ID of the record.

**Outputs**: Value.

- `data` (object): The API response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value, or empty at the end.

**Example output**

```json
{
  "data": {
    "customer": {
      "account_balance": 1,
      "checkout": {
        "amount_due": 1,
        "coupon_amount": 1,
        "coupon_code": "example",
        "date": "2026-10-01T12:00:00Z",
        "fee": 1,
        "subtotal": 1,
        "token": "example",
        "total": 1,
        "trial_period_days": 1,
        "upfront_amount": 1
      },
      "custom_fields": {},
      "custom_id": "example",
      "customer_reference": "example",
      "delinquent": false,
      "discount": {
        "coupon": {
          "amount_off": 1,
          "code": "example",
          "currency": "example",
          "duration": "example",
          "duration_in_months": 1,
          "max_redemptions": 1,
          "percent_off": 1,
          "redeem_by": "2026-10-01T12:00:00Z"
        },
        "ends_at": "2026-10-01T12:00:00Z",
        "starts_at": "2026-10-01T12:00:00Z"
      },
      "email": "example",
      "form_id": 1,
      "id": 1,
      "management_url": "example",
      "name": "example",
      "payment_method": {
        "brand": "example",
        "exp_month": 1,
        "exp_year": 1,
        "last4": "example",
        "type": "example"
      },
      "subscription": {
        "canceled_at": "2026-10-01T12:00:00Z",
        "current_period_end": "2026-10-01T12:00:00Z",
        "current_period_start": "2026-10-01T12:00:00Z",
        "ended_at": "2026-10-01T12:00:00Z",
        "expires_at": "2026-10-01T12:00:00Z",
        "first_payment_attempt": "2026-10-01T12:00:00Z",
        "id": 1,
        "next_payment_attempt": "2026-10-01T12:00:00Z",
        "plan": {
          "amount": 1,
          "amount_description": "example",
          "currency": "example",
          "id": 1,
          "interval": "example",
          "interval_count": 1,
          "plan_reference": "example"
        },
        "start": "2026-10-01T12:00:00Z",
        "status": "active",
        "subscription_reference": "example",
        "trial_end": "2026-10-01T12:00:00Z",
        "trial_period_days": 1,
        "trial_start": "2026-10-01T12:00:00Z"
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get form

Get a payment form

**Inputs**

- ID (`id`, number, required): MoonClerk ID of the record.

**Outputs**: Value.

- `data` (object): The API response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value, or empty at the end.

**Example output**

```json
{
  "data": {
    "form": {
      "access_token": "example",
      "created_at": "2026-10-01T12:00:00Z",
      "currency": "example",
      "id": 1,
      "payment_volume": 1,
      "successful_checkout_count": 1,
      "title": "example",
      "updated_at": "2026-10-01T12:00:00Z"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get payment

Get a payment

**Inputs**

- ID (`id`, number, required): MoonClerk ID of the record.

**Outputs**: Value.

- `data` (object): The API response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value, or empty at the end.

**Example output**

```json
{
  "data": {
    "payment": {
      "amount": 1,
      "amount_description": "example",
      "amount_refunded": 1,
      "charge_reference": "example",
      "checkout": {
        "amount_due": 1,
        "coupon_amount": 1,
        "coupon_code": "example",
        "date": "2026-10-01T12:00:00Z",
        "fee": 1,
        "subtotal": 1,
        "token": "example",
        "total": 1,
        "trial_period_days": 1,
        "upfront_amount": 1
      },
      "coupon": {
        "amount_off": 1,
        "code": "example",
        "currency": "example",
        "duration": "example",
        "duration_in_months": 1,
        "max_redemptions": 1,
        "percent_off": 1,
        "redeem_by": "2026-10-01T12:00:00Z"
      },
      "currency": "example",
      "custom_fields": {},
      "custom_id": "example",
      "customer_id": 1,
      "customer_reference": "example",
      "date": "2026-10-01T12:00:00Z",
      "email": "example",
      "fee": 1,
      "form_id": 1,
      "id": 1,
      "invoice_reference": "example",
      "name": "example",
      "payment_method": {
        "brand": "example",
        "exp_month": 1,
        "exp_year": 1,
        "last4": "example",
        "type": "example"
      },
      "status": "successful"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List forms

List payment forms

**Inputs**

- Count (`count`, number): Number of rows to return. From 1 to 100.
- Offset (`offset`, number): Starting position of the result set. At least 0.

**Outputs**: Value.

- `data` (object): The API response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value, or empty at the end.

**Example output**

```json
{
  "data": {
    "forms": [
      {
        "access_token": "example",
        "created_at": "2026-10-01T12:00:00Z",
        "currency": "example",
        "id": 1,
        "payment_volume": 1,
        "successful_checkout_count": 1,
        "title": "example",
        "updated_at": "2026-10-01T12:00:00Z"
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### List payment plans

List customers

**Inputs**

- Count (`count`, number): Number of rows to return. From 1 to 100.
- Offset (`offset`, number): Starting position of the result set. At least 0.
- Form (`form_id`, number): The associated MoonClerk form ID.
- Checkout from (`checkout_from`, date and time): Customers created on or after this date.
- Checkout to (`checkout_to`, date and time): Customers created on or before this date.
- Next payment from (`next_payment_from`, date and time): Subscription due to bill on or after this date.
- Next payment to (`next_payment_to`, date and time): Subscription due to bill on or before this date.
- Status (`status`, text): Subscription status. One of: `active`, `canceled`, `expired`, `past_due`, `pending`, `unpaid`.

**Outputs**: Value.

- `data` (object): The API response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value, or empty at the end.

**Example output**

```json
{
  "data": {
    "customers": [
      {
        "account_balance": 1,
        "checkout": {
          "amount_due": 1,
          "coupon_amount": 1,
          "coupon_code": "example",
          "date": "2026-10-01T12:00:00Z",
          "fee": 1,
          "subtotal": 1,
          "token": "example",
          "total": 1,
          "trial_period_days": 1,
          "upfront_amount": 1
        },
        "custom_fields": {},
        "custom_id": "example",
        "customer_reference": "example",
        "delinquent": false,
        "discount": {
          "coupon": {
            "amount_off": 1,
            "code": "example",
            "currency": "example",
            "duration": "example",
            "duration_in_months": 1,
            "max_redemptions": 1,
            "percent_off": 1,
            "redeem_by": "2026-10-01T12:00:00Z"
          },
          "ends_at": "2026-10-01T12:00:00Z",
          "starts_at": "2026-10-01T12:00:00Z"
        },
        "email": "example",
        "form_id": 1,
        "id": 1,
        "management_url": "example",
        "name": "example",
        "payment_method": {
          "brand": "example",
          "exp_month": 1,
          "exp_year": 1,
          "last4": "example",
          "type": "example"
        },
        "subscription": {
          "canceled_at": "2026-10-01T12:00:00Z",
          "current_period_end": "2026-10-01T12:00:00Z",
          "current_period_start": "2026-10-01T12:00:00Z",
          "ended_at": "2026-10-01T12:00:00Z",
          "expires_at": "2026-10-01T12:00:00Z",
          "first_payment_attempt": "2026-10-01T12:00:00Z",
          "id": 1,
          "next_payment_attempt": "2026-10-01T12:00:00Z",
          "plan": {
            "amount": 1,
            "amount_description": "example",
            "currency": "example",
            "id": 1,
            "interval": "example",
            "interval_count": 1,
            "plan_reference": "example"
          },
          "start": "2026-10-01T12:00:00Z",
          "status": "active",
          "subscription_reference": "example",
          "trial_end": "2026-10-01T12:00:00Z",
          "trial_period_days": 1,
          "trial_start": "2026-10-01T12:00:00Z"
        }
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### List payments

List payments

**Inputs**

- Count (`count`, number): Number of rows to return. From 1 to 100.
- Offset (`offset`, number): Starting position of the result set. At least 0.
- Form (`form_id`, number): The associated MoonClerk form ID.
- Customer (`customer_id`, number): The associated MoonClerk customer ID.
- Date from (`date_from`, date and time): Payments charged on or after this date.
- Date to (`date_to`, date and time): Payments charged on or before this date.
- Status (`status`, text): Payment status. One of: `successful`, `refunded`, `failed`.

**Outputs**: Value.

- `data` (object): The API response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value, or empty at the end.

**Example output**

```json
{
  "data": {
    "payments": [
      {
        "amount": 1,
        "amount_description": "example",
        "amount_refunded": 1,
        "charge_reference": "example",
        "checkout": {
          "amount_due": 1,
          "coupon_amount": 1,
          "coupon_code": "example",
          "date": "2026-10-01T12:00:00Z",
          "fee": 1,
          "subtotal": 1,
          "token": "example",
          "total": 1,
          "trial_period_days": 1,
          "upfront_amount": 1
        },
        "coupon": {
          "amount_off": 1,
          "code": "example",
          "currency": "example",
          "duration": "example",
          "duration_in_months": 1,
          "max_redemptions": 1,
          "percent_off": 1,
          "redeem_by": "2026-10-01T12:00:00Z"
        },
        "currency": "example",
        "custom_fields": {},
        "custom_id": "example",
        "customer_id": 1,
        "customer_reference": "example",
        "date": "2026-10-01T12:00:00Z",
        "email": "example",
        "fee": 1,
        "form_id": 1,
        "id": 1,
        "invoice_reference": "example",
        "name": "example",
        "payment_method": {
          "brand": "example",
          "exp_month": 1,
          "exp_year": 1,
          "last4": "example",
          "type": "example"
        },
        "status": "successful"
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```
