Skip to main content

Account Validation

Alt test Endpoint: https://sandbox.postapay.app/api/v1/accounts/account-validation/

Request Parameters

FieldTypeDescriptionExamples
merchant_codestringA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)“60**80”
channel_codestringA unique identifier that is used to distinguish between different payment channels."63907"
account_numberstringUnique identifier assigned to a mobile number account or a merchant account."25472XX146XX"
Sample request
Headers
Key: Authorization
Value: "Authorization":"Bearer XXXXXX"

Body {
"merchant_code":"60**80",
"channel_code":"63902",
"account_number": "25472XX146XX"
}

Response Sample Success

FieldTypeDescriptionExample
statusboolThis is a true or false status that indicates the status of the response. true means success and false means an error occurred or the request failed.true
detailstringA description of the response status sent by PostaPay API."Account Validation Results"
channel_codestringA unique identifier that is used to distinguish between different payment channels."63907"
channel_namestringName of the Channel Code"T-KASH"
account_numberstringUnique identifier assigned to a mobile number account or a merchant account."25472XX146XX"
account_namestringName of the Account"JOHN DOE"
Sample success response
{
"status": true,
"detail": "Account Validation Results",
"account_details": {
"channel_code": "63902",
"channel_name": "M-PESA",
"account_number": "25472XX146XX",
"account_name": "JOHN DOE"
}

Response Sample Failure

FieldTypeDescription
statusboolThis is a true or false status that indicates the status of the response. true means success and false means an error occurred or the request failed.
detailstringThis is a predefined code that indicates the reason for request failure. This is defined in the Response Error Details below. The error codes map to specific error messages as illustrated in the Response Error Details below.
sample failure response
{
"status": false,
"detail": "Invalid data provided"
}