New to Corsair? See API access, authentication, and error handling.
Customers
get
customers.get
Get a customer and subscription
Risk: read
await corsair.moonclerk.api.customers.get({});
| Name | Type | Required | Description |
|---|---|---|---|
id | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
customer | object | Yes | — |
customer full type
customer full type
{
id?: number | null,
account_balance?: number | null,
name?: string | null,
email?: string | null,
payment_method?: {
type?: string | null,
last4?: string | null,
exp_month?: number | null,
exp_year?: number | null,
brand?: string | null
} | null,
custom_id?: string | null,
customer_reference?: string | null,
discount?: {
coupon?: {
code?: string | null,
duration?: string | null,
amount_off?: number | null,
currency?: string | null,
percent_off?: number | null,
duration_in_months?: number | null,
max_redemptions?: number | null,
redeem_by?: string | null
} | null,
starts_at?: string | null,
ends_at?: string | null
} | null,
delinquent?: boolean | null,
management_url?: string | null,
custom_fields?: Record<string, {
id?: number | null,
type?: string | null,
response?: string | number | boolean | null | {
line1?: string | null,
line2?: string | null,
city?: string | null,
state?: string | null,
postal_code?: string | null,
country?: string | null
} | null
}> | null,
form_id?: number | null,
checkout?: {
amount_due?: number | null,
coupon_amount?: number | null,
coupon_code?: string | null,
date?: string | null,
fee?: number | null,
subtotal?: number | null,
token?: string | null,
total?: number | null,
trial_period_days?: number | null,
upfront_amount?: number | null
} | null,
subscription?: {
id?: number | null,
subscription_reference?: string | null,
status?: active | canceled | expired | past_due | pending | unpaid | string | null,
start?: string | null,
first_payment_attempt?: string | null,
next_payment_attempt?: string | null,
current_period_start?: string | null,
current_period_end?: string | null,
trial_start?: string | null,
trial_end?: string | null,
trial_period_days?: number | null,
expires_at?: string | null,
canceled_at?: string | null,
ended_at?: string | null,
plan?: {
id?: number | null,
plan_reference?: string | null,
amount?: number | null,
amount_description?: string | null,
currency?: string | null,
interval?: string | null,
interval_count?: number | null
} | null
} | null
}
list
customers.list
List customers and subscriptions
Risk: read
await corsair.moonclerk.api.customers.list({});
| Name | Type | Required | Description |
|---|---|---|---|
count | number | No | — |
offset | number | No | — |
form_id | number | No | — |
checkout_from | string | No | — |
checkout_to | string | No | — |
next_payment_from | string | No | — |
next_payment_to | string | No | — |
status | active | canceled | expired | past_due | pending | unpaid | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
customers | object[] | Yes | — |
customers full type
customers full type
{
id?: number | null,
account_balance?: number | null,
name?: string | null,
email?: string | null,
payment_method?: {
type?: string | null,
last4?: string | null,
exp_month?: number | null,
exp_year?: number | null,
brand?: string | null
} | null,
custom_id?: string | null,
customer_reference?: string | null,
discount?: {
coupon?: {
code?: string | null,
duration?: string | null,
amount_off?: number | null,
currency?: string | null,
percent_off?: number | null,
duration_in_months?: number | null,
max_redemptions?: number | null,
redeem_by?: string | null
} | null,
starts_at?: string | null,
ends_at?: string | null
} | null,
delinquent?: boolean | null,
management_url?: string | null,
custom_fields?: Record<string, {
id?: number | null,
type?: string | null,
response?: string | number | boolean | null | {
line1?: string | null,
line2?: string | null,
city?: string | null,
state?: string | null,
postal_code?: string | null,
country?: string | null
} | null
}> | null,
form_id?: number | null,
checkout?: {
amount_due?: number | null,
coupon_amount?: number | null,
coupon_code?: string | null,
date?: string | null,
fee?: number | null,
subtotal?: number | null,
token?: string | null,
total?: number | null,
trial_period_days?: number | null,
upfront_amount?: number | null
} | null,
subscription?: {
id?: number | null,
subscription_reference?: string | null,
status?: active | canceled | expired | past_due | pending | unpaid | string | null,
start?: string | null,
first_payment_attempt?: string | null,
next_payment_attempt?: string | null,
current_period_start?: string | null,
current_period_end?: string | null,
trial_start?: string | null,
trial_end?: string | null,
trial_period_days?: number | null,
expires_at?: string | null,
canceled_at?: string | null,
ended_at?: string | null,
plan?: {
id?: number | null,
plan_reference?: string | null,
amount?: number | null,
amount_description?: string | null,
currency?: string | null,
interval?: string | null,
interval_count?: number | null
} | null
} | null
}[]
Forms
get
forms.get
Get a payment form
Risk: read
await corsair.moonclerk.api.forms.get({});
| Name | Type | Required | Description |
|---|---|---|---|
id | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
form | object | Yes | — |
form full type
form full type
{
id?: number | null,
title?: string | null,
access_token?: string | null,
currency?: string | null,
payment_volume?: number | null,
successful_checkout_count?: number | null,
created_at?: string | null,
updated_at?: string | null
}
list
forms.list
List payment forms
Risk: read
await corsair.moonclerk.api.forms.list({});
| Name | Type | Required | Description |
|---|---|---|---|
count | number | No | — |
offset | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
forms | object[] | Yes | — |
forms full type
forms full type
{
id?: number | null,
title?: string | null,
access_token?: string | null,
currency?: string | null,
payment_volume?: number | null,
successful_checkout_count?: number | null,
created_at?: string | null,
updated_at?: string | null
}[]
Payments
get
payments.get
Get a payment
Risk: read
await corsair.moonclerk.api.payments.get({});
| Name | Type | Required | Description |
|---|---|---|---|
id | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
payment | object | Yes | — |
payment full type
payment full type
{
id?: number | null,
date?: string | null,
status?: successful | refunded | failed | string | null,
currency?: string | null,
amount?: number | null,
fee?: number | null,
amount_refunded?: number | null,
amount_description?: string | null,
name?: string | null,
email?: string | null,
payment_method?: {
type?: string | null,
last4?: string | null,
exp_month?: number | null,
exp_year?: number | null,
brand?: string | null
} | null,
charge_reference?: string | null,
customer_id?: number | null,
customer_reference?: string | null,
invoice_reference?: string | null,
custom_fields?: Record<string, {
id?: number | null,
type?: string | null,
response?: string | number | boolean | null | {
line1?: string | null,
line2?: string | null,
city?: string | null,
state?: string | null,
postal_code?: string | null,
country?: string | null
} | null
}> | null,
form_id?: number | null,
custom_id?: string | null,
checkout?: {
amount_due?: number | null,
coupon_amount?: number | null,
coupon_code?: string | null,
date?: string | null,
fee?: number | null,
subtotal?: number | null,
token?: string | null,
total?: number | null,
trial_period_days?: number | null,
upfront_amount?: number | null
} | null,
coupon?: {
code?: string | null,
duration?: string | null,
amount_off?: number | null,
currency?: string | null,
percent_off?: number | null,
duration_in_months?: number | null,
max_redemptions?: number | null,
redeem_by?: string | null
} | null
}
list
payments.list
List payments
Risk: read
await corsair.moonclerk.api.payments.list({});
| Name | Type | Required | Description |
|---|---|---|---|
count | number | No | — |
offset | number | No | — |
form_id | number | No | — |
customer_id | number | No | — |
date_from | string | No | — |
date_to | string | No | — |
status | successful | refunded | failed | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
payments | object[] | Yes | — |
payments full type
payments full type
{
id?: number | null,
date?: string | null,
status?: successful | refunded | failed | string | null,
currency?: string | null,
amount?: number | null,
fee?: number | null,
amount_refunded?: number | null,
amount_description?: string | null,
name?: string | null,
email?: string | null,
payment_method?: {
type?: string | null,
last4?: string | null,
exp_month?: number | null,
exp_year?: number | null,
brand?: string | null
} | null,
charge_reference?: string | null,
customer_id?: number | null,
customer_reference?: string | null,
invoice_reference?: string | null,
custom_fields?: Record<string, {
id?: number | null,
type?: string | null,
response?: string | number | boolean | null | {
line1?: string | null,
line2?: string | null,
city?: string | null,
state?: string | null,
postal_code?: string | null,
country?: string | null
} | null
}> | null,
form_id?: number | null,
custom_id?: string | null,
checkout?: {
amount_due?: number | null,
coupon_amount?: number | null,
coupon_code?: string | null,
date?: string | null,
fee?: number | null,
subtotal?: number | null,
token?: string | null,
total?: number | null,
trial_period_days?: number | null,
upfront_amount?: number | null
} | null,
coupon?: {
code?: string | null,
duration?: string | null,
amount_off?: number | null,
currency?: string | null,
percent_off?: number | null,
duration_in_months?: number | null,
max_redemptions?: number | null,
redeem_by?: string | null
} | null
}[]