Admin API
Admin API documentation
Welcome to ChargX payment gateway Admin API documentation - set of methods for administrative purpose for your merchant account.
Before you start
Before you start, make sure:
- you have access to your ChargX account. If not, follow the Getting Started guide
- have Secret API Key.
To create a Secret API Key - follow the steps:
- Go to Dashboard, Settings → Secret API Keys.
- Create one and copy it.
- Store your secret key securely and never expose it in frontend code.
REST API endpoint
Basic URL: https://api.chargx.io/admin
Headers
The only mandatory header required for all types of requests is Authorization which should contain a value of Basic: Your-Secret-API-Key.
Create Product
Create a product.
Request:
POST https://api.chargx.io/admin/products
Headers:
Authorization=Basic sk_256c3fa9....t23f
content-type=application/json
Body:
{
title: "Enterprise Subscription",
options: [
{
title: "Plan",
values: ["S", "M", "L"],
},
],
variants: [
{
title: "S plan",
options: {
Plan: "S",
},
prices: [
{
currency_code: "USD",
amount: 600,
},
],
metadata: {
recurring_payment: {
unit: "days",
amount: "49",
length: "14",
trial_amount: "0",
total_occurrences: "12",
trial_occurrences: "0",
},
},
},
{
title: "M plan",
options: {
Plan: "M",
},
prices: [
{
currency_code: "USD",
amount: 900,
},
],
metadata: {
recurring_payment: {
unit: "days",
amount: "79",
length: "14",
trial_amount: "39",
total_occurrences: "10",
trial_occurrences: "1",
},
},
},
{
title: "L plan",
options: {
Plan: "L",
},
prices: [
{
currency_code: "USD",
amount: 1200,
},
],
metadata: {
recurring_payment: {
unit: "days",
amount: "99",
length: "30",
trial_amount: "59",
total_occurrences: "8",
trial_occurrences: "2",
},
},
},
],
}Response:
{
"product": {
"variants": [
{
"prices": [
{
"id": "string",
"title": "string",
"currency_code": "usd",
"amount": 0,
"raw_amount": {},
"min_quantity": 0,
"max_quantity": 0,
"price_set_id": "string",
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"deleted_at": "2025-08-24T14:15:22Z"
}
],
"id": "string",
"title": "string",
"sku": "string",
"barcode": "string",
"ean": "string",
"upc": "string",
"allow_backorder": true,
"manage_inventory": true,
"hs_code": "string",
"origin_country": "string",
"mid_code": "string",
"material": "string",
"weight": 0,
"length": 0,
"height": 0,
"width": 0,
"options": [
{"id": "string", "value": "string"}
],
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"deleted_at": "2025-08-24T14:15:22Z",
"images": [
{
"id": "string",
"url": "string",
"rank": 0
}
],
"thumbnail": "string",
"metadata": {
"recurring_payment": {
"unit": "days" | "months",
"amount": string,
"length": string,
"trial_amount": string,
"total_occurrences": string,
"trial_occurrences": string
}
}
}
],
"type": {
"id": "string",
"value": "string",
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z"
},
"length": 0,
"title": "string",
"status": "draft",
"options": [
{"id": "string", "title": "string"}
],
"description": "string",
"id": "string",
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"handle": "string",
"subtitle": "string",
"is_giftcard": true,
"thumbnail": "string",
"width": 0,
"weight": 0,
"height": 0,
"origin_country": "string",
"hs_code": "string",
"mid_code": "string",
"material": "string",
"collection_id": "string",
"type_id": "string",
"images": [
{"id": "string", "url": "string", "rank": 0}
],
"discountable": true,
"external_id": "string",
"deleted_at": "2025-08-24T14:15:22Z"
}
}List Products
List subscription products.
Request:
GET https://api.chargx.io/admin/products
Headers:
Authorization=Basic sk_256c3fa9....t23f
content-type=application/jsonQuery parameters:
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | ⚙️ Optional | Maximum number of products to return. Default: 50. |
offset | number | ⚙️ Optional | Number of products to skip before starting to collect the result set. Default: 0. |
q | string | ⚙️ Optional | Free‑text search over subscription product fields like title and description. |
status | string | ⚙️ Optional | Filter products by status, for example published or draft. |
expand | string | ⚙️ Optional | Comma‑separated list of relations to include, for example variants,images. |
fields | string | ⚙️ Optional | Comma‑separated list of fields to include in the response. |
Response:
{
"products": [
{
"id": "string",
"title": "string",
"subtitle": "string",
"description": "string",
"status": "string",
"options": [
{
"id": "string",
"title": "string"
}
],
"variants": [
{
"id": "string",
"title": "string",
"options": [
{
"id": "string",
"value": "string"
}
],
"prices": [
{
"id": "string",
"title": "string",
"currency_code": "usd",
"amount": 0,
"min_quantity": 0,
"max_quantity": 0
}
],
"metadata": {
"recurring_payment": {
"unit": "days" | "months",
"amount": string,
"length": string,
"trial_amount": string,
"total_occurrences": string,
"trial_occurrences": string
}
},
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z"
},
{
"id": "string",
"title": "string",
"options": [
{
"id": "string",
"value": "string"
}
],
"prices": [
{
"id": "string",
"title": "string",
"currency_code": "usd",
"amount": 0,
"min_quantity": 0,
"max_quantity": 0
}
],
"metadata": {
"recurring_payment": {
"unit": "days" | "months",
"amount": string,
"length": string,
"trial_amount": string,
"total_occurrences": string,
"trial_occurrences": string
}
},
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z"
},
{
"id": "string",
"title": "string",
"options": [
{
"id": "string",
"value": "string"
}
],
"prices": [
{
"id": "string",
"title": "string",
"currency_code": "usd",
"amount": 0,
"min_quantity": 0,
"max_quantity": 0
}
],
"metadata": {
"recurring_payment": {
"unit": "days" | "months",
"amount": string,
"length": string,
"trial_amount": string,
"total_occurrences": string,
"trial_occurrences": string
}
},
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z"
}
],
"collection_id": "string",
"type_id": "string",
"discountable": true,
"thumbnail": "string",
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"deleted_at": null
}
],
"count": 1,
"limit": 20,
"offset": 0
}List Orders
List orders.
Request:
GET https://api.chargx.io/admin/orders
Headers:
Authorization=Basic sk_256c3fa9....t23f
content-type=application/jsonQuery parameters:
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | ⚙️ Optional | Maximum number of orders to return. Default: 50. |
offset | number | ⚙️ Optional | Number of orders to skip before starting to collect the result set. Default: 0. |
q | string | ⚙️ Optional | Free‑text search over order fields like display_id and email. |
status | string | ⚙️ Optional | Filter orders by status, for example pending, completed, or canceled. |
payment_status | string | ⚙️ Optional | Filter orders by payment status, for example awaiting, captured, or refunded. |
fulfillment_status | string | ⚙️ Optional | Filter orders by fulfillment status, for example not_fulfilled, fulfilled, or partially_fulfilled. |
expand | string | ⚙️ Optional | Comma‑separated list of relations to include, for example items,customer,payments. |
fields | string | ⚙️ Optional | Comma‑separated list of fields to include in the response. |
Response:
{
"orders": [
{
"id": "string",
"display_id": 0,
"status": "string",
"version": 0,
"summary": {
"paid_total": 0,
"raw_paid_total": {
"value": "string",
"precision": 0
},
"refunded_total": 0,
"accounting_total": 0,
"credit_line_total": 0,
"transaction_total": 0,
"pending_difference": 0,
"raw_refunded_total": {
"value": "string",
"precision": 0
},
"current_order_total": 0,
"original_order_total": 0,
"raw_accounting_total": {
"value": "string",
"precision": 0
},
"raw_credit_line_total": {
"value": "string",
"precision": 0
},
"raw_transaction_total": {
"value": "string",
"precision": 0
},
"raw_pending_difference": {
"value": "string",
"precision": 0
},
"raw_current_order_total": {
"value": "string",
"precision": 0
},
"raw_original_order_total": {
"value": "string",
"precision": 0
}
},
"total": 0,
"metadata": {},
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"items": [
{
"id": "string",
"title": "string",
"subtitle": null,
"thumbnail": null,
"variant_id": null,
"product_id": null,
"product_title": null,
"product_description": null,
"product_subtitle": null,
"product_type": null,
"product_type_id": null,
"product_collection": null,
"product_handle": null,
"variant_sku": null,
"variant_barcode": null,
"variant_title": null,
"variant_option_values": null,
"requires_shipping": false,
"is_giftcard": false,
"is_discountable": true,
"is_tax_inclusive": false,
"is_custom_price": false,
"metadata": null,
"raw_compare_at_unit_price": null,
"raw_unit_price": {
"value": "string",
"precision": 0
},
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"deleted_at": null,
"tax_lines": [],
"adjustments": [],
"compare_at_unit_price": null,
"unit_price": 0,
"quantity": 0,
"raw_quantity": {
"value": "string",
"precision": 0
},
"detail": {
"id": "string",
"version": 0,
"metadata": null,
"order_id": "string",
"raw_unit_price": {
"value": "string",
"precision": 0
},
"raw_compare_at_unit_price": null,
"raw_quantity": {
"value": "string",
"precision": 0
},
"raw_fulfilled_quantity": {
"value": "string",
"precision": 0
},
"raw_delivered_quantity": {
"value": "string",
"precision": 0
},
"raw_shipped_quantity": {
"value": "string",
"precision": 0
},
"raw_return_requested_quantity": {
"value": "string",
"precision": 0
},
"raw_return_received_quantity": {
"value": "string",
"precision": 0
},
"raw_return_dismissed_quantity": {
"value": "string",
"precision": 0
},
"raw_written_off_quantity": {
"value": "string",
"precision": 0
},
"created_at": "2025-08-24T14:15:22Z",
"updated_at": "2025-08-24T14:15:22Z",
"deleted_at": null,
"item_id": "string",
"unit_price": 0,
"compare_at_unit_price": null,
"quantity": 0,
"fulfilled_quantity": 0,
"delivered_quantity": 0,
"shipped_quantity": 0,
"return_requested_quantity": 0,
"return_received_quantity": 0,
"return_dismissed_quantity": 0,
"written_off_quantity": 0
},
"subtotal": 0,
"total": 0,
"original_subtotal": 0,
"original_total": 0,
"discount_subtotal": 0,
"discount_tax_total": 0,
"discount_total": 0,
"tax_total": 0,
"original_tax_total": 0,
"refundable_total_per_unit": 0,
"refundable_total": 0,
"fulfilled_total": 0,
"shipped_total": 0,
"return_requested_total": 0,
"return_received_total": 0,
"return_dismissed_total": 0,
"write_off_total": 0,
"raw_subtotal": {
"value": "string",
"precision": 0
},
"raw_total": {
"value": "string",
"precision": 0
},
"raw_original_subtotal": {
"value": "string",
"precision": 0
},
"raw_original_total": {
"value": "string",
"precision": 0
},
"raw_discount_subtotal": {
"value": "string",
"precision": 0
},
"raw_discount_tax_total": {
"value": "string",
"precision": 0
},
"raw_discount_total": {
"value": "string",
"precision": 0
},
"raw_tax_total": {
"value": "string",
"precision": 0
},
"raw_original_tax_total": {
"value": "string",
"precision": 0
},
"raw_refundable_total_per_unit": {
"value": "string",
"precision": 0
},
"raw_refundable_total": {
"value": "string",
"precision": 0
},
"raw_fulfilled_total": {
"value": "string",
"precision": 0
},
"raw_shipped_total": {
"value": "string",
"precision": 0
},
"raw_return_requested_total": {
"value": "string",
"precision": 0
},
"raw_return_received_total": {
"value": "string",
"precision": 0
},
"raw_return_dismissed_total": {
"value": "string",
"precision": 0
},
"raw_write_off_total": {
"value": "string",
"precision": 0
}
}
],
"payment_status": "string",
"fulfillment_status": "string"
}
],
"count": 1,
"limit": 20,
"offset": 0
}Payout
Use this method to initiate payout.
Request:
POST https://api.chargx.io/admin/payout
Headers:
Authorization=Basic sk_256c3fa9....t23f
content-type=application/json
Body:
{
"amount": 10.05,
"bank_details": {
"bank_name": "Bank name",
"beneficiary_name": "John Doe",
"beneficiary_account_number": "12345678",
"branch_transit": "001",
"institution_number": "123",
"swift_code": "TST123",
"aba": "000111222",
"iban": "GB00TEST123456789",
"routing_code": "987654321"
}
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✅ Yes | Unique identifier for the bank record. |
bank_name | string | ✅ Yes | Name of the receiving bank. |
beneficiary_name | string | ✅ Yes | Name of the account holder receiving the funds. |
beneficiary_account_number | string | ⚙️ Optional | Account number of the beneficiary. |
branch_transit | string | ⚙️ Optional | Branch transit number (used in certain regions such as Canada). |
institution_number | string | ⚙️ Optional | Financial institution identifier. |
swift_code | string | ⚙️ Optional | SWIFT/BIC code for international transfers. |
aba | string | ⚙️ Optional | ABA routing number used mainly in U.S. banking. |
iban | string | ⚙️ Optional | International Bank Account Number. |
routing_code | string | ⚙️ Optional | Regional routing code if applicable. |
reference_instructions | string | ⚙️ Optional | Additional notes or transfer instructions. |
bank_address.street | string | ⚙️ Optional | Street address of the bank. |
bank_address.unit | string | ⚙️ Optional | Suite or unit number. |
bank_address.city | string | ⚙️ Optional | City of the bank. |
bank_address.state_province | string | ⚙️ Optional | State or province of the bank. |
bank_address.country | string | ⚙️ Optional | Country of the bank. |
bank_address.zip_code | number | ⚙️ Optional | ZIP or postal code. |
beneficiary_address.street | string | ⚙️ Optional | Street address of the beneficiary. |
beneficiary_address.unit | string | ⚙️ Optional | Unit or building number. |
beneficiary_address.city | string | ⚙️ Optional | City of the beneficiary. |
beneficiary_address.state_province | string | ⚙️ Optional | State or province of the beneficiary. |
beneficiary_address.country | string | ⚙️ Optional | Country of the beneficiary. |
beneficiary_address.zip_code | number | ⚙️ Optional | ZIP or postal code. |
corresponding_bank.name | string | ⚙️ Optional | Correspondent bank name. |
corresponding_bank.account_number | string | ⚙️ Optional | Account number at the correspondent bank. |
corresponding_bank.swift_code | string | ⚙️ Optional | Correspondent bank SWIFT/BIC code. |
corresponding_bank.aba | string | ⚙️ Optional | ABA number if applicable. |
corresponding_bank.iban | string | ⚙️ Optional | IBAN code if applicable. |
corresponding_bank.routing_code | string | ⚙️ Optional | Routing number for correspondent bank. |
corresponding_bank.address.street | string | ⚙️ Optional | Correspondent bank street address. |
corresponding_bank.address.unit | string | ⚙️ Optional | Unit or building number. |
corresponding_bank.address.city | string | ⚙️ Optional | City of correspondent bank. |
corresponding_bank.address.state_province | string | ⚙️ Optional | State/province of correspondent bank. |
corresponding_bank.address.country | string | ⚙️ Optional | Country of correspondent bank. |
corresponding_bank.address.zip_code | number | ⚙️ Optional | Postal or ZIP code. |
further_remit_to.beneficiary_name | string | ⚙️ Optional | Additional beneficiary name if funds must be rerouted. |
further_remit_to.beneficiary_account_number | string | ⚙️ Optional | Account number for further remittance beneficiary. |
Response:
{
"payout": {
"id": "02KADK27HCACB6880WSN2WMYB1",
"amount": 10.05,
"status": "pending",
"created_at": "2025-11-19T08:17:58.829Z",
"updated_at": "2025-11-19T08:17:58.829Z",
"deleted_at": null
}
}