Skip to content

Latest commit

 

History

History
398 lines (268 loc) · 10.9 KB

File metadata and controls

398 lines (268 loc) · 10.9 KB

paystack.DedicatedVirtualAccount

All URIs are relative to https://api.paystack.co

Method HTTP request Description
add_split POST /dedicated_account/split Split Dedicated Account Transaction
available_providers GET /dedicated_account/available_providers Fetch Bank Providers
create POST /dedicated_account Create Dedicated Account
deactivate DELETE /dedicated_account/{account_id} Deactivate Dedicated Account
fetch GET /dedicated_account/{account_id} Fetch Dedicated Account
list GET /dedicated_account List Dedicated Accounts
remove_split DELETE /dedicated_account/split Remove Split from Dedicated Account

add_split

Response add_split(account_number, subaccount=subaccount, split_code=split_code)

Split Dedicated Account Transaction

Example

  • 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'

account_number = 'account_number_example' # str | Valid Dedicated virtual account

# Split Dedicated Account Transaction

response = paystack.DedicatedVirtualAccount.add_split(
    account_number,
)

pprint(response)

Parameters

Name Type Description Notes
account_number str Valid Dedicated virtual account
subaccount str Subaccount code of the account you want to split the transaction with [optional]
split_code str Split code consisting of the lists of accounts you want to split the transaction with [optional]

Return type

Response

Authorization

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] [Back to Model list] [Back to README]

available_providers

Response available_providers()

Fetch Bank Providers

Example

  • 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'


# Fetch Bank Providers

response = paystack.DedicatedVirtualAccount.available_providers()


pprint(response)

Parameters

This endpoint does not need any parameter.

Return type

Response

Authorization

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] [Back to Model list] [Back to README]

create

Response create(customer, preferred_bank=preferred_bank, subaccount=subaccount, split_code=split_code)

Create Dedicated Account

Example

  • 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 ID or code

# Create Dedicated Account

response = paystack.DedicatedVirtualAccount.create(
    customer,
)

pprint(response)

Parameters

Name Type Description Notes
customer str Customer ID or code
preferred_bank str The bank slug for preferred bank. To get a list of available banks, use the List Providers endpoint [optional]
subaccount str Subaccount code of the account you want to split the transaction with [optional]
split_code str Split code consisting of the lists of accounts you want to split the transaction with [optional]

Return type

Response

Authorization

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] [Back to Model list] [Back to README]

deactivate

Response deactivate(account_id)

Deactivate Dedicated Account

Example

  • 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'

account_id = 'account_id_example' # str | 

# Deactivate Dedicated Account

response = paystack.DedicatedVirtualAccount.deactivate(
    account_id,
)

pprint(response)

Parameters

Name Type Description Notes
account_id str

Return type

Response

Authorization

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] [Back to Model list] [Back to README]

fetch

Response fetch(account_id)

Fetch Dedicated Account

Example

  • 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'

account_id = 'account_id_example' # str | 

# Fetch Dedicated Account

response = paystack.DedicatedVirtualAccount.fetch(
    account_id,
)

pprint(response)

Parameters

Name Type Description Notes
account_id str

Return type

Response

Authorization

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] [Back to Model list] [Back to README]

list

Response list(account_number=account_number, customer=customer, active=active, currency=currency, provider_slug=provider_slug, bank_id=bank_id, per_page=per_page, page=page)

List Dedicated Accounts

Example

  • 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 Dedicated Accounts

response = paystack.DedicatedVirtualAccount.list(
)

pprint(response)

Parameters

Name Type Description Notes
account_number str [optional]
customer str [optional]
active bool [optional]
currency str [optional]
provider_slug str [optional]
bank_id str [optional]
per_page str [optional]
page str [optional]

Return type

Response

Authorization

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] [Back to Model list] [Back to README]

remove_split

Response remove_split(account_number, subaccount=subaccount, split_code=split_code)

Remove Split from Dedicated Account

Example

  • 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'

account_number = 'account_number_example' # str | Valid Dedicated virtual account

# Remove Split from Dedicated Account

response = paystack.DedicatedVirtualAccount.remove_split(
    account_number,
)

pprint(response)

Parameters

Name Type Description Notes
account_number str Valid Dedicated virtual account
subaccount str Subaccount code of the account you want to split the transaction with [optional]
split_code str Split code consisting of the lists of accounts you want to split the transaction with [optional]

Return type

Response

Authorization

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 -
404 Entity not found -
0 Server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]