LogoLogo
  • Welcome!
  • Integrating Klasha
    • Getting Started
    • Prerequisites
    • Integration Checklist
    • Wrap Up
  • Overview
    • Introduction
    • Parameters
    • Token Generation
    • Errors
    • Countries & Payment Methods
  • Accepting Payments
    • Test Payments
    • Payments API
      • Mobile money
      • USSD
    • Payment Link
      • Dashboard
      • Payment Link API
    • Klasha Inline
    • HTML Checkout
  • PLUGINS AND SDKS
    • Plugins
    • Mobile SDKs
    • Web SDKs
  • MISC
    • Transaction Status
    • Webhook
    • API Status
  • Features
    • One-time Payments
    • Recurrent Payment
  • Transfers
    • Payout
      • ZAR Payout(new encryption)
      • KES Payout(new encryption)
      • ZMW Payout(new encryption)
      • TZS Payout(new encryption)
      • CNY Payout(new encryption)
    • Klasha Wire API
    • Swap API
    • Currency Coverage
  • Bank Account Collection
    • Virtual Account Creation
    • VA balance and statement
    • Business Identification Service
Powered by GitBook
On this page
  • Summary
  • API specifications
  • Generate a bearer token
  • Get Virtual Account Balance
  • Retrieve Transaction Statements
  1. Bank Account Collection

VA balance and statement

PreviousVirtual Account CreationNextBusiness Identification Service

Last updated 11 months ago

Summary

These APIs give Klasha’s merchants the ability to retrieve the balance of their Virtual Account as well as the statement of their transactions.

Before you begin!

  • to the Postman collection

  • Find your keys on the Klasha Dashboard → Settings → Generate API Keys ().

  • Klasha Dashboard, Generate API Keys page

API specifications

Generate a bearer token

Generate a bearer token

POST {{env_url}}/auth/auth/login

Using the Token endpoint on the Postman collection, the token can be obtained from the headers under the header name: token.

Headers

Name
Type
Description

{{token}}*

String

token

Request Body

Name
Type
Description

username*

String

username

password*

String

password

Get Virtual Account Balance

Get Virtual Account Balance

GET {{env_url}}/nucleus/virtual/account/collections/business/

You’d need to pass the merchant public key in the header as the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

Headers

Name
Type
Description

x-auth-token*

String

merchant public key

{
    "message": "success",
    "error": null,
    "data": {
        "virtualAccountCollectionSettlement": 100.00,
        "virtualAccountCollectionsBalance": 200.00
    }
}
{
    "message": "A human readable error message",
    "error": "Bad Request",
    "data": null
}

Retrieve Transaction Statements

Retrieve Transaction Statements

POST {{env_url}}/nucleus/tnx/paginated/filter/v2

You will need to pass the merchant public key in the header as the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

You can get all your transactions by passing an empty body, or you can pass a body with any combination of the following 3 filters (all of them or just 1 or 2)

Headers

Name
Type
Description

x-auth-token*

String

merchant public key

Request Body

Name
Type
Description

currency

String

NGN

status

String

failed

tnxRef

String

paylink-8e3172ac-4cb4-422f-a805-9a571f236939

{
  "message": "success",
  "error": null,
  "data": {
    "pageNo": 1,
    "totalPages": 1,
    "totalCount": 1,
    "transactions": [
      {
        "transaction": {
          "status": "successful",
          "virtualAccountNumber": "000000001",
          "email": "email@email.com",
          "currency": "NGN",
          "tnxRef": "reference",
          "sourceCurrency": "NGN",
          "paymentType": "paymentType",
          "channel": "channel",
	  "previousBalance": 1003.02,
          "amountCredited": 100.00,
          "amountCollected": 200.00,
          "newBalance": 1103.02,
          "settledCurrency": "NGN",
          "createdAt": "2023-01-01 01:01:00",
          "payerDetails": {
            "bank": "bank name",
            "accountName": "account name",
            "accountNumber": "0000000022"
          }
        }
      },
    ]
  }
}     
Link
here