All URIs are relative to https://api.paystack.co
| Method | HTTP request | Description |
|---|---|---|
| create | POST /refund | Create Refund |
| fetch | GET /refund/{id} | Fetch Refund |
| list | GET /refund | List Refunds |
Response create(transaction, amount=amount, currency=currency, customer_note=customer_note, merchant_note=merchant_note)
Create Refund
- 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 = 'transaction_example' # str | Transaction reference or id
# Create Refund
response = paystack.Refund.create(
transaction,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| transaction | str | Transaction reference or id | |
| amount | int | Amount ( in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR ) to be refunded to the customer. Amount cannot be more than the original transaction amount | [optional] |
| currency | str | Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD | [optional] |
| customer_note | str | Customer reason | [optional] |
| merchant_note | str | Merchant reason | [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 Refund
- 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 Refund
response = paystack.Refund.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 Refunds
- 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 Refunds
response = paystack.Refund.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]