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} {user_id}
Returns an invoice by an id
ns-payment invoice get {id}
Creates a new invoice
ns-payment invoice create
--product_id (String)
--transaction_id (Integer)
--subscription_id (String)
--title (String)
--refund (Boolean)
--currency (String)
--description (String)
--invoice_items (Array)
--invoice_costs (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} {user_id}
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} {user_id}
Returns a payment by an id
ns-payment payment get {id}
Returns the sales item list
ns-payment salesitem list {filters} {page} {size} {sorts} {user_id}
Returns a sales item by an id
ns-payment salesitem get {id}
Returns the subscription paid list
ns-payment subscriptionpaid list {filters} {page} {size} {sorts} {user_id}
Returns a subscription paid by an id
ns-payment subscriptionpaid get {id}
Returns the subscription paid list
ns-payment subscriptionpaid listof {user_id} {sales_item_id}
Returns the subscription category list
ns-payment subscriptioncategory list {filters} {page} {size} {sorts} {user_id}
Returns a subscription category by id.
ns-payment subscriptioncategory get {id}
Creates a new subscription category for an entity
ns-payment subscriptioncategory create {entity_id}
--category_id (String)
Deletes a subscription category by an id.
ns-payment subscriptioncategory delete {entity_id} {id}
Returns the subscription field list
ns-payment subscriptionfield list {filters} {page} {size} {sorts} {user_id}
Returns a subscription field by id.
ns-payment subscriptionfield get {id}
Creates a new subscription field for an entity
ns-payment subscriptionfield create {entity_id}
--field_id (String)
--value (String)
Updates a subscription field by an id for an entity
ns-payment subscriptionfield update {entity_id} {id}
--field_id (String)
--value (String)
Deletes a subscription field by an id.
ns-payment subscriptionfield delete {entity_id} {id}
Returns the subscription tag list
ns-payment subscriptiontag list {filters} {page} {size} {sorts} {user_id}
Returns a subscription tag by id.
ns-payment subscriptiontag get {id}
Creates a new subscription tag for an entity
ns-payment subscriptiontag create {entity_id}
--name (String)
--value (String)
Updates a subscription tag by an id for an entity
ns-payment subscriptiontag update {entity_id} {id}
--name (String)
--value (String)
Deletes a subscription tag by an id.
ns-payment subscriptiontag delete {entity_id} {id}
Returns the subscription list
ns-payment subscription list {filters} {page} {size} {sorts} {user_id}
Returns a subscription by an id
ns-payment subscription get {id}
Cancels a subscription by an id
ns-payment subscription cancel {id} {reason}
Checkouts to a subscription
ns-payment subscription checkout
--gateway (Enum)
--sales_item_id (String)
--offer_id (String)
--success_url (String)
--cancel_url (String)
Returns the product list
ns-payment product list {filters} {page} {size} {sorts} {user_id}
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": "Integer",      "required": false    },    "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    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "total": {      "type": "Integer",      "required": true    },    "total_cost": {      "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    },    "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": "Integer",      "required": false    },    "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    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "total": {      "type": "Integer",      "required": true    },    "total_cost": {      "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    },    "description": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    },    "invoice_items": {      "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            },            "name": {              "type": "String",              "required": true,              "max": 255            },            "quantity": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            },            "price": {              "type": "Integer",              "required": false            }          }        }      ]    },    "invoice_costs": {      "type": "Array",      "required": true,      "items": [        {          "name": "InvoiceCostInput",          "type": "Object",          "required": true,          "fields": {            "type": {              "name": "InvoiceCostType",              "type": "Enum",              "required": false,              "valids": [                "Discount",                "Tax"              ]            },            "amount": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            }          }        }      ]    },    "total_tax": {      "type": "Integer",      "required": true    },    "total_discount": {      "type": "Integer",      "required": true    }  }}
{  "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    },    "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": [        "Discount",        "Tax"      ]    },    "amount": {      "type": "Integer",      "required": true    },    "description": {      "type": "String",      "required": false    }  }}
{  "name": "InvoiceInput",  "type": "Object",  "required": true,  "fields": {    "product_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "transaction_id": {      "type": "Integer",      "required": false    },    "subscription_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "title": {      "type": "String",      "required": true,      "max": 255    },    "refund": {      "type": "Boolean",      "required": true    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "description": {      "type": "String",      "required": false    },    "invoice_items": {      "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            },            "name": {              "type": "String",              "required": true,              "max": 255            },            "quantity": {              "type": "Integer",              "required": true            },            "description": {              "type": "String",              "required": false            },            "price": {              "type": "Integer",              "required": false            }          }        }      ]    },    "invoice_costs": {      "type": "Array",      "required": true,      "items": [        {          "name": "InvoiceCostInput",          "type": "Object",          "required": true,          "fields": {            "type": {              "name": "InvoiceCostType",              "type": "Enum",              "required": false,              "valids": [                "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    },    "subscription_duration_unit": {      "name": "OfferSubscriptionDurationUnit",      "type": "Enum",      "required": true,      "valids": [        "Day",        "Week",        "Month",        "Year"      ]    },    "subscription_duration_value": {      "type": "Integer",      "required": true    },    "applies_at": {      "type": "DateTime",      "required": false    },    "expires_at": {      "type": "DateTime",      "required": false    },    "currency": {      "type": "String",      "required": false,      "max": 255    },    "orginal_price": {      "type": "Float",      "required": false    },    "final_price": {      "type": "Float",      "required": false    },    "recommended": {      "type": "Boolean",      "required": true    },    "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": "Integer",      "required": false    },    "invoice_id": {      "type": "String",      "required": false,      "min": 20,      "max": 20    },    "subscription_id": {      "type": "Integer",      "required": false    },    "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"      ]    },    "currency": {      "type": "String",      "required": true,      "max": 255    },    "amount": {      "type": "Integer",      "required": true    },    "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    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "slug": {      "type": "String",      "required": true,      "max": 255    },    "logo": {      "type": "String",      "required": true,      "max": 255    },    "method": {      "name": "SalesItemMethod",      "type": "Enum",      "required": true,      "valids": [        "OneTime",        "Subscription",        "Metered"      ]    },    "onetime_consumable": {      "type": "Boolean",      "required": true    },    "onetime_expire_unit": {      "name": "SalesItemOnetimeExpireUnit",      "type": "Enum",      "required": true,      "valids": [        "None",        "Day",        "Week",        "Month",        "Year"      ]    },    "onetime_expire_value": {      "type": "Integer",      "required": true    },    "onetime_limit_unit": {      "name": "SalesItemOnetimeLimitUnit",      "type": "Enum",      "required": true,      "valids": [        "None",        "Day",        "Week",        "Month",        "Year"      ]    },    "onetime_limit_value": {      "type": "Integer",      "required": true    },    "onetime_limit_count": {      "type": "String",      "required": true,      "max": 255    },    "currency": {      "type": "String",      "required": false,      "max": 255    },    "orginal_price": {      "type": "Float",      "required": false    },    "final_price": {      "type": "Float",      "required": false    },    "description": {      "type": "String",      "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": "SubscriptionCategory",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityCategoryInput",  "type": "Object",  "required": true,  "fields": {    "category_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    }  }}
{  "name": "SubscriptionField",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "value": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityFieldInput",  "type": "Object",  "required": true,  "fields": {    "field_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "value": {      "type": "String",      "required": false    }  }}
{  "name": "SubscriptionTag",  "type": "Object",  "required": true,  "fields": {    "id": {      "type": "Integer",      "required": true    },    "user_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "entity_id": {      "type": "String",      "required": true,      "min": 20,      "max": 20    },    "name": {      "type": "String",      "required": true,      "max": 255    },    "value": {      "type": "String",      "required": false    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "EntityTagInput",  "type": "Object",  "required": true,  "fields": {    "name": {      "type": "String",      "required": true,      "max": 255    },    "value": {      "type": "String",      "required": false    }  }}
{  "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    },    "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"      ]    },    "reason": {      "type": "String",      "required": false,      "max": 255    },    "description": {      "type": "String",      "required": true    },    "created_at": {      "type": "DateTime",      "required": true    },    "updated_at": {      "type": "DateTime",      "required": true    }  }}
{  "name": "SubscrpitionFull",  "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    },    "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"      ]    },    "reason": {      "type": "String",      "required": false,      "max": 255    },    "description": {      "type": "String",      "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    }  }}
Discount
Tax
Day
Week
Month
Year
Stripe
Stripe
Incomplete
Canceled
Succeeded
Failed
OneTime
Subscription
Metered
None
Day
Week
Month
Year
None
Day
Week
Month
Year
Stripe
Active
Canceled
Incomplete
IncompleteExpired
PastDue
Paused
Trialing
Unpaid
©Copyright 2010 to 2025 Namira Software Corporation. All rights reserved.