All URIs are relative to https://api.paystack.co
| Method | HTTP request | Description |
|---|---|---|
| create | POST /customer | Create Customer |
| deactivate_authorization | POST /customer/deactivate_authorization | Deactivate Authorization |
| fetch | GET /customer/{code} | Fetch Customer |
| list | GET /customer | List Customers |
| risk_action | POST /customer/set_risk_action | White/blacklist Customer |
| update | PUT /customer/{code} | Update Customer |
| validate | POST /customer/{code}/identification | Validate Customer |
Response create(email, first_name=first_name, last_name=last_name, phone=phone, metadata=metadata)
Create Customer
- 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
# Create Customer
response = paystack.Customer.create(
email,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| str | Customer's email address | ||
| first_name | str | Customer's first name | [optional] |
| last_name | str | Customer's last name | [optional] |
| phone | str | Customer's phone number | [optional] |
| metadata | str | Stringified JSON object of custom data | [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 deactivate_authorization(authorization_code)
Deactivate Authorization
Deactivate a customer's card
- 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'
authorization_code = 'authorization_code_example' # str | Authorization code to be deactivated
# Deactivate Authorization
response = paystack.Customer.deactivate_authorization(
authorization_code,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| authorization_code | str | Authorization code to be deactivated |
- 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(code)
Fetch Customer
- 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'
code = 'code_example' # str |
# Fetch Customer
response = paystack.Customer.fetch(
code,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| code | 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(use_cursor=use_cursor, next=next, previous=previous, _from=_from, to=to, per_page=per_page, page=page)
List Customers
List customers on your integration
- 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 Customers
response = paystack.Customer.list(
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| use_cursor | bool | [optional] | |
| next | str | [optional] | |
| previous | str | [optional] | |
| _from | str | [optional] | |
| to | str | [optional] | |
| per_page | str | [optional] | |
| page | str | [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 risk_action(customer, risk_action=risk_action)
White/blacklist Customer
Set customer's risk action by whitelisting or blacklisting the customer
- 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'
customer = 'customer_example' # str | Customer's code, or email address
# White/blacklist Customer
response = paystack.Customer.risk_action(
customer,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| customer | str | Customer's code, or email address | |
| risk_action | str | One of the possible risk actions [ default, allow, deny ]. allow to whitelist. deny to blacklist. Customers start with a default risk action. | [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 update(code, first_name=first_name, last_name=last_name, phone=phone, metadata=metadata)
Update Customer
- 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'
code = 'code_example' # str |
# Update Customer
response = paystack.Customer.update(
code,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| code | str | ||
| first_name | str | Customer's first name | [optional] |
| last_name | str | Customer's last name | [optional] |
| phone | str | Customer's phone number | [optional] |
| metadata | str | Stringified JSON object of custom data | [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]
Accepted validate(code, first_name, last_name, type, country, bvn, bank_code, account_number, value=value)
Validate Customer
Validate a customer's identity
- 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'
code = 'code_example' # str |
first_name = 'first_name_example' # str | Customer's first name
last_name = 'last_name_example' # str | Customer's last name
type = 'type_example' # str | Predefined types of identification.
country = 'country_example' # str | Two-letter country code of identification issuer
bvn = 'bvn_example' # str | Customer's Bank Verification Number
bank_code = 'bank_code_example' # str | You can get the list of bank codes by calling the List Banks endpoint (https://api.paystack.co/bank).
account_number = 'account_number_example' # str | Customer's bank account number.
# Validate Customer
response = paystack.Customer.validate(
code,
first_name,
last_name,
type,
country,
bvn,
bank_code,
account_number,
)
pprint(response)| Name | Type | Description | Notes |
|---|---|---|---|
| code | str | ||
| first_name | str | Customer's first name | |
| last_name | str | Customer's last name | |
| type | str | Predefined types of identification. | |
| country | str | Two-letter country code of identification issuer | |
| bvn | str | Customer's Bank Verification Number | |
| bank_code | str | You can get the list of bank codes by calling the List Banks endpoint (https://api.paystack.co/bank). | |
| account_number | str | Customer's bank account number. | |
| value | str | Customer's identification number. Required if type is bvn | [optional] |
- Content-Type: application/x-www-form-urlencoded, application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Request accepted for processing | - |
| 401 | Unauthorized operation | - |
| 0 | Server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]