Create a payment notification

How to create a payment notification.

Overview

Payment notifications take advantage of our Smart Checkout solution, along with all the features and all payment methods it offers.

You can create payment notifications either via Self Care or via our API. Furthermore, if a payment notification is created via our API, you have the option to either let Viva send the payment notification via email to the customer, or you could send the payment notification on your own to the customer (via email or otherwise, e.g. chat app).

Keep in mind that payment notifications support various payment features, such as:

Payment notifications through Self Care

You can send payment notifications through SelfCare, following the steps described here.

Payment notifications through API and sent to customer by Viva

You can create a payment notification by creating a payment order and setting the paymentNotification parameter to true, and thus have Viva send the payment notification via email to the customer. Refer to this link on how to create a payment order.

You should use OAuth2 authentication method.

The below example creates a payment notification and sends it to the mentioned email address.

Request example

post    /checkout/v2/orders

Run in Postman

curl --location --request POST 'https://demo-api.vivapayments.com/checkout/v2/orders' \
-H 'Authorization: Bearer [access token]' \
-H 'Content-Type: application/json' \
-data-raw '{
"amount": 2000,
"customerTrns": "Short description for the payment notification",
"customer": {
"email": "someone@vivawallet.com",
"fullName": "Full Name",
"phone": "string",
"countryCode": "en",
"requestLang": "en-GB"
},
"paymentTimeout": 0,
"preauth": false,
"allowRecurring": false,
"maxInstallments": 0,
"paymentNotification": true,
"tipAmount": 1,
"disableExactAmount": false,
"disableCash": false,
"disableWallet": false,
"sourceCode": "Default",
"merchantTrns": "string",
"tags": ["string 1","string 2"]
}'

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://demo-api.vivapayments.com/checkout/v2/orders',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
"amount": 2000,
"customerTrns": "Short description for the payment notification",
"customer": {
"email": "someone@vivawallet.com",
"fullName": "Full Name",
"phone": "string",
"countryCode": "el",
"requestLang": "el-GR"
},
"paymentTimeout": 0,
"preauth": false,
"allowRecurring": false,
"maxInstallments": 0,
"paymentNotification": true,
"tipAmount": 1,
"disableExactAmount": false,
"disableCash": false,
"disableWallet": false,
"sourceCode": "Default",
"merchantTrns": "string",
"tags": []
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer [access token]',
    'Content-Type: application/json',
    'Cookie: ak_bmsc=5DD1622E8F6E3FEA04199B9386DB2AA7~0000V+yaPuTilrp/GPkhPn8q4iVA='
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response example

{
    "orderCode": 4822010381672607
}

A payment notification email will be sent to the email address which you have set in email parameter. You may find below an email example.

Notification Email Sample

Refer to this link for further details on how to create a payment notification to support pre-authorization payments, recurring payments, card installments, and so on.

Payment notifications through API and sent to customer by you

To send payment notifications on your own (via email or otherwise, e.g. chat app), you should Create Payment Order and set the paymentNotification parameter to false.

Then send the below link to your customer:

Environment URL
Production https://www.vivapayments.com/web/checkout?ref={OrderCode}
Demo https://demo.vivapayments.com/web/checkout?ref={OrderCode}

When the customer clicks the link, the customer is directed to our Smart Checkout, where he can make the payment.

Refer to this link for further details on how to create a payment notification to support pre-authorization payments, recurring payments, card installments, and so on.

You can use the optional Smart Checkout features, such as setting your desired payment method or your brand color.

Create payment notifications in bulk without coding

You may find below the instructions about how to create multiple payment notifications (not one by one) and send them out to the customers all at once.

Environment URL
Production https://api.vivapayments.com/checkout/v2/orders
Demo https://demo-api.vivapayments.com/checkout/v2/orders

Postman Endpoints

Environment URL
Production https://accounts.vivapayments.com/connect/token
Demo https://demo-accounts.vivapayments.com/connect/token

Postman Variables

Please consider the environment you work in and update the “request endpoint” and “token_endpoint” values according to the above tables.

Postman Parameters

Get Support

If you would like to integrate with Viva, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!