Amazon Pay

Overview

Introduction

Amazon Pay is a payment method which allows to process payments in Indian rupiahs and US dollars by using e-wallets in India. This method supports payouts.

This article provides information about working with the Amazon Pay method: general insights are presented in the Overview section, while information about the actions required to process payments and perform other actions is presented in the sections that follow.

General information

Payment method type digital wallet payments
Payment instruments digital wallets
Countries and regions IN
Payment currencies INR, USD
Currency conversion on the ecommpay side
One-time purchases
Credential-on-file purchases
Full refunds
Partial refunds
Payouts +
Chargebacks
Notes
Onboarding and access fee refer to your ecommpay account manager

Interaction diagram

Payment processing by using the Amazon Pay method involves the merchant's web service, one of ecommpay interfaces, the ecommpay payment platform, and technical facilities of the Amazon Pay service.



Operations support

Various platform interfaces can be used to process payments and perform operations using the Amazon Pay method. Payouts can be processed by using Gate and Dashboard. At the same time, regardless of the interfaces used, the following limitations are applicable.

When working with the Amazon Pay the following limitations are applicable.

  Amounts, INR
minimum maximum
Payouts 1.00 400,000.00

Processing scenarios

To initiate a payout by using the Amazon Pay method you need to notify the customer via the web service.

Figure: Payout by using Gate



Payouts by using Gate

General information

To process a payout through Gate by using the Amazon Pay method, send a request with all required parameters and signature to the ecommpay URL and receive a callback with the result. The full sequence and special aspects of payout processing are provided below.



Figure: Payout processing by using Gate: step-by-step description

  1. A customer initiates a payout by using the Amazon Pay method in the web service.
  2. The web service sends the request for processing the payout by using Gate to the specified ecommpay URL.
  3. The payment platform receives the request.
  4. The payment platform validates the required parameters and signature in the request.
  5. The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
  6. The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Amazon Pay service.
  7. The payout is processed on the side of the Amazon Pay service.
  8. The Amazon Pay service sends the result notification to the payment platform.
  9. The payment platform sends the result callback to the web service.
  10. The customer receives the payout result information from the web service.

Information about the formats of requests and callbacks used for processing payouts by using the Amazon Pay method via Gate is presented further in this section. General information about working with the Gate API is presented in Interaction concepts.

Request format

There are several things you need to consider when sending payout requests by using the Amazon Pay method:

  1. To initiate each payout send a separate POST request to the /v2/payment/wallet/amazonpay/payout endpoint. This endpoint belongs to the group /v2/payment/wallet/{payment_method}/payout.
  2. Each request must include the following objects and parameters:
    • Object general—general payout information:
      • project_id—project identifier obtained from ecommpay during integration
      • payment_id—payment identifier unique within the project
      • signature—request signature generated after all required parameters are specified (details—in the Signature generation and verification) details
    • Object payment—payment information:
      • amount—payout amount in the smallest currency unit
      • currency—payout currency code in the ISO-4217 alpha-3 format
    • Object customer—customer information:
      • id—customer identifier unique within the project
      • ip_address—customer IP address relevant for the initiated payout
      • first_name—customer first name
      • last_name—customer last name
      • email—customer email address
      • address—customer postal address
    • Object account—recipient e-wallet account information:
      • number—recipient phone number linked to the e-wallet account
  3. Additionally, any other parameters included in the specification can be used.

Thus, a correct payout request by using the Amazon Pay method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer information, as well as account number and signature.

{
  "general": {
    "project_id": 818,
    "payment_id": "ORDER_I1558600157",
    "signature": "+K6jllym+PtOdESkijfsBeR6bKROUsslA=="
  },
  "payment": {
    "amount": 150000,
    "currency": "INR"
  },
  "customer": {
    "id": "24900",
    "ip_address": "192.0.2.0",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "email": "Lovelace@example.com",
    "address": "Delhi, Main st., 20"
  },
  "account": {
    "number": "9811181996"
  }
}

Figure: Example of sufficient data in a purchase request

{
  "general": {
    "project_id": 818,
    "payment_id": "ORDER_I1558600157",
    "signature": "+K6jllym+PtOdESkijfsBeR6bKROUsslA=="
  },
  "payment": {
    "amount": 150000,
    "currency": "INR"
  },
  "customer": {
    "id": "24900",
    "ip_address": "192.0.2.0",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "email": "Lovelace@example.com",
    "address": "Delhi, Main st., 20"
  },
  "account": {
    "number": "9811181996"
  }
}

Callback format

The Amazon Pay method uses the standard format for callbacks to deliver payout results. For more information, see Callbacks.

The following is the example of a callback with information about a 100.00 INR payout made in the 197 project.

Figure: Example of callback data indicating that the payout has been processed

{
        "project_id": 197,
        "payment": {
            "id": "Payout-test-2-2209",
            "type": "payout",
            "status": "success",
            "date": "2020-09-22T08:50:56+0000",
            "method": "amazonpay",
            "sum": {
                "amount": 10000,
                "currency": "INR"
            },
            "description": ""
        },
        "account": {
            "number": "9811181996"
        },
        "customer": {
            "id": "1",
            "phone": "9811181996"
        },
        "operation": {
            "id": 77184010013601,
            "type": "payout",
            "status": "success",
            "date": "2020-09-22T08:50:56+0000",
            "created_date": "2020-09-22T08:50:51+0000",
            "request_id": "0584a6d51e85-00077185",
            "sum_initial": {
                "amount": 10000,
                "currency": "INR"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "INR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 1811,
                "payment_id": "161818558",
                "auth_code": "",
                "date": "2020-09-22T08:50:55+0000"
            }
        },
        "signature": "Rgj9JJvd+qF3DeORTLYTv9j77k62uanWEo1T2Me0w=="
    }

The following is the example of a callback with information about a declined payout.

Figure: Example of callback data indicating that the payout has been declined

{
         "project_id": 197,
        "payment": {
            "id": "Payout-test-1-2209",
            "type": "payout",
            "status": "decline",
            "date": "2020-09-22T07:52:30+0000",
            "method": "amazonpay",
            "sum": {
                "amount": 100,
                "currency": "INR"
            },
            "description": ""
        },
        "account": {
            "number": "9811181996"
        },
        "customer": {
            "id": "1",
            "phone": "9811181996"
        },
        "operation": {
            "id": 72455010013601,
            "type": "payout",
            "status": "decline",
            "date": "2020-09-22T07:52:30+0000",
            "created_date": "2020-09-22T07:52:27+0000",
            "request_id": "cbac006fd0a89157d364b58a98e7-00072456",
            "sum_initial": {
                "amount": 100,
                "currency": "INR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "INR"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 1811,
                "payment_id": "",
                "auth_code": ""
            },
        "signature": "UvYafKv8g7aXBIqVVt8F+7erV2ugNHq6Wv3lJE8Q=="
    }

Useful links

The following articles can be useful when implementing payouts via Gate:

Payouts by using Dashboard

When working with Dashboard, you can process single and mass payouts by using the Amazon Pay method.

  • To process a single payout, open the payout form, specify all required parameters (including the payment method), send a request and verify that the payout has been processed.
  • To process a mass payout, prepare and upload a file with information about all target payouts, send a batch request, and verify that the payouts have been processed.

    Use a CSV file structured according to the requirements presented in the Mass payments data section. The payout parameters must comply with the requirements (you do not have to generate a signature because it is specified by Dashboard).

More information about processing payouts by using Dashboard is presented in a separate section.

Analysis of payments results

To analyse information about payments made with the Amazon Pay method and other methods, you can use:

  • Dashboard interface toolkit with various lists and analytic panels.
  • Reports in CSV file format, available via the Reports section (one-time and periodically).
  • Data in JSON format, sent by program requests to a specified URL available by using the Data API interface.

If you have any questions, refer to the documentation (Dashboard and Using Data API) and ecommpay technical support.