All URIs are relative to https://api.paystack.co
| Method | HTTP request | Description |
|---|---|---|
| charge_authorization | POST /transaction/charge_authorization | Charge Authorization |
| check_authorization | POST /transaction/check_authorization | Check Authorization |
| download | GET /transaction/export | Export Transactions |
| event | GET /transaction/{id}/event | Get Transaction Event |
| fetch | GET /transaction/{id} | Fetch Transaction |
| initialize | POST /transaction/initialize | Initialize Transaction |
| list | GET /transaction | List Transactions |
| partial_debit | POST /transaction/partial_debit | Partial Debit |
| session | GET /transaction/{id}/session | Get Transaction Session |
| timeline | GET /transaction/timeline/{id_or_reference} | Fetch Transaction Timeline |
| totals | GET /transaction/totals | Transaction Totals |
| verify | GET /transaction/verify/{reference} | Verify Transaction |
Response charge_authorization(email, amount, authorization_code, reference=reference, currency=currency, metadata=metadata, split_code=split_code, subaccount=subaccount, transaction_charge=transaction_charge, bearer=bearer, queue=queue)
Charge Authorization
- 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'
email = 'email_example' # str | Customer's email address
amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR
authorization_code = 'authorization_code_example' # str | Valid authorization code to charge
# Charge Authorization
response = paystack.Transaction.charge_authorization(
email,
amount,
authorization_code,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| str | Customer's email address | ||
| amount | int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | |
| authorization_code | str | Valid authorization code to charge | |
| reference | str | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. | [optional] |
| currency | str | The transaction currency | [optional] |
| metadata | str | Stringified JSON object of custom data | [optional] |
| split_code | str | The split code of the transaction split | [optional] |
| subaccount | str | The code for the subaccount that owns the payment | [optional] |
| transaction_charge | str | A flat fee to charge the subaccount for a transaction. This overrides the split percentage set when the subaccount was created | [optional] |
| bearer | str | The beare of the transaction charge | [optional] |
| queue | bool | If you are making a scheduled charge call, it is a good idea to queue them so the processing system does not get overloaded causing transaction processing errors. | [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 check_authorization(email, amount, authorization_code=authorization_code, currency=currency)
Check Authorization
- 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'
email = 'email_example' # str | Customer's email address
amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR
# Check Authorization
response = paystack.Transaction.check_authorization(
email,
amount,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| str | Customer's email address | ||
| amount | int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | |
| authorization_code | str | Valid authorization code to charge | [optional] |
| currency | str | The transaction currency | [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 download(per_page=per_page, page=page, _from=_from, to=to)
Export Transactions
- 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'
# Export Transactions
response = paystack.Transaction.download(
)
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 event(id)
Get Transaction Event
- 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 |
# Get Transaction Event
response = paystack.Transaction.event(
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 Transaction
- 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 | The ID of the transaction to fetch
# Fetch Transaction
response = paystack.Transaction.fetch(
id,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | The ID of the transaction to fetch |
- 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 initialize(email, amount, currency=currency, reference=reference, callback_url=callback_url, plan=plan, invoice_limit=invoice_limit, metadata=metadata, channels=channels, split_code=split_code, subaccount=subaccount, transaction_charge=transaction_charge, bearer=bearer)
Initialize Transaction
Create a new transaction
- 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'
email = 'email_example' # str | Customer's email address
amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR
# Initialize Transaction
response = paystack.Transaction.initialize(
email,
amount,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| str | Customer's email address | ||
| amount | int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | |
| currency | str | The transaction currency | [optional] |
| reference | str | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. | [optional] |
| callback_url | str | Fully qualified url, e.g. https://example.com/ . Use this to override the callback url provided on the dashboard for this transaction | [optional] |
| plan | str | If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in amount | [optional] |
| invoice_limit | int | Number of times to charge customer during subscription to plan | [optional] |
| metadata | str | Stringified JSON object of custom data | [optional] |
| channels | list[str] | An array of payment channels to control what channels you want to make available to the user to make a payment with | [optional] |
| split_code | str | The split code of the transaction split | [optional] |
| subaccount | str | The code for the subaccount that owns the payment | [optional] |
| transaction_charge | str | A flat fee to charge the subaccount for a transaction. This overrides the split percentage set when the subaccount was created | [optional] |
| bearer | str | The beare of the transaction charge | [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 list(per_page=per_page, page=page, _from=_from, to=to)
List Transactions
- 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 Transactions
response = paystack.Transaction.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 partial_debit(email, amount, authorization_code, currency, reference=reference, at_least=at_least)
Partial Debit
- 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'
email = 'email_example' # str | Customer's email address
amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR
authorization_code = 'authorization_code_example' # str | Valid authorization code to charge
currency = 'currency_example' # str | The transaction currency
# Partial Debit
response = paystack.Transaction.partial_debit(
email,
amount,
authorization_code,
currency,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| str | Customer's email address | ||
| amount | int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR | |
| authorization_code | str | Valid authorization code to charge | |
| currency | str | The transaction currency | |
| reference | str | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. | [optional] |
| at_least | str | Minimum amount to charge | [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 session(id)
Get Transaction Session
- 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 |
# Get Transaction Session
response = paystack.Transaction.session(
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 timeline(id_or_reference)
Fetch Transaction Timeline
- 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_or_reference = 'id_or_reference_example' # str |
# Fetch Transaction Timeline
response = paystack.Transaction.timeline(
id_or_reference,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| id_or_reference | 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 totals(per_page=per_page, page=page, _from=_from, to=to)
Transaction Totals
- 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'
# Transaction Totals
response = paystack.Transaction.totals(
)
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 verify(reference)
Verify Transaction
- 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'
reference = 'reference_example' # str | The transaction reference to verify
# Verify Transaction
response = paystack.Transaction.verify(
reference,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| reference | str | The transaction reference to verify |
- 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]