P2P CHECK STATUS
Getting a token to request the transfer status (for each operation, you need to get and use the original token)
TEST URL POST https://testoauth.homebank.kz/epay2/oauth2/token PROD URL POST https://epay-oauth.homebank.kz/oauth2/token
Request
Body: form-data
grant_type: "client_credentials" scope: "webapi usermanagement email_send verification statement statistics payment" client_id: "test" client_secret: "yF587AV9Ms94qN2QShFzVR3vFnWkhjbAK3sG" terminal: "67e34d63-102f-4bd1-898e-370781d0074d"
Field | Description |
---|---|
grant_type | Аuthorization type, the client_credentials |
scope type is used for making a payment | Resource |
client_id | Merchant ID, can be obtained in the cabinet, issued during registration |
client_secret | The merchant's access key, which can be obtained in the cabinet, is issued upon registration |
terminal | The ID of the point of sale, which can be obtained in the cabinet, is issued during registration |
Response
{
"access_token": "DCEB8O_ZM5U7SO_T_U5EJQ",
"expires_in": 7200,
"refresh_token": "",
"scope": "webapi usermanagement email_send verification statement statistics payment",
"token_type": "Bearer"
}
After receiving the token, you need to transfer it to Headers Bearer DCEB8O_ZM5U7SO_T_U5EJQ on the endpoint:
TEST URL https://testepay.homebank.kz/api/check-status/p2p/transaction/order PROD URL https://epay-api.homebank.kz/check-status/p2p/transaction/order
Example: https://testepay.homebank.kz/api/check-status/p2p/transaction/123456
Response in case of successful execution of the request:
HTTP CODE 200
{
"result": {
"code": "100",
"message": "SUCCESS"
},
"transaction": {
"p2p": {
"id": "55dd8788-f222-479c-a318-fb06ad2fc090",
"createdDate": "2021-12-27T14:47:12.214471+06:00",
"invoiceID": "12345678937780",
"amount": 200,
"amountBonus": 0,
"payoutAmount": 0,
"currency": "KZT",
"cardType": "VISA",
"terminal": "98151552",
"terminalID":"c36b282f-6819-4d4f-85df-a4bdc8a8f703"
"accountID": "123",
"description": "TEST p2p",
"language": "",
"reference": "136180415044",
"intReference": "",
"secure": false,
"statusName": "CHARGE",
"reason": "",
"reasonCode": 0,
"email": "dosbols@halykbank.kz",
"phone": "",
"ip": "99999999999999999",
"ipCountry": "123",
"ipCity": "123",
"ipRegion": "123",
"ipDistrict": "123",
"ipLongitude": 123,
"ipLatitude": 123
},
"sender": {
"Name": "Sergey Frolov",
"panMask": "4003********9821",
"cardIssuer": "HomeCredit",
"cardType": "VISA",
"cardID": ""
},
"receiver": {
"Name": "Tester Petrov",
"panMask": "5578********0613",
"cardIssuer": "Halyk",
"cardType": "MasterCard",
"cardID": ""
}
}
}
Response in case of unsuccessful execution of the request:
HTTP CODE 400
{
"resultCode": "102",
"resultMessage": "invoice not found, check data or try again later or check transaction type (payment/p2p",
"transaction": null
}
resultCode
Field | Description | Comments | Urgent! |
---|---|---|---|
100 | Success | Success of the request, in what state the payment should be viewed by statusName | Final |
101 | Reject | transaction failed | Final |
102 | Invoice not found, try again later or check transaction type (payment/p2p) | the InvoiceID number was not found in the system, perhaps your transaction took place not via the p2p service | Status need to be rechecked durind at least 20 minutes after initial p2p request |
103 | Error, try again or contact support | You need to repeat the request or contact support | If result code 103 repeates please contact with support epay team |
104 | Field terminal absent in token | Removes the TerminalID parameter when requesting a token | Final |
107 | Try again later | Operation is in progress, request status later | Check status later, order found and it is in the process of processing |
108 | Problem transaction, contact support | operation waiting to check status with Visa/Mastercard | To request final status contact with support epay team |