Cash on delivery

Overview

Cash on delivery is a payment method that allows customers to make purchases and payouts with cash in India. When performing a payment, provider service sends a courier with the requested cash to the customer. With Cash on delivery, you can perform purchases by using Payment Page and Gate, and payouts by using Gate.

Download the logo in vector format here.

Payment method type Cash payments
Countries and regions India
Payment currencies INR
Currency conversion On the Monetix side
Purchases
Payouts
COF payments
Full refunds
Partial refunds
Chargebacks
Special considerations
  • Provider service processes requests on weekdays from 9 AM to 9 PM, except for national holidays. Any requests submitted outside of working hours are processed on the next workday.
  • Any requests submitted from 7 PM to 9 PM are processed on the next workday.
Onboarding and access fee Refer to your key account manager at Monetix.

Interaction diagram

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

Operations support

Interfaces Amounts, INR Times
Payment Page Gate Dashboard minimum maximum basic threshold
Purchases 15,000.00 7,500,000.00 3 hours 72 hours
Payouts 15,000.00 7,500,000.00 3 hours 72 hours

You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section and click the Payment methods tab.

Processing scenarios

In the Cash on delivery method, to perform a purchase, you need to redirect customer to the provider service, while to initiate a payout, you need to notify customer via merchant web service.

The sections that follow provide more information about what you need to perform payments and how you can analyze payments and operations information.

Purchase by using Payment Page

General information

In the Cash on delivery method, when processing a purchase by using Payment Page, the merchant web service sends a request with all the required parameters and signature to the Monetix URL and accepts the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Cash on delivery method pre-selected. (For more information about pre-selecting payment methods, see in Preselecting payment methods.)

The full sequence of the purchase workflow is provided below.

Figure 4. Purchase workflow when using Payment Page
  1. Customer initiates purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the Monetix URL.
  3. The request for opening Payment Page is redirected to the payment platform.
  4. The payment platform performs initial request processing that includes validation whether all required parameters are available and signature is correct.
  5. The requested Payment Page is generated by the Monetix payment platform as specified in the project settings and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects Cash on delivery as payment 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 forwards it to the provider service.
  10. The purchase request is processed on the provider service side.
  11. The provider 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 provider website.
  14. The customer completes all the steps required to complete the payment.
  15. The payment is processed on the provider side.
  16. The provider service sends the result notification to the payment platform.
  17. The payment platform sends callback with the payment result to the web service.
  18. The payment platform sends the result to Payment Page.
  19. The 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 Cash on delivery payment method and provide the information about format of callbacks with payment results. For the general information about how to use the Payment Page API, see Payment Page API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Cash on delivery method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
    • project_id—project ID you obtained from Monetix
    • payment_id—payment ID unique within the project
    • customer_id—unique ID of the customer within your project
    • customer_email—customer email
    • customer_first_name—customer first name
    • customer_last_name—customer last name
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
  2. It is recommended to specify the following optional parameters:
    • customer_address—customer address
    • customer_phone—customer phone number
    • customer_zip—customer zip code
    • customer_city—city of the customer address. Ask your key account manager at Monetix for the list of available values.
    • customer_state—state or region of the customer address. Ask your key account manager at Monetix for the list of available values.

    If any of these parameters is missing, a customer will be able to enter missing information after the redirection to the provider website.

  3. If you need to have payment form displayed with the Cash on delivery method pre-selected, set the force_payment_method parameter to the code on the unify_cash_on_delivery payment method.
  4. You can also add any other additional parameters Payment Page supports. For more information about parameters supported by Payment Page, see Payment Page invocation parameters.
  5. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign payment requests, see Signature generation and verification.

Here is an example of data from a purchase request.

EPayWidget.run(
    {
        project_id: 1234,
        payment_id: 'payment_47',
        customer_id: 'customer_123',
        customer_first_name: 'John',
        customer_last_name: 'Doe',
        customer_email: 'johndoe@example.com',
        payment_currency: 'INR',
        payment_amount: 2000000,
        customer_address: 'Jalaram Jyot, Khandelwal Society, Shankar Lane, Kandivali West.',
        customer_phone: '911234567890',
        customer_zip: '400067',
        customer_city: 'Mumbai',
        customer_state: 'Maharashtra',
        signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

Callback format

The Cash on delivery method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Payment Page.

The following is an example of a callback with an information about successful 20,000.00 INR purchase.

Figure 5. Example of data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "unify",
        "sum": {
            "amount": 2000000,
            "currency": "INR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 2000000,
            "currency": "INR"
        },
        "sum_converted": {
            "amount": 2000000,
            "currency": "INR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 6. Example of data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "unify",
        "sum": {
            "amount": 2000000,
            "currency": "INR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 2000000,
            "currency": "INR"
        },
        "sum_converted": {
            "amount": 2000000,
            "currency": "INR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

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

Purchase by using Gate

General information

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

  1. Send request with all the required parameters and signature to the Monetix URL.
  2. Redirect the customer to the provider service.
  3. Accept the callback with the payment result from the payment platform.

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

Figure 7. Purchase by using Gate
  1. The customer initiates purchase with Cash on delivery on the merchant's web service side.
  2. The web service sends a request for processing the purchase by using Gate to the Monetix URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs initial request processing that includes validation whether all required parameters are available and signature is correct.
  5. The payment platform sends the response with request receipt confirmation and validation result to the web service. For more information about the response format, see Response structure.
  6. The payment platform performs the internal payment request processing and redirects the request to the provider service.
  7. The request is processed on the provider service side.
  8. The provider service sends the data for redirecting the customer to the provider service to the payment platform.
  9. The payment platform sends the callback with the redirection data inside the redirect_data object to the web service.
  10. The customer is redirected from the web service to the provider service.
  11. The customer completes all the payment steps required.
  12. The payment is processed on the provider service side.
  13. The provider service sends the payment result notification to the payment platform.
  14. The payment platform sends the callback with the payment result to the web service.
  15. The web service sends the payment result to the customer.

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

Request format

There are several things you need to consider when dealing with purchase requests in the Cash on delivery method:

  1. You initiate a purchase by submitting a purchase request to the /v2/payment/unify/sale endpoint by using the HTTP method POST.
  2. The following objects and parameters must be specified in any request:
    • general—object with general request identification information:
      • project_id—the project ID you obtained from Monetix
      • 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.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—customer device IP
      • email—customer email
      • first_name—customer first name
      • last_name—customer last name
    • payment—object with purchase information:
      • amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
      • currency—code of purchase currency in the ISO-4217 alpha-3 format
      • by_method—payment method code, always equal to cash_on_delivery
    • return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer. In the request, you are required to use either both the success and decline parameters or only the return parameter:
      • success—the URL to redirect the customer to after the payment is successfully completed
      • decline—the URL to redirect the customer to after the payment is declined
      • return—the URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the success and decline parameters are not specified in the request.
  3. It is recommended to specify the following optional parameters in the customer object:
    • address—customer address
    • phone—customer phone number
    • zip—customer zip code
    • city—city of the customer address. Ask your key account manager at Monetix for the list of available values.
    • state—state or region of the customer address. Ask your key account manager at Monetix for the list of available values.

    If any of these parameters is missing, a customer will be able to enter missing information after the redirection to the provider website.

  4. If required, you can add any other additional (optional) parameters Gate supports.

Here is an example of data from a purchase request in the Cash on delivery method.

Figure 8. Example of data from a purchase request
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com",
        "city": "Mumbai",
        "state": "Maharashtra",
        "zip": "400067",
        "address": "Jalaram Jyot, Khandelwal Society, Shankar Lane, Kandivali West.",
        "phone": "911234567890"
    },
    "payment": {
        "amount": 2000000,
        "currency": "INR",
        "by_method": "cash_on_delivery"
    },
    "return_url": {
        "return": "http://example.com/return"
    } 
}

Format of customer redirection data

After receiving and processing your purchase request, the payment platform sends a callback to your web service containing the data to redirect the customer to the provider service.

To redirect the customer, use the values of the following parameters in the redirect_data object:

  • url—the URL to redirect the customer to
  • body—the data to be sent in the request body
  • method—the HTTP method to get an HTML page of the website (for example, POST or GET)
  • encrypted—this is the service parameter. Ignore the data it contains.

Here is an example of a piece of callback containing the data to redirect the customer.

"redirect_data": {
    "method": "GET",
    "body": [],
    "encrypted": [],
    "url": "https://example.com/redirect"
}

Callback format

The Cash on delivery method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Gate.

The following is an example of a callback with an information about successful 20,000.00 INR purchase.

Figure 9. Example of data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "unify",
        "sum": {
            "amount": 2000000,
            "currency": "INR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 2000000,
            "currency": "INR"
        },
        "sum_converted": {
            "amount": 2000000,
            "currency": "INR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 10. Example of data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "unify",
        "sum": {
            "amount": 2000000,
            "currency": "INR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 2000000,
            "currency": "INR"
        },
        "sum_converted": {
            "amount": 2000000,
            "currency": "INR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

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

Payout by using Gate

General information

To perform payout with the Cash on delivery method, merchant's web service sends a request with all the required parameters and signature to Monetix URL, and receives callback with the payment result. The complete sequence of the payout process is provided below.

Figure 11. Payout by using Gate
  1. Customer initiates payout Cash on delivery.
  2. Merchant's web service sends the request for processing the payout by using Gate to the Monetix URL.
  3. Gate redirects the request to the Monetix payment platform.
  4. The payment platform performs initial request processing that includes validation whether all required parameters are available and signature is correct.
  5. The payment platform sends the response with request receipt confirmation and validation result to the web service. For more information about the response format, see Response structure.
  6. The payment platform redirects the payout request to the provider service.
  7. The provider service processes the payout.
  8. The provider service asks the customer for payout details.
  9. Customer provides all the necessary information.
  10. The provider service sends a courier with requested cash to the customer. When communicating with customer, the courier acts the merchant employee.
  11. The provider service processes the payout.
  12. The provider service sends the result notification to the payment platform.
  13. The payment platform sends a callback with the payment result to the web service.
  14. The web service sends the payment result to the customer.

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

Request format

There are several things you must consider when using payout requests in the Cash on delivery method:

  1. You initiate payout request by sending a request to the /v2/payment/unify/payout endpoint by using HTTP method POST.
  2. The following objects and parameters must be specified in any request:
    • general—object with general request identification information:
      • project_id—the project ID obtained from Monetix
      • 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.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—customer device IP
      • address—customer address;
      • phone—customer phone number
      • email—customer email
      • first_name—customer first name
      • last_name—customer last name
      • city—customer city
      • zip—customer zip code
      • state—state or region of the customer address. Ask your key account manager at Monetix for the list of available values.
    • payment—object with payout information:
      • amount—payout amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
      • currency—code of payout currency in the ISO-4217 alpha-3 format
      • by_method—payment method code, always equal to cash_on_delivery
  3. If required, you can also add any other additional parameters Gate supports.

Here is an example of data from a payout request in the Cash on delivery method.

Figure 12. Example of data from a payout request
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "address": "Example st 6",
        "phone": "911234567890",
        "email": "email@example.com",
        "first_name": "John",
        "last_name": "Doe",
        "city": "Mumbai",
        "state": "Maharashtra",
        "zip": "123456"
    },
    "payment": {
        "amount": 2000000,
        "currency": "INR",
        "by_method": "cash_on_delivery"
    }
}

Callback format

The Cash on delivery method uses the standard format for callbacks to deliver payout results. For more information about callbacks, see Callbacks in Gate.

The following is the example of a callback with an information about successful 20,000.00 INR payout.

Figure 13. Example of data from a successful payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_48",
        "type": "payout",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "unify",
        "sum": {
            "amount": 2000000,
            "currency": "INR"
        },
        "description": ""
    },
    "operation": {
        "id": 29,
        "type": "payout",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 2000000,
            "currency": "INR"
        },
        "sum_converted": {
            "amount": 2000000,
            "currency": "INR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined payout.

Figure 14. Example of data from a declined payout callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_48",
        "type": "payout",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "unify",
        "sum": {
            "amount": 2000000,
            "currency": "INR"
        },
        "description": ""
    },
    "operation": {
        "id": 29,
        "type": "payout",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 2000000,
            "currency": "INR"
        },
        "sum_converted": {
            "amount": 2000000,
            "currency": "INR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-123",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlf155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

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

Payout by using Dashboard

To make a payout through Dashboard, the merchant sends a request and receives a notification with the request processing result. There are two ways to initiate payouts through Dashboard:
  • single payout—you specify the currency and amount for a payout available for this method and fill in all the fields required for the selected payment method on the Dashboard pages.
  • as a part of a mass payment—all the parameters are specified in a CSV file. Refer to the Payouts by using Gate section for the parameters required by your payment method.

Information about completed payouts is available for viewing in the Payments and Manual Payments sections of Dashboard.

For more information about payout processing by using Dashboard, see Performing payouts.

Analysis of payments results

As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.

You can load and analyze all the necessary information in Dashboard (dash-light.trxhost.com), for instance you can use the analytic panels in the Analytics section for this purpose.

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 format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
  • 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 means of sending requests to the /operations/get endpoint.

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