All URIs are relative to https://api.paystack.co
| Method | HTTP request | Description |
|---|---|---|
| create | POST /product | Create Product |
| delete | DELETE /product/{id} | Delete Product |
| fetch | GET /product/{id} | Fetch Product |
| list | GET /product | List Products |
| update | PUT /product/{id} | Update product |
Response create(name, description, price, currency, limited=limited, quantity=quantity)
Create Product
- Bearer Authentication (bearerAuth):
import paystack
from pprint import pprint
# Set your API key based on domain (test or live mode)
paystack.api_key = 'sk_domain_xxxxxxxx'
name = 'name_example' # str | Name of product
description = 'description_example' # str | The description of the product
price = 56 # int | Price should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR
currency = 'currency_example' # str | Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD
# Create Product
response = paystack.Product.create(
name,
description,
price,
currency,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Name of product | |
| description | str | The description of the product | |
| price | int | Price should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | |
| currency | str | Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD | |
| limited | bool | Set to true if the product has limited stock. Leave as false if the product has unlimited stock | [optional] |
| quantity | int | Number of products in stock. Use if limited is true | [optional] |
- Content-Type: application/x-www-form-urlencoded, application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Resource created | - |
| 401 | Unauthorized operation | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response delete(id)
Delete Product
- Bearer Authentication (bearerAuth):
import paystack
from pprint import pprint
# Set your API key based on domain (test or live mode)
paystack.api_key = 'sk_domain_xxxxxxxx'
id = 'id_example' # str |
# Delete Product
response = paystack.Product.delete(
id,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request successful | - |
| 401 | Unauthorized operation | - |
| 404 | Entity not found | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response fetch(id)
Fetch Product
- Bearer Authentication (bearerAuth):
import paystack
from pprint import pprint
# Set your API key based on domain (test or live mode)
paystack.api_key = 'sk_domain_xxxxxxxx'
id = 'id_example' # str |
# Fetch Product
response = paystack.Product.fetch(
id,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request successful | - |
| 401 | Unauthorized operation | - |
| 404 | Entity not found | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response list(per_page=per_page, page=page, active=active, _from=_from, to=to)
List Products
- Bearer Authentication (bearerAuth):
import paystack
from pprint import pprint
# Set your API key based on domain (test or live mode)
paystack.api_key = 'sk_domain_xxxxxxxx'
# List Products
response = paystack.Product.list(
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| per_page | int | [optional] | |
| page | int | [optional] | |
| active | bool | [optional] | |
| _from | datetime | The start date | [optional] |
| to | datetime | The end date | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request successful | - |
| 401 | Unauthorized operation | - |
| 404 | Entity not found | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response update(id, name=name, description=description, price=price, currency=currency, limited=limited, quantity=quantity)
Update product
- Bearer Authentication (bearerAuth):
import paystack
from pprint import pprint
# Set your API key based on domain (test or live mode)
paystack.api_key = 'sk_domain_xxxxxxxx'
id = 'id_example' # str |
# Update product
response = paystack.Product.update(
id,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| name | str | Name of product | [optional] |
| description | str | The description of the product | [optional] |
| price | int | Price should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | [optional] |
| currency | str | Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD | [optional] |
| limited | bool | Set to true if the product has limited stock. Leave as false if the product has unlimited stock | [optional] |
| quantity | int | Number of products in stock. Use if limited is true | [optional] |
- Content-Type: application/x-www-form-urlencoded, application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request successful | - |
| 401 | Unauthorized operation | - |
| 404 | Entity not found | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]