Public
Documentation Settings

Chpter Payment APIs 3.0

POSTMpesa Payment

https://api.chpter.co/v1/initiate/mpesa-payment
HEADERS
Content-Type

application/json

Api-Key

pk_3cfba06d8fd

Bodyraw (json)
json
{
  "customer_details": {
   "full_name": "Albert Chela",
    "location": "Nairobi",
    "phone_number": "254700123123",
    "email": "alber@chpter.co"
  },
  "products": [
    {
      "product_name": "HoodEez",
      "quantity": 1,
      "unit_price": 1,
      "digital_link": "https://example.com/link"

    }
  ],
  "amount": {
    "currency": "KES",
    "delivery_fee": 0.00,
    "discount_fee": 0.00,
    "total": 1.00
  },
  "callback_details": {
    "transaction_reference": "1234",
    "callback_url": "https://callback-url.com"
  }
}
Example Request
curl
curl --location 'https://api.chpter.co/v1/initiate/mpesa-payment' \
--header 'Content-Type: application/json' \
--header 'Api-Key: pk_3cfba06d8fd' \
--data-raw '{
  "customer_details": {
   "full_name": "Albert Chela",
    "location": "Nairobi",
    "phone_number": "254700123123",
    "email": "alber@chpter.co"
  },
  "products": [
    {
      "product_name": "HoodEez",
      "quantity": 1,
      "unit_price": 1,
      "digital_link": "https://example.com/link"

    }
  ],
  "amount": {
    "currency": "KES",
    "delivery_fee": 0.00,
    "discount_fee": 0.00,
    "total": 1.00
  },
  "callback_details": {
    "transaction_reference": "1234",
    "callback_url": "https://callback-url.com"
  }
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTCard Payment

https://api.chpter.co/v1/initiate/card-payment
HEADERS
Content-Type

application/json

Api-Key

pk_3cfba06d8fd

Bodyraw (json)
json
{
  "customer_details": {
   "full_name": "Albert Chela",
    "location": "Nairobi",
    "phone_number": "254700123123",
    "email": "alber@chpter.co"
  },
  "products": [
    {
      "product_name": "HoodEez",
      "quantity": 1,
      "unit_price": 1,
      "digital_link": "https://example.com/link"
    }
  ],
  "amount": {
    "currency": "KES",
    "delivery_fee": 0.00,
    "discount_fee": 0.00,
    "total": 100.00
  },
  "callback_details": {
    "transaction_reference": "QWERTY1234",
    "success_url": "https://chpter.shop",
    "failed_url": "https://chpter.shop",
    "callback_url": "https://callback-url.com"
  }
}
Example Request
curl
curl --location 'https://api.chpter.co/v1/initiate/card-payment' \
--header 'Content-Type: application/json' \
--header 'Api-Key: pk_3cfba06d8fd' \
--data-raw '{
  "customer_details": {
   "full_name": "Albert Chela",
    "location": "Nairobi",
    "phone_number": "254700123123",
    "email": "alber@chpter.co"
  },
  "products": [
    {
      "product_name": "HoodEez",
      "quantity": 1,
      "unit_price": 1,
      "digital_link": "https://example.com/link"
    }
  ],
  "amount": {
    "currency": "KES",
    "delivery_fee": 0.00,
    "discount_fee": 0.00,
    "total": 100.00
  },
  "callback_details": {
    "transaction_reference": "QWERTY1234",
    "success_url": "https://chpter.shop",
    "failed_url": "https://chpter.shop",
    "callback_url": "https://callback-url.com"
  }
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers