To use this cli, we need to first Install Nodejs, then run the following command.
npm i -g namirasoft-payment-api-v1
Returns the application health status
ns-payment healthz get
Returns the value list of a given table and column
ns-payment value list {table} {column} {search} {field_id} {limit}
Returns the invoice list
ns-payment invoice list {filters} {page} {size} {sorts}
Returns an invoice by an id
ns-payment invoice get {id}
Creates a new invoice
ns-payment invoice _create
--product_id (String)
--subscription_id (String)
--title (String)
--currency (String)
--description (String)
--invoice_item (Array)
--invoice_cost (Array)
Deletes an invoice by an id
ns-payment invoice _delete {id}
Cancels an invoice by an id
ns-payment invoice cancel {id}
Returns the offer list
ns-payment offer list {filters} {page} {size} {sorts}
Returns an offer by an id
ns-payment offer get {id}
Creates a onetime checkout
ns-payment onetime checkout {invoice_id}
--gateway (Enum)
--amount (Integer)
--success_url (String)
--cancel_url (String)
Returns the payment list
ns-payment payment list {filters} {page} {size} {sorts}
Returns a payment by an id
ns-payment payment get {id}
Returns the sales item list
ns-payment salesitem list {filters} {page} {size} {sorts}
Returns a sales item by an id
ns-payment salesitem get {id}
Returns the subscription cancellation reason list
ns-payment subscriptioncancellationreason list {filters} {page} {size} {sorts}
Returns a subscription cancellation reason by an id
ns-payment subscriptioncancellationreason get {id}
Returns the subscription item list
ns-payment subscriptionitem list {filters} {page} {size} {sorts}
Returns the subscription paid list
ns-payment subscriptionpaid list {filters} {page} {size} {sorts}
Returns a subscription paid by an id
ns-payment subscriptionpaid get {id}
Returns the subscription paid list for a user_id
ns-payment subscriptionpaid _listfor {user_id} {sales_item_id}
Accept a cancellation offer for a subscription
ns-payment subscription acceptcancellationoffer {id} {reason_id}
--gateway (Enum)
--success_url (String)
--cancel_url (String)
Cancels a subscription by an id
ns-payment subscription cancel {id}
--cancellation_reason_id (String)
--cancellation_explaination (String)
Checkouts an offer for subscription
ns-payment subscription checkoutoffer {offer_id}
--gateway (Enum)
--success_url (String)
--cancel_url (String)
Returns the subscription list
ns-payment subscription list {filters} {page} {size} {sorts}
Returns the cancellation offer of a subscription by an id for a reason
ns-payment subscription getcancellationoffer {id} {reason_id}
Returns a subscription by an id
ns-payment subscription get {id}
Returns the product list
ns-payment product list {filters} {page} {size} {sorts}
Returns a product by an id
ns-payment product get {id}
{  "name": "Invoice",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id_reversed": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "subscription_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "title": {      "type": "String",      "required": true,      "max": 255    },    "refund": {      "type": "Boolean",      "required": true    },    "canceled": {      "type": "Boolean",      "required": true    },    "total": {      "type": "Integer",      "required": true    },    "total_fee": {      "type": "Integer",      "required": true    },    "total_discount": {      "type": "Integer",      "required": true    },    "total_tax": {      "type": "Integer",      "required": true    },    "total_payable": {      "type": "Integer",      "required": true    },    "total_paid": {      "type": "Integer",      "required": true    },    "total_refunded": {      "type": "Integer",      "required": true    },    "total_balance": {      "type": "Integer",      "required": true    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "InvoiceFull",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id_reversed": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "subscription_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "title": {      "type": "String",      "required": true,      "max": 255    },    "refund": {      "type": "Boolean",      "required": true    },    "canceled": {      "type": "Boolean",      "required": true    },    "total": {      "type": "Integer",      "required": true    },    "total_fee": {      "type": "Integer",      "required": true    },    "total_discount": {      "type": "Integer",      "required": true    },    "total_tax": {      "type": "Integer",      "required": true    },    "total_payable": {      "type": "Integer",      "required": true    },    "total_paid": {      "type": "Integer",      "required": true    },    "total_refunded": {      "type": "Integer",      "required": true    },    "total_balance": {      "type": "Integer",      "required": true    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "invoice_item": {      "type": "Array",      "required": true,      "items": [        {          "name": "InvoiceItem",          "type": "Object",          "required": true,          "fields": {            "id": {              "type": "Integer",              "required": true            },            "invoice_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "sales_item_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "offer_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "offer_item_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "transaction_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "transaction_id_reversed": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "transaction_id_expiry": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "name": {              "type": "String",              "required": true,              "max": 255            },            "quantity": {              "type": "Integer",              "required": true            },            "price": {              "type": "Integer",              "required": false            },            "total": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            },            "created_at": {              "type": "DateTime",              "required": true            },            "updated_at": {              "type": "DateTime",              "required": true            }          }        }      ]    },    "invoice_cost": {      "type": "Array",      "required": true,      "items": [        {          "name": "InvoiceCost",          "type": "Object",          "required": true,          "fields": {            "id": {              "type": "Integer",              "required": true            },            "invoice_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "type": {              "name": "InvoiceCostType",              "type": "Enum",              "required": false,              "valids": [                "Fee",                "Discount",                "Tax"              ]            },            "amount": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            },            "created_at": {              "type": "DateTime",              "required": true            },            "updated_at": {              "type": "DateTime",              "required": true            }          }        }      ]    }  }}
{  "name": "InvoiceItem",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "invoice_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "offer_item_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id_reversed": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id_expiry": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "quantity": {      "type": "Integer",      "required": true    },    "price": {      "type": "Integer",      "required": false    },    "total": {      "type": "Integer",      "required": true    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "InvoiceCost",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "invoice_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "type": {      "name": "InvoiceCostType",      "type": "Enum",      "required": false,      "valids": [        "Fee",        "Discount",        "Tax"      ]    },    "amount": {      "type": "Integer",      "required": true    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "InvoiceInput",  "type": "Object",  "required": true,  "fields": {    "product_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "subscription_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "title": {      "type": "String",      "required": true,      "max": 255    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "invoice_item": {      "type": "Array",      "required": true,      "items": [        {          "name": "InvoiceItemInput",          "type": "Object",          "required": true,          "fields": {            "sales_item_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "offer_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "offer_item_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "name": {              "type": "String",              "required": true,              "max": 255            },            "quantity": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            },            "price": {              "type": "Integer",              "required": false            }          }        }      ]    },    "invoice_cost": {      "type": "Array",      "required": true,      "items": [        {          "name": "InvoiceCostInput",          "type": "Object",          "required": true,          "fields": {            "type": {              "name": "InvoiceCostType",              "type": "Enum",              "required": false,              "valids": [                "Fee",                "Discount",                "Tax"              ]            },            "amount": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            }          }        }      ]    }  }}
{  "name": "InvoiceItemInput",  "type": "Object",  "required": true,  "fields": {    "sales_item_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "offer_item_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "quantity": {      "type": "Integer",      "required": true    },    "description": {      "type": "String",      "required": false    },    "price": {      "type": "Integer",      "required": false    }  }}
{  "name": "InvoiceCostInput",  "type": "Object",  "required": true,  "fields": {    "type": {      "name": "InvoiceCostType",      "type": "Enum",      "required": false,      "valids": [        "Fee",        "Discount",        "Tax"      ]    },    "amount": {      "type": "Integer",      "required": true    },    "description": {      "type": "String",      "required": false    }  }}
{  "name": "Offer",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "logo": {      "type": "String",      "required": false,      "max": 255    },    "order": {      "type": "Integer",      "required": true    },    "recurring": {      "type": "Integer",      "required": true    },    "recurring_duration_value": {      "type": "Integer",      "required": false    },    "recurring_duration_unit": {      "name": "OfferRecurringDurationUnit",      "type": "Enum",      "required": false,      "valids": [        "Day",        "Week",        "Month",        "Year"      ]    },    "applies_at": {      "type": "DateTime",      "required": false    },    "expires_at": {      "type": "DateTime",      "required": false    },    "recommended": {      "type": "Boolean",      "required": true    },    "features": {      "type": "String",      "required": true    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "OfferItem",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "logo": {      "type": "String",      "required": false,      "max": 255    },    "order": {      "type": "Integer",      "required": true    },    "dominant": {      "type": "Boolean",      "required": true    },    "consumable": {      "type": "Boolean",      "required": true    },    "consumable_asset_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "expire_value": {      "type": "Integer",      "required": false    },    "expire_unit": {      "name": "OfferItemExpireUnit",      "type": "Enum",      "required": false,      "valids": [        "None",        "Day",        "Week",        "Month",        "Year"      ]    },    "type": {      "name": "OfferItemType",      "type": "Enum",      "required": true,      "valids": [        "OneOff",        "Recurring"      ]    },    "one_off_model": {      "name": "OfferItemOneOffModel",      "type": "Enum",      "required": false,      "valids": [        "Flat",        "Package",        "Choosable"      ]    },    "one_off_flat_amount": {      "type": "Integer",      "required": false    },    "one_off_package_amount": {      "type": "Integer",      "required": false    },    "one_off_package_ceiling_value": {      "type": "Integer",      "required": false    },    "one_off_package_ceiling_unit": {      "type": "String",      "required": false,      "max": 255    },    "one_off_choosable_on_gateway": {      "type": "Boolean",      "required": false    },    "one_off_choosable_suggested_amount": {      "type": "Integer",      "required": false    },    "one_off_choosable_limit_min": {      "type": "Integer",      "required": false    },    "one_off_choosable_limit_max": {      "type": "Integer",      "required": false    },    "recurring_model": {      "name": "OfferItemRecurringModel",      "type": "Enum",      "required": false,      "valids": [        "Flat",        "Package",        "Tiered",        "Usage"      ]    },    "recurring_duration_value": {      "type": "Integer",      "required": false    },    "recurring_duration_unit": {      "name": "OfferItemRecurringDurationUnit",      "type": "Enum",      "required": false,      "valids": [        "Day",        "Week",        "Month",        "Year"      ]    },    "recurring_flat_amount": {      "type": "Integer",      "required": false    },    "recurring_package_amount": {      "type": "Integer",      "required": false    },    "recurring_package_ceiling_value": {      "type": "Integer",      "required": false    },    "recurring_package_ceiling_unit": {      "type": "String",      "required": false,      "max": 255    },    "recurring_tiered_type": {      "name": "OfferItemRecurringTieredType",      "type": "Enum",      "required": false,      "valids": [        "Volume",        "Graduated"      ]    },    "recurring_tiered_amounts": {      "type": "Any",      "required": false    },    "recurring_usage_type": {      "name": "OfferItemRecurringUsageType",      "type": "Enum",      "required": false,      "valids": [        "Unit",        "Package",        "Tiered"      ]    },    "recurring_usage_name": {      "type": "String",      "required": false,      "max": 255    },    "recurring_usage_duration": {      "type": "String",      "required": false,      "max": 255    },    "recurring_usage_unit_amount": {      "type": "Integer",      "required": false    },    "recurring_usage_package_amount": {      "type": "Integer",      "required": false    },    "recurring_usage_package_ceiling_value": {      "type": "Integer",      "required": false    },    "recurring_usage_package_ceiling_unit": {      "type": "String",      "required": false,      "max": 255    },    "recurring_usage_tiered_type": {      "name": "OfferItemRecurringUsageTieredType",      "type": "Enum",      "required": false,      "valids": [        "Volume",        "Graduated"      ]    },    "recurring_usage_tiered_amounts": {      "type": "Any",      "required": false    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "was_price": {      "type": "String",      "required": false,      "max": 255    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "Subscription",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "gateway": {      "name": "SubscriptionGateway",      "type": "Enum",      "required": true,      "valids": [        "Stripe"      ]    },    "status": {      "name": "SubscriptionStatus",      "type": "Enum",      "required": true,      "valids": [        "Active",        "Canceled",        "Incomplete",        "IncompleteExpired",        "PastDue",        "Paused",        "Trialing",        "Unpaid"      ]    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "OfferFull",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "logo": {      "type": "String",      "required": false,      "max": 255    },    "order": {      "type": "Integer",      "required": true    },    "recurring": {      "type": "Integer",      "required": true    },    "recurring_duration_value": {      "type": "Integer",      "required": false    },    "recurring_duration_unit": {      "name": "OfferRecurringDurationUnit",      "type": "Enum",      "required": false,      "valids": [        "Day",        "Week",        "Month",        "Year"      ]    },    "applies_at": {      "type": "DateTime",      "required": false    },    "expires_at": {      "type": "DateTime",      "required": false    },    "recommended": {      "type": "Boolean",      "required": true    },    "features": {      "type": "String",      "required": true    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "offer_item": {      "type": "Array",      "required": true,      "items": [        {          "name": "OfferItem",          "type": "Object",          "required": true,          "fields": {            "id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "product_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "sales_item_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "offer_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "name": {              "type": "String",              "required": true,              "max": 255            },            "logo": {              "type": "String",              "required": false,              "max": 255            },            "order": {              "type": "Integer",              "required": true            },            "dominant": {              "type": "Boolean",              "required": true            },            "consumable": {              "type": "Boolean",              "required": true            },            "consumable_asset_id": {              "type": "String",              "required": false,              "min": 20,              "max": 20            },            "expire_value": {              "type": "Integer",              "required": false            },            "expire_unit": {              "name": "OfferItemExpireUnit",              "type": "Enum",              "required": false,              "valids": [                "None",                "Day",                "Week",                "Month",                "Year"              ]            },            "type": {              "name": "OfferItemType",              "type": "Enum",              "required": true,              "valids": [                "OneOff",                "Recurring"              ]            },            "one_off_model": {              "name": "OfferItemOneOffModel",              "type": "Enum",              "required": false,              "valids": [                "Flat",                "Package",                "Choosable"              ]            },            "one_off_flat_amount": {              "type": "Integer",              "required": false            },            "one_off_package_amount": {              "type": "Integer",              "required": false            },            "one_off_package_ceiling_value": {              "type": "Integer",              "required": false            },            "one_off_package_ceiling_unit": {              "type": "String",              "required": false,              "max": 255            },            "one_off_choosable_on_gateway": {              "type": "Boolean",              "required": false            },            "one_off_choosable_suggested_amount": {              "type": "Integer",              "required": false            },            "one_off_choosable_limit_min": {              "type": "Integer",              "required": false            },            "one_off_choosable_limit_max": {              "type": "Integer",              "required": false            },            "recurring_model": {              "name": "OfferItemRecurringModel",              "type": "Enum",              "required": false,              "valids": [                "Flat",                "Package",                "Tiered",                "Usage"              ]            },            "recurring_duration_value": {              "type": "Integer",              "required": false            },            "recurring_duration_unit": {              "name": "OfferItemRecurringDurationUnit",              "type": "Enum",              "required": false,              "valids": [                "Day",                "Week",                "Month",                "Year"              ]            },            "recurring_flat_amount": {              "type": "Integer",              "required": false            },            "recurring_package_amount": {              "type": "Integer",              "required": false            },            "recurring_package_ceiling_value": {              "type": "Integer",              "required": false            },            "recurring_package_ceiling_unit": {              "type": "String",              "required": false,              "max": 255            },            "recurring_tiered_type": {              "name": "OfferItemRecurringTieredType",              "type": "Enum",              "required": false,              "valids": [                "Volume",                "Graduated"              ]            },            "recurring_tiered_amounts": {              "type": "Any",              "required": false            },            "recurring_usage_type": {              "name": "OfferItemRecurringUsageType",              "type": "Enum",              "required": false,              "valids": [                "Unit",                "Package",                "Tiered"              ]            },            "recurring_usage_name": {              "type": "String",              "required": false,              "max": 255            },            "recurring_usage_duration": {              "type": "String",              "required": false,              "max": 255            },            "recurring_usage_unit_amount": {              "type": "Integer",              "required": false            },            "recurring_usage_package_amount": {              "type": "Integer",              "required": false            },            "recurring_usage_package_ceiling_value": {              "type": "Integer",              "required": false            },            "recurring_usage_package_ceiling_unit": {              "type": "String",              "required": false,              "max": 255            },            "recurring_usage_tiered_type": {              "name": "OfferItemRecurringUsageTieredType",              "type": "Enum",              "required": false,              "valids": [                "Volume",                "Graduated"              ]            },            "recurring_usage_tiered_amounts": {              "type": "Any",              "required": false            },            "currency": {              "type": "String",              "required": true,              "max": 255            },            "was_price": {              "type": "String",              "required": false,              "max": 255            },            "description": {              "type": "String",              "required": true            },            "created_at": {              "type": "DateTime",              "required": true            },            "updated_at": {              "type": "DateTime",              "required": true            }          }        }      ]    },    "subscription": {      "name": "Subscription",      "type": "Object",      "required": true,      "fields": {        "id": {          "type": "String",          "required": true,          "min": 20,          "max": 20        },        "user_id": {          "type": "String",          "required": true,          "min": 20,          "max": 20        },        "product_id": {          "type": "String",          "required": true,          "min": 20,          "max": 20        },        "sales_item_id": {          "type": "String",          "required": true,          "min": 20,          "max": 20        },        "offer_id": {          "type": "String",          "required": true,          "min": 20,          "max": 20        },        "gateway": {          "name": "SubscriptionGateway",          "type": "Enum",          "required": true,          "valids": [            "Stripe"          ]        },        "status": {          "name": "SubscriptionStatus",          "type": "Enum",          "required": true,          "valids": [            "Active",            "Canceled",            "Incomplete",            "IncompleteExpired",            "PastDue",            "Paused",            "Trialing",            "Unpaid"          ]        },        "description": {          "type": "String",          "required": true        },        "created_at": {          "type": "DateTime",          "required": true        },        "updated_at": {          "type": "DateTime",          "required": true        }      }    }  }}
{  "name": "Payment",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id_reversed": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "invoice_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "subscription_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "gateway": {      "name": "PaymentGateway",      "type": "Enum",      "required": true,      "valids": [        "Stripe"      ]    },    "refund": {      "type": "Boolean",      "required": true    },    "status": {      "name": "PaymentStatus",      "type": "Enum",      "required": true,      "valids": [        "Incomplete",        "Canceled",        "Succeeded",        "Failed"      ]    },    "amount": {      "type": "Integer",      "required": true    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "SalesItem",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_group_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "slug": {      "type": "String",      "required": true,      "max": 255    },    "logo": {      "type": "String",      "required": true,      "max": 255    },    "order": {      "type": "Integer",      "required": true    },    "consumable": {      "type": "Boolean",      "required": true    },    "consumable_asset_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "expire_value": {      "type": "Integer",      "required": true    },    "expire_unit": {      "name": "SalesItemExpireUnit",      "type": "Enum",      "required": true,      "valids": [        "None",        "Day",        "Week",        "Month",        "Year"      ]    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "SubscriptionCancellationReason",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "type": {      "type": "String",      "required": true,      "max": 255    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "order": {      "type": "Integer",      "required": true    },    "needs_explaination": {      "type": "Boolean",      "required": true    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "SubscriptionItem",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "subscription_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "quantity": {      "type": "Integer",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "SubscriptionPaid",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "invoice_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "applies_at": {      "type": "DateTime",      "required": true    },    "expires_at": {      "type": "DateTime",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "SubscriptionFull",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "product_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "sales_item_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "offer_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "gateway": {      "name": "SubscriptionGateway",      "type": "Enum",      "required": true,      "valids": [        "Stripe"      ]    },    "status": {      "name": "SubscriptionStatus",      "type": "Enum",      "required": true,      "valids": [        "Active",        "Canceled",        "Incomplete",        "IncompleteExpired",        "PastDue",        "Paused",        "Trialing",        "Unpaid"      ]    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "subscription_item": {      "type": "Array",      "required": true,      "items": [        {          "name": "SubscriptionItem",          "type": "Object",          "required": true,          "fields": {            "id": {              "type": "Integer",              "required": true            },            "subscription_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "sales_item_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "offer_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "offer_item_id": {              "type": "String",              "required": true,              "min": 20,              "max": 20            },            "quantity": {              "type": "Integer",              "required": true            },            "created_at": {              "type": "DateTime",              "required": true            },            "updated_at": {              "type": "DateTime",              "required": true            }          }        }      ]    }  }}
{  "name": "Product",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "String",      "required": true,      "max": 255    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "slug": {      "type": "String",      "required": true,      "max": 255    },    "logo": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
Fee
Discount
Tax
Day
Week
Month
Year
None
Day
Week
Month
Year
OneOff
Recurring
Flat
Package
Choosable
Flat
Package
Tiered
Usage
Day
Week
Month
Year
Volume
Graduated
Unit
Package
Tiered
Volume
Graduated
Stripe
Active
Canceled
Incomplete
IncompleteExpired
PastDue
Paused
Trialing
Unpaid
Stripe
Stripe
Incomplete
Canceled
Succeeded
Failed
None
Day
Week
Month
Year
©Copyright 2010 to 2025 Namira Software Corporation. All rights reserved.