Skip to main content

Setup Payment Account

To setup a payment account, you will need to contact one of the payment service providers
(PSP) and request to enable payment for your bot. You might also need to contact the merchant you work with to get the credentials for the
payment service provider.

Enable Payment

You need to contact one of the payment service providers (PSP) and request to enable
payment for your bot:

Then the following steps should be performed:

  • The payment service provider (PSP) will perform all necessary checks, sign an
    agreement with the merchant, approve the request, and then submit a request to Viber
    to enable the payments feature for your chatbot.

  • The PSP's request to Viber must include the chatbot URI, your email (as the chatbot
    developer), and the email of the merchant who owns the chatbot (if different from that
    of the developer).

  • If Viber approves the request, the payment feature will be enabled on your bot, and
    both the merchant and the PSP will receive notification of the approval.

Once you get the approval you will need to request test and production parameters from
the PSP or the marchant you work with. See the section payment parameters below.

Payment Parameters

To send payment requests you will need to privde the credentials for the PSP you have
chosen. Each PSP has its own set of credentials, the following guides will help you to
understand what credentials you need to provide:

LiqPay

The following parameters are required to send payment requests through LiqPay:

KeyValueSourceDescription
gatewayliqpayPayment service providerPayment service provider ID in Google Pay and Apple Pay systems
getwayMerchantIdMerchant IDMarchantMerchant Public Key in LiqPay PSP system For more info click here
urlhttps://liqpay.ua/api/viberPayment service providerURL for payment requests to the paymen service provider
dataany stringMarchantEnqrypted data about a purchase. For more info click here
signatureany stringMarchantMerchant authentication signature in the payment service provider system. For more info click here
payeeIdany stringMarchantMerchant Public Key in LiqPay PSP system. For more info click here here

Here is an example of a payment request to LiqPay, note the payment parameters
fields under the payment key:

LiqPay payment request example
{
"auth_token": "1234567890&",
"url": "https://api.webhookinbox.com/i/u9MMDI2ns/in/",
"min_api_version": 10,
"receiver": "jc9HsWTZ2Yf2NkRZ8KcNug==",
"sender":
{
"name": "mybot",
"avatar": ""
},
"type": "payment",
"payment":
{
"type":"GooglePay",
"description":"Test purchase",
"total_price":9.99,
"currency_code":"UAH",
"payment_parameters":
[
{"key": "gateway", "value": "liqpay"},
{"key": "gatewayMerchantId", "value": "abc123"},
{"key": "url", "value": "https://www.liqpay.ua/api/viber"},
{"key": "data", "value": "qwerty12345"},
{"key": "signature", "value": "123abc" },
{"key":"payeeId","value":"abc123"}
]
}
}

If you need assistance connecting to LiqPay, please contact LiqPay support through their developers portal.

Portmone

The following parameters are required to send payment requests through Portmone:

KeyValueSourceDescription
gatewayportmonecomPayment service providerPayment service provider ID in Google Pay and Apple Pay systems
getwayMerchantIdMerchant IDMarchantMerchant ID in Portmone system
urlhttps://portmone.com.ua/r3/en/api/gateway/Payment service providerURL for payment requests to the paymen service provider
loginany stringMarchantMerchant login in Portmone system
passwordany stringMarchantMerchant password or token in Portmone system. Using a generated password token is recommended but not required. The token will conceal your actual password from the request body. You can access the password in the 'Personal Area' of the Portmone website or in the Portmone developer documentation.

Here is an example of a payment request to LiqPay, note the payment parameters
fields under the payment key:

Portmone payment request example
{
"auth_token": "1234567",
"min_api_version": 10,
"receiver": "jc9HsWTZ2Yf2NkRZ8KcNug==",
"sender":
{
"name": "mybot",
"avatar": ""
},
"type": "payment",
"payment":
{
"type":"GooglePay",
"description":"test payment",
"total_price":1.23,
"currency_code":"UAH",
"payment_parameters":
[
{"key":"gateway","value":"portmonecom"},
{"key":"gatewayMerchantId","value":"12345"},
{"key":"url","value":"https://www.portmone.com.ua/r3/api/gateway"},
{"key":"login","value":"login"},
{"key":"password","value":"PasswordHashCode"},
{"key":"payeeId","value":"12345"}
]
}
}

IPay.ua

The following parameters are required to send payment requests through IPay.ua:

KeyValueSourceDescription
gatewayipayPayment service providerPayment service provider ID in Google Pay and Apple Pay systems
getwayMerchantIdMerchant IDMarchantMerchant ID in IPay.ua system
urlhttps://api-viber.ipay.uaPayment service providerURL for payment requests to the paymen service provider
subMerchantIdany stringMarchantMerchant ID in IPay.ua system. Can be found here
authSaltany stringMarchantMerchant password or token in IPay.ua system. Can be found here
authSignany stringMarchantMerchant password or token in IPay.ua system. Can be found here
transactionsany stringMarchantOptional. An array of transactions, as a string, not a JSON array. each object is composed of the following fields: desc and amount. For example: [{\"desc\":\"test\",\"amount\":30}]