When registered, you will be given data, that is needed when making the payment:

TerminalIDStore identification
ClientIDClient Identification
ClientSecretSecret Key

Receiving a token for payment processing

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: 			"payment"
client_id: 		"test"
client_secret: 	"yF587AV9Ms94qN2QShFzVR3vFnWkhjbAK3sG"
invoiceID: 		"000000001"
amount: 		100
currency: 		"KZT"
terminal: 		"67e34d63-102f-4bd1-898e-370781d0074d"
postLink:       ""
failurePostLink: ""

FieldDescription
grant_typeAuthorization type, client_credentials used to process payment
scopeResource
client_idMerchand Identification. Can be retrieved on the merchant account page, initially received when registering.
client_secretMerchant access key. Can be retrieved on the merchant account page, initially received when registering.
invoiceIDOrder number. Generated by the merchant. Must be unique for every new order
amountOrder amount
currencyOrder currency
terminalSalespoint identification. Can be retrieved on the merchant account page. Initially generated when registered.
postLinkOptional parameter. Sends postLink in case of success
failurePostLinkOptional parameter. Sends failurePostLink in case of failure

Response

{
  "access_token":"DCEB8O_ZM5U7SO_T_U5EJQ",
  "expires_in": 7200,
  "refresh_token":"",
  "scope":"payment",
  "token_type":"Bearer"
}

FieldDescription
access_tokenA token that is used for payment processing.
expires_inExpiry period of a token
refresh_tokenNot used with this type of authorization
scopeResource, payment type used for payment authorization
token_typeuthorization type

Payment processing

In order to process payment with cardID, paymentType = cardId parameter is required.

Incoming parameters on payment page

FieldDescriptionRequired
invoiceIdOrder numberYes
backLinkA link to go back to the store after a successful transactionYes
failureBackLinkA link to send back the customer to the store after a failed paymentNo
postLinkA link to send a notification about the authorization of a paymentYes
failurePostLinkA link to send a notification about the failed authorization of payment or store errorNo
languageInformation about authorization sever's interface language kaz, rus, engNo
descriptionDescription of the products or services for which payment is being madeYes
accountIdPersonal id of a client in Merchants systemNo
terminalIdterminal number for paymentYes
amountTransaction amountYes
currencyTransaction currencyYes
tokenAuthorization tokenYes
paymentTypepayment type - cardIdYes
cardidCard tokenYes

POST URL /payments/cards/auth Authorize: bearer KJHKJH8&5F&D3&F

Request
{
   "amount":100,
   "currency":"KZT",
   "name":"TEST TEST",
   "terminalId":"67e34d63-102f-4bd1-898e-370781d0074d",
   "invoiceId":"10101112",
   "description":"test",
   "accountId":"uuid000001",
   "email":"parkhomchik@gmail.com",
   "phone":"77472261170",
   "backLink":"https://testmerchant/order/1123",
   "failureBackLink":"https://testmerchant/order/1123/fail",
   "postLink":"https://testmerchant/order/1123",
   "failurePostLink":"https://testmerchant/order/1123/fail",
   "language":"rus",
   "paymentType":"cardId",
   "cardId":{
      "id":"e7e2587f-de26-4f41-ae1f-80c1fea31728"
   }
}