EcoVoucher

Overview

EcoVoucher is a payment method to pay by using vouchers. You can perform purchases through this method by using Payment Page and Gate.

General information

Payment method type Payments by using vouchers
Countries and regions All countries
Payment currencies CAD, GBP, EUR, USD
Currency conversion On the ECommPay side
Purchases +
Payouts
Stored credentials payments
Full refunds
Partial refunds
Chargebacks
Notes The amount of a payment is set by a customer on the EcoVoucher service side, choosing a voucher of a set nominal value, so you can pass a zero value in the request for purchase
Onboarding and access fee refer to your ECommPay key account manager

Interaction diagram

Payment processing by using the EcoVoucher payment method requires merchant's web service, one of ECommPay interfaces, and the ECommPay payment platform, as well as provider's the technical facilities.



Operations support

  Interfaces Amounts*
Payment Page CMS Plug-ins Gate Dashboard minimum maximum
Purchases + +

* Payment processing is possible only by using vouchers of the following nominal values: 10, 15, 25, 50, 75, 100, 150, and 250 in any of supported currencies. If a payment amount exceeds the maximum allowable value of the voucher, the payment is made by using several vouchers. For example, if the payment amount is 1250.00 EUR the payment is made for two vouchers with a value of 500.00 EUR and one voucher with a value of 250.00 EUR.

Processing scenarios

In the EcoVoucher method, customer needs to enter requester voucher data (number, security code, and expire date). To initiate a payment, you need to send data of the issued voucher to customer via merchant's web service.

Figure: Purchase by using Payment Page

Figure: Purchase by using Gate

The sections that follow provide detailed information about what you need to perform payments and how you can analyse the information on payments and operations.

Purchases by using Payment Page

General information

In the EcoVoucher method, when processing a purchase by using Payment Page, the merchant web service should send a request with all the required parameters and signature to the ECommPay URL, process the request for the approval of the purchase amount and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the EcoVoucher method selected. For more information about preselecting payment methods, see in Preselecting payment method. The full sequence and particularities of the purchase process are provided below.



Figure: Purchase sequence by using Payment Page

  1. A customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the specified ECommPay URL.
  3. The request for opening is redirected to the payment platform.
  4. The payment platform performs the initial request processing that involves validation of the required parameters and signature.
  5. Requested Payment Page is generated into the ECommPay payment platform as specified in the project settings and the request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the EcoVoucher method.
  8. The payment platform receives the purchase request for payment processing from Payment Page.
  9. The payment platform performs the internal purchase request processing and sends it to the EcoVoucher service.
  10. The purchase request is processed on the EcoVoucher service side.
  11. The EcoVoucher service generates the data for redirecting the customer to its website form and sends it to the payment platform.
  12. The payment platform sends the customer redirection data to Payment Page.
  13. The customer is redirected to the EcoVoucher website.
  14. The customer specifies the payment amount on the EcoVoucher side.
  15. The request is processed on the EcoVoucher side.
  16. EcoVoucher sends the response of request acceptance to the payment platform.
  17. The payment platform sends request for the approval of purchase amount to the web service.
  18. The request is processed on the web service side.
  19. The response to the request is sent to the payment platform.
  20. The purchase request is sent from the payment platform to the EcoVoucher service.
  21. The payment is processed on the EcoVoucher side.
  22. The customer is redirected to Payment Page.
  23. The EcoVoucher service sends the result notification to the payment platform.
  24. The payment platform sends a callback with the payment result to the web service.
  25. The payment platform sends the result to Payment Page.
  26. A page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the EcoVoucher payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.

Purchase initiation request format

There are several things you need to consider when using the EcoVoucher method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are mandatory for any payment method:
    • customer_id—the unique ID of the customer within your project
    • project_id—the project ID obtained from ECommPay
    • payment_id—payment ID unique within the project
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor units
  2. The currency of payment can be any from the list in General information.
  3. The amount of a payment is set by a customer on the EcoVoucher service side, choosing a voucher of a set nominal value, so you can pass a zero value in the request for purchase
  4. Payment processing is possible only by using vouchers of the following nominal values: 10, 15, 25, 50, 75, 100, 150, and 250 in any of supported currencies. If a payment amount exceeds the maximum allowable value of the voucher, the payment is made by using several vouchers. For example, if the payment amount is 1250.00 EUR the payment is made for two vouchers with a value of 500.00 EUR and one voucher with a value of 250.00 EUR.
  5. If you need to have payment form displayed with the EcoVoucher method selected, set the force_payment_method parameter to ecoVoucher.
  6. If required, you can also add any other additional parameters Payment Page supports.
  7. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.

Thus, a correct payment initiation request in the EcoVoucher method must include project, customer and payment IDs, the currency and the amount of a payment in the appropriate currency, as shown in the following example:

EPayWidget.run(
    { payment_id: 'X03936', 
      payment_amount: 0, 
      payment_currency: 'EUR', 
      project_id: 190,     
      customer_id: '12',
      signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HASCQ9vySO\/RLCvht...=="
    }
)

For information about all parameters available in the EcoVoucher method, see Payment Page invocation parameters.

Format of amount approval requests and responses

After a successful response to the purchase initiation request is received from the EcoVoucher service, the payment platform sends a request for purchase amount approval to the web service.

  1. The check_deposit request for approval of purchase amount is sent by using HTTP method POST to the specified web service URL.
  2. The request contains the following required parameters:
    • type—operation type on the web service side, value is always check_deposit
    • customer_id—customer identifier on the web service side, unique within the project
    • project_id—the project ID obtained from ECommPay
    • payment_id—payment ID unique within the project
    • amount—payment amount in minor units
    • currency—currency in the ISO-4217 alpha-3 format
    • payment_method—payment method title, the value is always eco-voucher
    • signature—signature created after you specify all the required parameters

    Figure: Example of a request for approval of purchase amount

    {
        "type": "check_deposit",
        "project_id": 258,
        "payment_id": "X03936",
        "customer_id": "123",
        "amount": 1000,
        "currency": "EUR",
        "payment_method": "eco-voucher",
        "signature": "+5O+5Qix8kbnOgIQe5JddN50ardeRdGh7Jfi7SJXULy\/+6GbR5nwToLrUXmQ=="
    }
  3. Response to the check_deposit request must be synchronous and contain the following required parameters:
    • code—response code. To approve the purchase amount specify the value to 0, to decline specify any other amount (in this case the payment status is set to decline, and a declined purchase callback is sent from the payment platform side). If the response uses the status-code of the 4xx or 5xx classes, the payment status is also set to decline
    • payment_id—payment ID unique within the project

    Figure: Example of the response

    {
       "code":0,
       "payment_id":"X03936"
    }

Callback format

The EcoVoucher method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 10.00 EUR purchase made by the 12 customer in the 238 project.

Figure: Example of a successful purchase callback

{
        "project_id": 238,
        "payment": {
            "id": "TEST_15354433ww22",
            "type": "purchase",
            "status": "success",
            "date": "2018-09-03T12:03:20+0000",
            "method": "eco-voucher",
            "sum": {
                "amount": 1000,
                "currency": "EUR"
            },
            "description": ""
        },
        "customer": {
            "id": "12"
        },
        "operation": {
            "id": 151162,
            "type": "sale",
            "status": "success",
            "date": "2018-09-03T12:03:20+0000",
            "created_date": "2018-09-03T12:01:52+0000",
            "request_id": "166ffa4ea",
            "sum_initial": {
                "amount": 1000,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "EUR"
            },
            "provider": {
                "id": 1109,
                "payment_id": "3324010000019879134",
                "date": "2018-09-03T12:03:19+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "zbMmZm+dIB9vSlVwC6hCBpBRol50WjQfwTkGhEvoA5pvUT...=="
    }

The following is the example of a callback for a purchase declined due to time-out.

Figure: Example of a declined purchase callback

{
        "project_id": 238,
        "payment": {
            "id": "TEST_15731114254729",
            "type": "purchase",
            "status": "decline",
            "date": "2019-11-07T07:30:52+0000",
            "method": "eco-voucher",
            "sum": {
                "amount": 0,
                "currency": "EUR"
            },
            "description": "TEST_1573111425472"
        },    
        "customer": {
            "id": "1"
        },
        "operation": {
            "id": 18321000013161,
            "type": "sale",
            "status": "decline",
            "date": "2019-11-07T07:30:52+0000",
            "created_date": "2019-11-07T07:30:19+0000",
            "request_id": "00018322",
            "sum_initial": {
                "amount": 0,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 0,
                "currency": "EUR"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 1109,
                "payment_id": "4057010000023812693",
                "auth_code": "",
                "date": "2019-11-07T07:30:51+0000"
            }
        },
        "signature": "yTXwH/0+FIhMv7iBRLLlf0HOg9nH/++EFQOcjoESkBGAi58N/DKKGs...=="
    }

Related topics

The following topics might be useful when implementing payments by using Payment Page:

Purchases by using Gate

General information

In the EcoVoucher method, when processing a purchase by using Gate, the merchant web service is required to do the following:

  1. Send a request with all the required parameters and signature to the ECommPay URL.
  2. Redirect the customer to the EcoVoucher service.
  3. Process the request for the approval of purchase amount.
  4. Send the response with the approval of the amount.
  5. Get the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.



Figure: Purchase sequence by using Gate

  1. A customer initiates a purchase through EcoVoucher on the merchant's web service side.
  2. The web service sends the request for processing the purchase by using Gate to the specified ECommPay URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation of the required parameters and signature.
  5. The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response format.
  6. The payment platform performs the internal payment request processing and redirects the request to the EcoVoucher service.
  7. The request is processed on the EcoVoucher side.
  8. The EcoVoucher service sends the data for redirecting the customer to the EcoVoucher service to the payment platform.
  9. The payment platform sends the callback with the redirection data in the redirect_data object to the web service.
  10. The customer is redirected from the web service to the EcoVoucher service.
  11. The customer specifies the purchase amount on the EcoVoucher side.
  12. The request is processed on the EcoVoucher side.
  13. EcoVoucher sends the response of request acceptance to the payment platform.
  14. The payment platform sends request for the approval of purchase amount to the web service.
  15. The request is processed on the web service side.
  16. The response to the request is sent to the payment platform.
  17. The purchase request is sent from the payment platform to the EcoVoucher service.
  18. The payment is processed on the EcoVoucher side.
  19. The customer is redirected to the merchant's web service.
  20. The EcoVoucher service sends the payment result notification to the payment platform.
  21. The ECommPay payment platform sends a callback to the web service.
  22. The customer receives the payment result on the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the EcoVoucher payment method and provide the information on the format of callbacks with purchase results.

Purchase initiation request format

There are several things you must consider when using purchase requests in the EcoVoucher method:
  1. You send purchase requests by sending the request to v2/payment/voucher/eco-voucher/sale by using HTTP method POST. This is the voucher payment group /v2/payment/voucher/{payment_method}/sale.
  2. The following objects and parameters must be specified in any request:
    • Object general—general request identification information:
      • project_id—the project ID obtained from ECommPay
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
    • Object customer—customer information:
      • id—identifier, unique within the project
      • ip_address—customer IP address
    • Object payment—purchase information:
      • amount—purchase amount in minor currency units
      • currency—purchase currency in the ISO-4217 alpha-3 format
    • Object return_url—URL for redirecting a customer from the EcoVoucher website:
      • success—URL for redirecting a customer after a performed purchase
      • decline —URL for redirecting a customer after a declined purchase
  3. The currency of payment can be any from the list in General information.
  4. The amount of a payment is set by a customer on the EcoVoucher service side, choosing a voucher of a set nominal value, so you can pass a zero value in the request for purchase
  5. Payment processing is possible only by using vouchers of the following nominal values: 10, 15, 25, 50, 75, 100, 150, and 250 in any of supported currencies. If a payment amount exceeds the maximum allowable value of the voucher, the payment is made by using several vouchers. For example, if the payment amount is 1250.00 EUR the payment is made for two vouchers with a value of 500.00 EUR and one voucher with a value of 250.00 EUR.
  6. If required, you can also add any other additional parameters Gate supports.

Thus, a correct payment request in the EcoVoucher method must include project, customer and payment IDs, signature, customer and account information, currency and amount of the purchase, as shown in the following example:

Figure: Example of a purchase initiation request

{
    "general": {
      "project_id": 417,
      "payment_id": "payment_123",
      "signature": "PJkV8ejrtyUG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
      "amount": 0,
      "currency": "EUR"
    },
    "customer": {
      "ip_address": "66.249.79.102",
      "id": "play7"
    },
    "return_url":{
      "decline" : "http://return.url",
      "success" : "http://return.url"
    }
}

Formats of the customer redirection data

To redirect a customer from the web service to the EcoVoucher site, you must receive a callback from the payment platform containing the URL for redirection in the redirect_data.url parameter and data to be sent in the request body in the redirect_data.body parameter, and use these parameters when opening the HTML page using the method specified in the redirect_data.method parameter.

The following is the callback fragment containing the redirection data.

    
    "redirect_data": {
              "body": {
                        "PaymentPageID": "3324",
                        "MerchantAccountNumber": "118069",
                        "CustomerIdAtMerchant": "12",
                        "OnSuccessUrl": "https://process/complete-redirect?wsid=4a9qleke55vv6jfonut1jtpdp2",
                        "OnFailureUrl": "https://process/complete-redirect?wsid=4a9qleke55vv6jfonut1jtpdp2",
                        "TxID": 15781000001162,
                        "Currency": "EUR",
                        "TransferUrl": "https://ecoVoucherViaEcoPayz/callback/",
                        "CallbackUrl": "https://ecoVoucherViaEcoPayz/callback/",
                        "Checksum": "d1aa9a777d77f894b86962c51b341710"
                    },
                    "method": "POST",
                    "url": "https://secure.ecopayz.com/PrivateArea/ecoVoucherOnlineTransfer.aspx"
               }

Format of amount approval requests and responses

After a successful response to the purchase initiation request is received from the EcoVoucher service, the payment platform sends a request for purchase amount approval to the web service.

  1. The check_deposit request for approval of purchase amount is sent by using HTTP method POST to the specified web service URL.
  2. The request contains the following required parameters:
    • type—operation type on the web service side, value is always check_deposit
    • customer_id—customer identifier on the web service side, unique within the project
    • project_id—the project ID obtained from ECommPay
    • payment_id—payment ID unique within the project
    • amount—payment amount in minor units
    • currency—currency in the ISO-4217 alpha-3 format
    • payment_method—payment method title, the value is always eco-voucher
    • signature—signature created after you specify all the required parameters

    Figure: Example of a request for approval of purchase amount

    {
        "type": "check_deposit",
        "project_id": 258,
        "payment_id": "X03936",
        "customer_id": "123",
        "amount": 1000,
        "currency": "EUR",
        "payment_method": "eco-voucher",
        "signature": "+5O+5Qix8kbnOgIQe5JddN50ardeRdGh7Jfi7SJXULy\/+6GbR5nwToLrUXmQ=="
    }
  3. Response to the check_deposit request must be synchronous and contain the following required parameters:
    • code—response code. To approve the purchase amount specify the value to 0, to decline specify any other amount (in this case the payment status is set to decline, and a declined purchase callback is sent from the payment platform side). If the response uses the status-code of the 4xx or 5xx classes, the payment status is also set to decline
    • payment_id—payment ID unique within the project

    Figure: Example of the response

    {
       "code":0,
       "payment_id":"X03936"
    }

Callback format

The EcoVoucher method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 10.00 EUR purchase made by the 12 customer in the 238 project.

Figure: Example of a successful purchase callback

{
        "project_id": 238,
        "payment": {
            "id": "TEST_15354433ww22",
            "type": "purchase",
            "status": "success",
            "date": "2018-09-03T12:03:20+0000",
            "method": "eco-voucher",
            "sum": {
                "amount": 1000,
                "currency": "EUR"
            },
            "description": ""
        },
        "customer": {
            "id": "12"
        },
        "operation": {
            "id": 151162,
            "type": "sale",
            "status": "success",
            "date": "2018-09-03T12:03:20+0000",
            "created_date": "2018-09-03T12:01:52+0000",
            "request_id": "166ffa4ea",
            "sum_initial": {
                "amount": 1000,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "EUR"
            },
            "provider": {
                "id": 1109,
                "payment_id": "3324010000019879134",
                "date": "2018-09-03T12:03:19+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "zbMmZm+dIB9vSlVwC6hCBpBRol50WjQfwTkGhEvoA5pvUT...=="
    }

The following is the example of a callback for a purchase declined due to time-out.

Figure: Example of a declined purchase callback

{
        "project_id": 238,
        "payment": {
            "id": "TEST_15731114254729",
            "type": "purchase",
            "status": "decline",
            "date": "2019-11-07T07:30:52+0000",
            "method": "eco-voucher",
            "sum": {
                "amount": 0,
                "currency": "EUR"
            },
            "description": "TEST_1573111425472"
        },    
        "customer": {
            "id": "1"
        },
        "operation": {
            "id": 18321000013161,
            "type": "sale",
            "status": "decline",
            "date": "2019-11-07T07:30:52+0000",
            "created_date": "2019-11-07T07:30:19+0000",
            "request_id": "00018322",
            "sum_initial": {
                "amount": 0,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 0,
                "currency": "EUR"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 1109,
                "payment_id": "4057010000023812693",
                "auth_code": "",
                "date": "2019-11-07T07:30:51+0000"
            }
        },
        "signature": "yTXwH/0+FIhMv7iBRLLlf0HOg9nH/++EFQOcjoESkBGAi58N/DKKGs...=="
    }

Related topics

The following topics might be useful when implementing payments through Gate:

Analysis of payments results

As with other payment methods ECommPay offers, when using the EcoVoucher method, you have several options to analyse the information about payments and operations performed by using the method—alone or in conjunction with other methods.

You can load and analyse all the necessary information in Dashboard, for instance you can use the analytic panels on the Analytics tab to this end.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard allows you to download reports in CSV and XLS formats—by using the tools on the Payments tab. You can perform export as a one-time download to your local computer or have payment data regularly exported and delivered to email addresses you specify.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by using the /operations/get queries.

If you have any further questions regarding payment data analysis, contact ECommPay technical support.