Account Validation
Endpoint: https://sandbox.postapay.app/api/v1/accounts/account-validation/
Request Parameters
Field | Type | Description | Examples |
---|---|---|---|
merchant_code | string | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number) | “60**80” |
channel_code | string | A unique identifier that is used to distinguish between different payment channels. | "63907" |
account_number | string | Unique 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
Field | Type | Description | Example |
---|---|---|---|
status | bool | This 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 |
detail | string | A description of the response status sent by PostaPay API. | "Account Validation Results" |
channel_code | string | A unique identifier that is used to distinguish between different payment channels. | "63907" |
channel_name | string | Name of the Channel Code | "T-KASH" |
account_number | string | Unique identifier assigned to a mobile number account or a merchant account. | "25472XX146XX" |
account_name | string | Name 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
Field | Type | Description |
---|---|---|
status | bool | This 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. |
detail | string | This 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"
}