# paystack.Refund All URIs are relative to *https://api.paystack.co* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](Refund.md#create) | **POST** /refund | Create Refund [**fetch**](Refund.md#fetch) | **GET** /refund/{id} | Fetch Refund [**list**](Refund.md#list) | **GET** /refund | List Refunds # **create** > Response create(transaction, amount=amount, currency=currency, customer_note=customer_note, merchant_note=merchant_note) Create Refund ### Example * Bearer Authentication (bearerAuth): ```python import paystack from paystack.rest import ApiException from pprint import pprint transaction = 'transaction_example' # str | Transaction reference or id amount = 56 # 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 = 'currency_example' # str | Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD (optional) customer_note = 'customer_note_example' # str | Customer reason (optional) merchant_note = 'merchant_note_example' # str | Merchant reason (optional) # Create Refund response = paystack.Refund.create(transaction, amount=amount, currency=currency, customer_note=customer_note, merchant_note=merchant_note) pprint(response) ``` ### Parameters 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] ### Return type [**Response**](Response.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded, application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Request successful | - | **401** | Unauthorized operation | - | **0** | Server error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fetch** > Response fetch(id) Fetch Refund ### Example * Bearer Authentication (bearerAuth): ```python import paystack from paystack.rest import ApiException from pprint import pprint id = 'id_example' # str | # Fetch Refund response = paystack.Refund.fetch(id) pprint(response) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| | ### Return type [**Response**](Response.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list** > Response list(per_page=per_page, page=page, _from=_from, to=to) List Refunds ### Example * Bearer Authentication (bearerAuth): ```python import paystack from paystack.rest import ApiException from pprint import pprint per_page = 56 # int | Number of records to fetch per page (optional) page = 56 # int | The section to retrieve (optional) _from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Refunds response = paystack.Refund.list(per_page=per_page, page=page, _from=_from, to=to) pprint(response) ``` ### Parameters 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] ### Return type [**Response**](Response.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)