VivaPayments Withdrawal

Viva Wallet is a payment solution that allows consumers to make easy, instant and secure payments at participating ecommerce merchants over the Internet. Viva is a popular payment method in Greece.

The following method IDs are covered in this section:

ID

Name

Credit/Debit State

Reversal State

173

VivaPaymentsWithdrawal

WithdrawnByProvider ()

Payment method interaction type: Synchronous execution (see Interaction Types).

Redirect Integration

Currently not supported.

Backend2BackendIntegration

The following table contains the fields to be sent in the initiatePaymentRequest.specificPaymentAccountData xml section:

📘

WalletID or PersonID

Either the AccountNumber (Viva WalletID) or SubAccountNumber (Viva PersonID) has to be sent within specificPaymentAccountData.

key (value type, account type, required)

value

AccountNumber
(string)

User’s wallet ID for VivaPayments provider. Money will be credited to this wallet, this parameter is sent as the TargetWalletID.

SubAccountNumber (string)

User´s account (GUID) at VivaPayments provider. Money will be credited to this user. This parameter is sent as the TargetPersonID.

The following parameters can be provided in initiatePaymentRequest.specificPaymentData:

key (value type, account type, required)

value

PaymentDescription
(string)

Description of the payment, this will be shown in customer’s transaction statement.

Example initiatePaymentRequest with AccountNumber (Viva User Wallet ID):

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
  <merchantID>Merchant</merchantID>
  <shopID>Shop</shopID>
  <merchantTransactionID>2d70307e-5d8f-42ff-9cd6-08a20dff3891</merchantTransactionID>
  <paymentMethodID>217</paymentMethodID>
  <amount currencyCode="EUR">10.01</amount>
  <userID>85fbd7a9-4b48-44ce-81b0-5880940b4a6c</userID>
  <userData>
    <username xmlns="http://www.cqrpayments.com/PaymentProcessing">85fbd7a9-4b48-44ce-81b0-5880940b4a6c</username>
  </userData>
  <userIP>127.0.0.1</userIP>
  <userSessionID>e4c64d9a-dfce-4de0-b52b-f921e279c88d</userSessionID>
  <creationTypeID>1</creationTypeID>
  <specificPaymentData>
    <data xsi:type="keyStringValuePair">
      <key>PaymentDescription</key>
      <value>Withdrawal description</value>
    </data>
  </specificPaymentData>
  <paymentAccountID>6502b5d0-af52-4c3c-b72e-187487998b8</paymentAccountID>
  <paymentAccount>
    <specificPaymentAccountData>
      <data xsi:type="keyStringValuePair">
        <key>AccountNumber</key>
        <value>55555</value>
      </data>
    </specificPaymentAccountData>
  </paymentAccount>
</initiatePaymentRequest>

Example initiatePaymentRequest with SubAccountNumber (Viva User ID):

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
       <merchantID>B2BTestMerchant</merchantID>
       <shopID>150001</shopID>
       <merchantTransactionID>b07e2430-fb3a-4101-a34c-5db32ec2a4d9</merchantTransactionID>
       <paymentMethodID>217</paymentMethodID>
       <amount currencyCode="EUR">15.02</amount>
       <userID>85fbd7a9-4b48-44ce-81b0-5880940b4a6c</userID>
       <userData>
             <username>85fbd7a9-4b48-44ce-81b0-5880940b4a6c</username>          
       </userData>
       <userIP>127.0.0.1</userIP>
       <userSessionID>5248d9e4-5352-4777-afaa-acfc3c9aafc0</userSessionID>
       <creationTypeID>1</creationTypeID>
       <specificPaymentData>
             <data xsi:type="keyStringValuePair">
                    <key>PaymentDescription</key>
                    <value>Withdrawal description BDD:895bbdab-1c1d-42aa-a998-7438d456aad8</value>
             </data>
       </specificPaymentData>
       <paymentAccount>
             <specificPaymentAccountData>
                    <data xsi:type="keyStringValuePair">
                           <key>SubAccountNumber</key>
                           <value>b4398809-8a20-44be-8167-da89450f9bb2</value>
                    </data>
             </specificPaymentAccountData>
       </paymentAccount>
</initiatePaymentRequest>

Example initiatePaymentResponse:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentResponse 
    xmlns="http://www.cqrpayments.com/PaymentProcessing" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <payment xsi:type="paymentWithPaymentAccount">
        <merchantID>Merchant</merchantID>
        <shopID>Shop</shopID>
        <paymentMethod>
            <key>217</key>
            <value>VivaPaymentsWithdrawal</value>
        </paymentMethod>
        <merchantTransactionID>2d70307e-5d8f-42ff-9cd6-08a20dff3891</merchantTransactionID>
        <paymentID>814d65d3-c9e5-4578-9685-36bc5019c574</paymentID>
        <userID>85fbd7a9-4b48-44ce-81b0-5880940b4a6c</userID>
        <paymentProvider>
            <key>144</key>
            <value>VivaPayments</value>
        </paymentProvider>
        <amount currencyCode="EUR">10.01</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>e46937bc-1cec-4d17-bcc7-9ce51cb0501e</id>
            <definition>
                <key>20</key>
                <value>WithdrawnByProvider</value>
            </definition>
            <createdOn>2016-04-08T08:04:36.7910373Z</createdOn>
            <description>{"DebitTransactionId":"eee0beff-7cd7-4b10-afae-e423712d52cb","CreditTransactionId":"5f6da41c-5334-462c-877f-96d79a9b8d1e"}</description>
            <paymentStateDetails xsi:nil="true"></paymentStateDetails>
        </state>
        <isExecuted>true</isExecuted>
        <baseAmount currencyCode="EUR">10.01</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>DebitTransactionID</key>
                <value>eee0beff-7cd7-4b10-afae-e423712d52cb</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>814d65d3-c9e5-4578-9685-36bc5019c574</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderTransactionID</key>
                <value>5f6da41c-5334-462c-877f-96d79a9b8d1e</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>6502b5d0-af52-4c3c-b72e-187487998b8</paymentAccountID>
        </paymentAccount>
    </payment>
</initiatePaymentResponse>

Notifications

The standard notification mechanism is used for notifying the merchant in the background (asynchronously) about payment state changes. For more information see PaymentStateChangedNotification.

Example handlePaymentStateChangedNotificationRequest: