All URIs are relative to https://api.paystack.co
| Method | HTTP request | Description |
|---|---|---|
| add_products | POST /page/{id}/product | Add Products |
| check_slug_availability | GET /page/check_slug_availability/{slug} | Check Slug Availability |
| create | POST /page | Create Page |
| fetch | GET /page/{id} | Fetch Page |
| list | GET /page | List Pages |
| update | PUT /page/{id} | Update Page |
Response add_products(id, product)
Add 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'
id = 'id_example' # str |
product = 'product_example' # list[str] | IDs of all products to add to a page
# Add Products
response = paystack.Page.add_products(
id,
product,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| product | list[str] | IDs of all products to add to a page |
- Content-Type: application/x-www-form-urlencoded, application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request successful | - |
| 401 | Unauthorized operation | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response check_slug_availability(slug)
Check Slug Availability
- 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'
slug = 'slug_example' # str |
# Check Slug Availability
response = paystack.Page.check_slug_availability(
slug,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| slug | 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 create(name, description=description, amount=amount, slug=slug, metadata=metadata, redirect_url=redirect_url, custom_fields=custom_fields)
Create Page
- 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 page
# Create Page
response = paystack.Page.create(
name,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Name of page | |
| description | str | The description of the page | [optional] |
| amount | int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | [optional] |
| slug | str | URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug] | [optional] |
| metadata | str | Stringified JSON object of custom data | [optional] |
| redirect_url | str | If you would like Paystack to redirect to a URL upon successful payment, specify the URL here. | [optional] |
| custom_fields | list[object] | If you would like to accept custom fields, specify them here. | [optional] |
- Content-Type: application/x-www-form-urlencoded, application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request successful | - |
| 401 | Unauthorized operation | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response fetch(id)
Fetch Page
- 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 Page
response = paystack.Page.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, _from=_from, to=to)
List Pages
- 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 Pages
response = paystack.Page.list(
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| per_page | int | Number of records to fetch per page | [optional] |
| page | int | The section to retrieve | [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, amount=amount, active=active)
Update Page
- 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 Page
response = paystack.Page.update(
id,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| name | str | Name of page | [optional] |
| description | str | The description of the page | [optional] |
| amount | int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | [optional] |
| active | bool | Set to false to deactivate page url | [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]