Before initializing the transfer page, you need to install the SDK in your mobile application.

iOS SDK installation instructions

Android SDK installation instructions

Instructions for launching the translation page in the SDK

After configuring the SDK in your mobile application, proceed to setting up the translation itself.

You have the option to launch several types of translation:

  1. P2P
  2. OCT
  3. AFT
  4. Translation to a mobile phone

To use these types of translations, you need to contact your manager.

1. Initialization of the Invoice instance

Before going to the payment page, initialize an instance of the Invoice model.

Description of general fields

Field nameRequiredDescription
id (invoiceId)YesOrder 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, uniqueness must also be maintained for the last 6 characters.
amountYesOrder Amoount
currencyYesCurrency
postLinkYesPayment notification
failurePostLinkYesFailed payment notification, if not filled out, the information will be sent to the address specified in postLink
backLinkYesReturn link to the store in case of successful payment
failureBackLinkYesReturn link to the store in case of unsuccessful payment
descriptionNoOrder description, maximum 125 bytes
isRecurrentNotrue to set up a recurring payment, otherwise false. By default, we recommend using false
autoPaymentFrequencyNoPayment frequency: WEEKLY, MONTHLY, QUARTERLY
homebankTokenNoFor the possibility of payment with cards saved in the Homebank
accountIdNoOptional field for specifying the customer's store identifier
Тип переводаYesP2P, AFT, OCT, byPhone. cardID → If you have saved recipient or sender card data in ePay, you can use this type of transfer so that you do not have to re-enter card details.
senderCardNocardID → If you have saved recipient or sender card data in ePay, you can use this type of transfer so that you do not have to re-enter card details.
receiverCardNocardID → If you have saved recipient or sender card data in ePay, you can use this type of transfer so that you do not have to re-enter card details.

Example of initializing an Invoice instance in iOS

import EpaySDK

let invoice = Invoice(
    id: invoiceId,
    amount: amount,
    currency: "KZT",
    accountId: "1",
    description: "",
    postLink: "https://testmerchant/order/1123",
    failurePostLink: "https://testmerchant/order/1123/fail",
    isRecurrent: false,
    autoPaymentFrequency: .weekly,
    transferType: .P2P
)

// Transfer Types
public enum TransferType: String, CaseIterable {
  case P2P, AFT, OCT, CardId, byPhone}            

Example of initializing an Invoice instance in Android

import com.ss.halykepay.data.model.Invoice

val invoice = Invoice(
    id = invoiceId,
    amount = amount,
    currency = "KZT",
    accountID = "1",
    description = "",
    postLink = "https://testmerchant/order/1123",
    failurePostLink = "https://testmerchant/order/1123/fail",
    isRecurrent = false,
    autoPaymentFrequency = Invoice.AutoPaymentFrequency.WEEKLY,
    isP2P = true,
)

2. Launching payment page

iOS Example

import EpaySDK

let pm = PaymentModel(authConfig: <Previously configured AuthConfig>, invoice: <Invoice instance created by paragraph above>)

let launchScreenVC = LaunchScreenViewController(paymentModel: pm)
launchScreenVC.setEnvironmetType(type: .prod) //for the test, use .dev
navigationController?.pushViewController(launchScreenVC, animated: true)

Android Example

Using the previously created instance of HalykEpaySDK, launch the payment page by passing the instance of Invoice.
halykEpaySdk.launchEpay(invoice)

3. Response Processing

The response processing settings are described in the SDK Installation Instructions