Saved card based payment
When registered, you will be given data, that is needed when making the payment:
TerminalID | Store identification |
ClientID | Client Identification |
ClientSecret | Secret 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: ""
Field | Description |
---|---|
grant_type | Authorization type, client_credentials used to process payment |
scope | Resource |
client_id | Merchand Identification. Can be retrieved on the merchant account page, initially received when registering. |
client_secret | Merchant access key. Can be retrieved on the merchant account page, initially received when registering. |
invoiceID | Order number. Generated by the merchant. Must be unique for every new order |
amount | Order amount |
currency | Order currency |
terminal | Salespoint identification. Can be retrieved on the merchant account page. Initially generated when registered. |
postLink | Optional parameter. Sends postLink in case of success |
failurePostLink | Optional parameter. Sends failurePostLink in case of failure |
Response
{
"access_token":"DCEB8O_ZM5U7SO_T_U5EJQ",
"expires_in": 7200,
"refresh_token":"",
"scope":"payment",
"token_type":"Bearer"
}
Field | Description |
---|---|
access_token | A token that is used for payment processing. |
expires_in | Expiry period of a token |
refresh_token | Not used with this type of authorization |
scope | Resource, payment type used for payment authorization |
token_type | uthorization type |
Payment processing
In order to process payment with cardID, paymentType = cardId parameter is required.
Incoming parameters on payment page
Field | Description | Required |
---|---|---|
invoiceId | Order number | Yes |
backLink | A link to go back to the store after a successful transaction | Yes |
failureBackLink | A link to send back the customer to the store after a failed payment | No |
postLink | A link to send a notification about the authorization of a payment | Yes |
failurePostLink | A link to send a notification about the failed authorization of payment or store error | No |
language | Information about authorization sever's interface language kaz, rus, eng | No |
description | Description of the products or services for which payment is being made | Yes |
accountId | Personal id of a client in Merchants system | No |
terminalId | terminal number for payment | Yes |
amount | Transaction amount | Yes |
currency | Transaction currency | Yes |
token | Authorization token | Yes |
paymentType | payment type - cardId | Yes |
cardid | Card token | Yes |
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" } }