Products

Create Product

post

A product can be a single-pay product or a subscription-based service.

Header parameters
x-api-keystringRequired

Your API Keys

Example: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Body
namestringRequired

Name of product

Example: product_123
descriptionstringRequired

Description of product

Example: product_description_123
pricenumberRequired
currencystring · enumRequiredExample: USDPossible values:
billing_typestring · enumRequiredExample: subscriptionPossible values:
tax_inclusivebooleanRequiredDefault: false
tax_categorystring · enumRequiredExample: digital_productsPossible values:
recurring_intervalstring · enumRequiredExample: dailyPossible values:
trial_daysinteger · max: 365Required

Setting trial_days to 0 signifies no free trial, while trial_days between 1 and 365 specifies a defined duration for the free trial period.

Example: 1
Responses
200Success
application/json
post
POST /api/products/create HTTP/1.1
Host: test.bagelpay.io
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 223

{
  "name": "product_123",
  "description": "product_description_123",
  "price": 400,
  "currency": "USD",
  "billing_type": "single_payment",
  "tax_inclusive": false,
  "tax_category": "digital_products",
  "recurring_interval": "daily",
  "trial_days": 1
}
200Success
{
  "msg": "Operation successful",
  "code": 200,
  "data": {
    "name": "product_3",
    "description": "product_description_1",
    "price": 400,
    "currency": "USD",
    "object": "product",
    "mode": "test",
    "product_id": "prod_1966051569294290946",
    "store_id": "store_1965741114843643906",
    "product_url": "https://test.bagelpay.io/product/prod_1966051569294290946",
    "billing_type": "subscription",
    "billing_period": "once",
    "tax_category": "digital_products",
    "tax_inclusive": false,
    "is_archive": true,
    "created_at": "2025-09-11 16:09:56",
    "updated_at": "2025-09-11 16:09:56",
    "trial_days": 1,
    "recurring_interval": "daily"
  }
}

List Products

get
Query parameters
pageNuminteger · min: 1Optional

The page number

Example: 1
pageSizeinteger · min: 1Optional

The page size

Example: 10
Header parameters
x-api-keystringRequired

Your API Keys

Example: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Responses
200Success
application/json
get
GET /api/products/list HTTP/1.1
Host: test.bagelpay.io
x-api-key: text
Accept: */*
200Success
{
  "total": 19,
  "items": [
    {
      "name": "product_4",
      "description": "product_description_1",
      "price": 400,
      "currency": "USD",
      "object": "product",
      "mode": "test",
      "remark": null,
      "product_id": "prod_1966064873706270722",
      "store_id": "store_1965741114843643906",
      "product_url": "https://test.bagelpay.io/product/prod_1966064873706270722",
      "billing_type": "subscription",
      "billing_period": "once",
      "tax_category": "digital_products",
      "tax_inclusive": false,
      "is_archive": false,
      "created_at": "2025-09-11 17:02:48",
      "updated_at": "2025-09-11 17:02:48",
      "trial_days": 1,
      "recurring_interval": "daily"
    }
  ],
  "code": 200,
  "msg": "success"
}

Get Product Detail

get
Path parameters
product_idstringRequiredExample: prod_1964884716358807553
Header parameters
x-api-keystringRequiredExample: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Responses
200Success
application/json
get
GET /api/products/{product_id} HTTP/1.1
Host: test.bagelpay.io
x-api-key: text
Accept: */*
200Success
{
  "msg": "Operation successful",
  "code": 200,
  "data": {
    "name": "Product_7447",
    "description": "Description_of_product_2900",
    "price": 362,
    "currency": "USD",
    "object": "product",
    "mode": "test",
    "product_id": "prod_1966053095265972226",
    "store_id": "store_1965741114843643906",
    "product_url": "https://test.bagelpay.io/product/prod_1966053095265972226",
    "billing_type": "subscription",
    "billing_period": "once",
    "tax_category": "digital_products",
    "tax_inclusive": false,
    "is_archive": true,
    "created_at": "2025-09-11 16:16:00",
    "updated_at": "2025-09-11 16:16:00",
    "trial_days": 1,
    "recurring_interval": "daily"
  }
}

Archive Product

post

Archive a product associated with your account.

Path parameters
product_idstringRequiredExample: prod_1965395044853714946
Header parameters
x-api-keystringRequiredExample: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Responses
200Success
application/json
post
POST /api/products/{product_id}/archive HTTP/1.1
Host: test.bagelpay.io
x-api-key: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Accept: */*
200Success
{
  "msg": "Operation successful",
  "code": 200,
  "data": {
    "name": "Product_7447",
    "description": "Description_of_product_2900",
    "price": 362,
    "currency": "USD",
    "object": "product",
    "mode": "test",
    "product_id": "prod_1966053095265972226",
    "store_id": "store_1965741114843643906",
    "product_url": "https://test.bagelpay.io/product/prod_1966053095265972226",
    "billing_type": "subscription",
    "billing_period": "once",
    "tax_category": "digital_products",
    "tax_inclusive": false,
    "is_archive": false,
    "created_at": "2025-09-11 16:16:00",
    "updated_at": "2025-09-11 16:16:00",
    "trial_days": 1,
    "recurring_interval": "daily"
  }
}

Unarchive Product

post

Unarchive a product associated with your account.

Path parameters
product_idstringRequiredExample: prod_1965395044853714946
Header parameters
x-api-keystringRequiredExample: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Responses
200Success
application/json
post
POST /api/products/{product_id}/unarchive HTTP/1.1
Host: test.bagelpay.io
x-api-key: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Accept: */*
200Success
{
  "msg": "Operation successful",
  "code": 200,
  "data": {
    "name": "Product_7447",
    "description": "Description_of_product_2900",
    "price": 362,
    "currency": "USD",
    "object": "product",
    "mode": "test",
    "product_id": "prod_1966053095265972226",
    "store_id": "store_1965741114843643906",
    "product_url": "https://test.bagelpay.io/product/prod_1966053095265972226",
    "billing_type": "subscription",
    "billing_period": "once",
    "tax_category": "digital_products",
    "tax_inclusive": false,
    "is_archive": true,
    "created_at": "2025-09-11 16:16:00",
    "updated_at": "2025-09-11 16:16:00",
    "trial_days": 1,
    "recurring_interval": "daily"
  }
}

Update Product

post
Header parameters
x-api-keystringRequiredExample: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Body
product_idstringRequired
namestringRequired
descriptionstringRequired
pricenumberRequired
currencystringRequired
tax_inclusivebooleanRequired
tax_categorystring · enumRequiredExample: digital_productsPossible values:
recurring_intervalstring · enumRequiredExample: weeklyPossible values:
trial_daysinteger · max: 365RequiredExample: 1
Responses
200Success
application/json
post
POST /api/products/update HTTP/1.1
Host: test.bagelpay.io
x-api-key: bagel_test_64C70FE8526A48568D4EEA9D9164F508
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "product_id": "prod_1966053095265972226",
  "name": "product_123",
  "description": "product_description_123",
  "price": 400,
  "currency": "USD",
  "tax_inclusive": false,
  "tax_category": "digital_products",
  "recurring_interval": "daily",
  "trial_days": 1
}
200Success
{
  "msg": "Operation successful",
  "code": 200,
  "data": {
    "name": "product_123",
    "description": "product_description_123",
    "price": 40,
    "currency": "USD",
    "object": "product",
    "mode": "test",
    "product_id": "prod_1966053095265972226",
    "store_id": "store_1965741114843643906",
    "product_url": "https://test.bagelpay.io/product/prod_1966053095265972226",
    "billing_type": "subscription",
    "billing_period": "once",
    "tax_category": "digital_products",
    "tax_inclusive": false,
    "is_archive": true,
    "created_at": "2025-09-11 16:16:00",
    "updated_at": "2025-09-11 16:51:08",
    "trial_days": 1,
    "recurring_interval": "daily"
  }
}