P2P – transfers

Test data of the virtual terminal and personal account


Test payment cards:

PANExpire DateCVCStatus

Receiving a token for payment (for each operation you must receive and use the original token)

URL of the request to receive a token

TEST URL POST https://testoauth.homebank.kz/epay2/oauth2/token
PROD URL POST https://epay-oauth.homebank.kz/oauth2/token


Body: form-data

   grant_type: "client_credentials"
   scope: "transfer"
   client_id: "test"
   client_secret:  "yF587AV9Ms94qN2QShFzVR3vFnWkhjbAK3sG"
   invoiceID: "000000001"
   amount: 100
   currency: "KZT"
   terminal: "c36b282f-6819-4d4f-85df-a4bdc8a8f703"
   postLink: ""
   failurePostLink: ""

grant_typeАuthorization type, client_credentials are used for payment processing
client_idMerchant id, can be obtained on the account page, first given when registered
client_secretMerchant's access key, can be obtained on the account page, first given when registered
invoiceIDThe order number, generated by the merchant, must be unique for each new order, from 6 to 15 digits. If your order number contains more than 6 characters, then additional uniqueness must be maintained in the last 6 characters
amountOrder Amount
terminalSale point's id (can be obtained on the account page, first given when registered)
postLinkOptional parameter, sends postlink in case of success
failurePostLinkOptional parameter, sends postlink in case of failure


      "expires_in": 7200,

access_tokenToken for payment processing
expires_inExpiry time
refresh_tokenNot used in current type of request
scopeResource, in order to process a payment "payment" resouce is used
token_typeType of the token

After receiving the token, you need to transfer it to the Headers Bearer at the endpoint:

TEST URL POST https://testepay.homebank.kz/api/payments/cards/auth
PROD URL POST https://epay-api.homebank.kz/payments/cards/auth

Making a transfer using saved cards

The card is saved if earlier, when making payments or transfers, you passed the card save: true parameter, the payment was successful and you received the CardID in the response.

Transfer to a saved card with the sender's card saved

  "order": {
   "amount": 100,
   "currency": "KZT",
   "description": "Test p2p payment",
   "id": "8161284658529816",
   "accountID": "testUser1",
   "senderEmail": "dosbols@halykbank.kz",
   "terminalId": "40a348cb-68a3-45d5-9002-a4836d79c3b5",
   "backLink": "https://epay.homebank.kz/demo/success.html",
   "failureBackLink": "https://epay.homebank.kz/demo/failure.html",
   "postLink": "https://epay.homebank.kz/payform",
   "failurePostLink": "https://testmerchant/order/1123/fail"
 "card": {
   "sender": {
     "save": true,
     "transferType": "TYPEPAN",
     "cvc": "815",
     "expire": {
"month": "01",
"year": "25"
     "name": "Arman Ali",
     "cardCred": "4405639704015096"
   "receiver": {
           "cardCred": "fcf69516-f7e8-9b14-e053-1d1a000aef2f",
           "transferType": "TYPECARDID",

orderA set of transaction parameters
amountTransfer amount
descriptionAdditional information about the transaction
accountIdA field for specifying the store's customer ID, required when saving the card
IdOrder number
senderEmailSender's email
terminalIdThe identifier of the point of sale (terminal ID), which can be obtained in the cabinet, is issued during registration
backLinkLink to return to the store upon successful payment
failureBackLinkLink to return to the store in case of a failed payment
postLinkURL to which the callback will be sent upon successful payment
failurePostLinkURL to which the callback will be sent in case of unsuccessful payment
senderA set of sender parameters
saveSaving the map
transferTypeThe type of transfer, when TYPEPAN is passed empty
cardCredcard number with TYPECARD, card id with TYPECARDID
CVCCVC card, with TYPEPAN is passed empty
expireCard expiration date
receiverThe set of parameters of the recipient
cardCredPAN card (the type of data specified depends on the transferType parameter)

Response in an event of success:

    "id": "84d22915-f77f-491a-801c-aeb1b3b3bb36",
    "amount": 100,
    "fee": 95,
    "accountID": "testUser1",
    "currency": "KZT",
    "email": "dosbols@halykbank.kz",
    "description": "TEST p2p",
    "reference": "403752583641",
    "orderID": "8161284658529816",
    "senderCardID": "10606a85-ffca-b6b3-e063-1d1a000a2f3d",
    "senderCardPAN": "440563...5096",
    "senderCardType": "VISA",
    "senderTransferType": "TYPEPAN",
    "receiverCardID": "fcf69516-f7e8-9b14-e053-1d1a000aef2f",
    "receiverCardPAN": "440563...7622",
    "receiverCardType": "VISA",
    "receiverTransferType": "TYPECARDID",
    "intReference": "C2679A7844D3A007",
    "terminalID": "40a348cb-68a3-45d5-9002-a4836d79c3b5",
    "status": "CHARGE"

IdTransaction ID
amountTransfer amount
feeThe amount of the commission (not used)
account IDField for specifying the store's customer ID, required when saving the card
EmailThe email address specified during the data transfer
descriptionAdditional information about the transaction
referenceUnique transaction ID
orderIdThe order number transmitted earlier
senderCardIDSender's card ID
senderCardPANSender's bank card
senderTransferTypeType of transfer using the sender's card
receiver Card IDRecipient's card ID
receiver Card PANRecipient's card PAN
receiver Card TypeType of transfer using the recipient's card
receiver Transfer TypePayment system of the recipient's card
int ReferenceAdditional unique transaction identifier
terminal IdPoint of sale Identifier (Terminal ID)
**status **Transfer status

Response in case of error:

    "code": 487,
    "message": " Not permitted to merchant",
    "invoiceId": "8161284658529816",
    "id": "",
    "reference": "",
    "accountId": "uuid000001"

codeError code
messageA message describing the cause of the error
invoice IdOrder number transmitted earlier
idTransaction ID
referenceUnique transaction ID
account IdField for specifying the store's customer ID