Payco

Overview

Payco is a payment method that allows performing payments by means of e-wallets. You can perform purchases through this method by using Payment Page and Gate, and refunds by using Gate.

General information

Payment method type Payments by using e-wallets
Countries and regions KR
Payment currencies KRW
Currency conversion
Purchases +
Payouts
Credential-on-file (COF) purchases
Full refunds +
Partial refunds +
Chargebacks
Special considerations The amounts for KRW currency are specified in the major currency units (without fractional part)
Obtaining access to the payment method and access fee Refer to your ECommPay Key Account Manager

Interaction diagram

Payment processing by using the Payco payment method requires the use of merchant's web service, one of the ECommPay interfaces, the ECommPay payment platform, and the Payco service.



Operations support

  Interfaces Amounts, KRW Timespans*
Payment Page CMS Plug-ins Gate Old Dashboard minimum maximum basic threshold
Purchases + +
Full refunds +
Partial refunds +

* The basic time and the threshold time are defined as follows:

  • The basic time is the average time from the moment a payment is initiated in the payment platform to the moment the information about the payment result is sent to the initiator. The basic time evaluation is made on the assumption of normal operation of all technical facilities and communication channels and typical customer behaviour (where customer effort is required). You can use the basic time to define the moment of reacting to the absence of payment result callbacks or checking payment status.
  • The threshold time is the maximum possible time from the moment a payment is initiated in the payment platform to the moment the information about the payment result is sent to the initiator. A payment is automatically declined if the waiting time exceeds the threshold time. For individual setting of the threshold time limit, contact ECommPay technical support.

Processing scenarios

For purchase processing by using the Payco method you need to redirect the customer to the Payco service, and for refund processing you need to notify the customer via merchant's web service.

Figure: Purchase by using Payment Page



Figure: Purchase by using Gate



Figure: Refund by using Gate



The following sections provide detailed information about what you need to do in order to perform payments and how you can analyse the information on payments and operations.

Purchases by using Payment Page

General information

To process a purchase through Payment Page by using the Payco method, the merchant's web service needs to send a request with all the required parameters and signature to the ECommPay URL and receive a callback with the payment result from the payment platform. The Payco method can also be set as preselected payment method when Payment Page opens. For more information about preselecting payment methods, see the Preselecting payment methods section. The full sequence and special aspects of purchase processing are provided below.



Figure: Purchase processing by using Payment Page: Step-by-step description

  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 Payco method.
  8. The request for purchase processing by using the Payco service is sent to the payment platform.
  9. The request is processed on the side of the payment platform.
  10. The customer redirection data is sent from payment platform to Payment Page.
  11. The customer is redirected to the Payco service.
  12. The customer completes all the payment steps required.
  13. The payment is processed on the side of the Payco service.
  14. The result is displayed to the customer on the service.
  15. The customer is redirected to Payment Page.
  16. The Payco service sends the result notification to the payment platform.
  17. The payment platform sends a callback with the payment result information to the web service.
  18. The payment platform sends the result information to Payment Page.
  19. A page with the payment result information is displayed to the customer on Payment Page.

The following sections provide the detailed information about the request format and the Payment Page parameters to use in the Payco 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.

Request format

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

  1. You must provide values for the basic minimum of parameters. The following parameters are mandatory for any payment method:
    • project_id—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 major currency units (without fractional part)
    • customer_id—customer ID unique within your project
  2. The currency of payment can only be KRW.
  3. If you need the payment form to open with the Payco method as preselected payment method, set the force_payment_method parameter to payco-wallet.
  4. If required, you can also add any other additional parameters supported by Payment Page. All parameters available for payment processing by using the Payco method are provided in the Payment Page invocation parameters section.
  5. 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 request for processing purchase by using the Payco method must include project, customer, and payment IDs, currency and amount of the payment, and signature, as shown in the following example:

EPayWidget.run(
    { payment_id: 'X03936', 
      payment_amount: 1000, 
      payment_currency: 'KRW', 
      project_id: 123, 
      customer_id: '1234', 
      signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HAS...zUCwX6R\/ekpZhkIQg=="
    }
)

Callback format

The Payco 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 1000 KRW purchase made by the customer1 customer in the 1234 project.

Figure: Example of a successful purchase callback

{
        "project_id": 1234,
        "payment": {
            "id": "ABC123",
            "type": "purchase",
            "status": "success",
            "date": "2020-12-10T10:44:49+0000",
            "method": "payco",
            "sum": {
                "amount": 1000,
                "currency": "KRW"
            },
            "description": ""
        },
        "customer": {
            "id": "customer1"
        },
        "operation": {
            "id": 123,
            "type": "sale",
            "status": "success",
            "date": "2020-12-10T10:44:49+0000",
            "created_date": "2020-12-10T10:44:41+0000",
            "request_id": "46d13cf06a05f023ab53dd2d3d5c266a31c537a7-bd729b81...0001",
            "sum_initial": {
                "amount": 1000,
                "currency": "KRW"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "KRW"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 12345,
                "payment_id": "ABC12345",
                "auth_code": ""
            }
        },
        "signature": "Q8ccLF2ERNK0fbnnVil8NPh8vx83gF4aift64dN/dwyHkQIT2QN...Zr3OQ=="
}

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

Figure: Example of a declined purchase callback

{
        "project_id": 1234,
        "payment": {
            "id": "ABC123",
            "type": "purchase",
            "status": "decline",
            "date": "2020-12-15T11:14:03+0000",
            "method": "payco",
            "sum": {
                "amount": 1000,
                "currency": "KRW"
            },
            "description": ""
        },
        "customer": {
            "id": "customer1"
        },
        "operation": {
            "id": 12345,
            "type": "sale",
            "status": "decline",
            "date": "2020-12-15T11:14:03+0000",
            "created_date": "2020-12-15T11:13:54+0000",
            "request_id": "f70a332cee48f25311ea302c334cc189993a8db4-4bb39ad...0001",
            "sum_initial": {
                "amount": 1000,
                "currency": "KRW"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "KRW"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 1234,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "ZAXzfe6IG0dMypLzKledh0Glk6uDiRy1Ql5xORwb4avqJK...oi+c86GRGEQ=="
}

Related topics

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

Purchases by using Gate

General information

For processing a purchase through Gate by using the Payco method, the merchant's web service is required to do the following:

  1. Send a request with all the required parameters and signature to the ECommPay URL.
  2. Perform the redirection of a customer to the Payco service.
  3. 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 processing by using Gate: Step-by-step description

  1. A customer initiates a purchase through Payco on the side of the merchant's web service.
  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.
  7. The payment platform sends the callback with the redirection data in the redirect_data object to the web service.
  8. The customer is redirected from the web service to the Payco service.
  9. The customer completes all the payment steps required.
  10. The payment is processed on the side of the Payco service.
  11. The result is displayed to the customer.
  12. The customer is redirected to the merchant's web service.
  13. The Payco service sends the payment result notification to the payment platform.
  14. The payment platform sends a callback to the web service.
  15. The customer receives the payment result on the web service.

The following sections provide detailed information about the request format and the Gate parameters to use in the Payco payment method and provide the information on the format of callbacks with purchase results.

Request format

There are several things you must consider when using purchase requests in the Payco method:

  1. You send purchase requests by sending the /v2/payment/wallet/payco/sale request by using the POST (HTTP) method. This request refers to the payments by using e-wallets request group: /v2/payment/wallet/{payment_method}/sale.
  2. The following objects and parameters must be specified in any request:
    • Object general—general purchase information:
      • project_id—project identifier
      • payment_id—unique purchase identifier
      • 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:
      • ip_address—customer IP address
      • id — customer ID unique within the project
    • Object payment—purchase information:
      • amount—payment amount in major currency units (without fractional part)
      • currency—payment currency in the ISO-4217 alpha-3 format.
    • Object return_url—URL for redirecting the customer to the web service:
      • success—URL for redirecting after successful payment
      • decline—URL for redirecting after declined payment
      • return—URL for redirecting a customer while or after purchase performing
  3. The currency of payment can only be KRW.
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct request for processing purchase by using the Payco method must include project, customer and payment IDs, currency and amount of the purchase, customer IP address, signature and URL for redirecting the customer to the merchant's web service, as shown in the following example:

Figure: Example of a purchase request

{
     "general": {
        "project_id": 1234,
        "payment_id": "ABC1234",
        "signature": "asdfvg...rty"
     },
     "payment": {
        "amount": 1000,
        "currency": "KRW"
     },
     "customer": {
        "id":"customer1",
        "ip_address":"1.1.1.1"
     },
     "return_url": {
        "decline" : "http://example.url/decline",
        "success" : "http://example.url/success",
        "return": "http://example.url/return"
    }
}

Formats of the customer redirection data

To redirect a customer from the web service to the Payco 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": {
                        "MID": "ABC123",
                        "EdiDate": "20201211174138",
                        "Moid": "2",
                        "CharSet": "utf-8",
                        "Amt": "1000",
                        "GoodsName": "Test sale",
                        "DirectShowOpt": "CARD",
                        "NicepayReserved": "DirectPayco=Y",
                        "PayMethod": "CARD",
                        "ReturnUrl": "http://example.test.com/example/callback",
                        "NpDirectYn": "Y",
                        "NpDirectLayer": "Y",
                        "NpSvcType": "WEBSTD",
                        "SignData": "9f2d0df0d2aaa528fb0e14fa7de408b5b...6aaa4"
                    },
                    "method": "POST",
                    "url": "http://example.test/"
                }

Callback format

The Payco 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 1000 KRW purchase made by the customer1 customer in the 1234 project.

Figure: Example of a successful purchase callback

{
        "project_id": 1234,
        "payment": {
            "id": "ABC123",
            "type": "purchase",
            "status": "success",
            "date": "2020-12-10T10:44:49+0000",
            "method": "payco",
            "sum": {
                "amount": 1000,
                "currency": "KRW"
            },
            "description": ""
        },
        "customer": {
            "id": "customer1"
        },
        "operation": {
            "id": 123,
            "type": "sale",
            "status": "success",
            "date": "2020-12-10T10:44:49+0000",
            "created_date": "2020-12-10T10:44:41+0000",
            "request_id": "46d13cf06a05f023ab53dd2d3d5c266a31c537a7b14067e...0001",
            "sum_initial": {
                "amount": 1000,
                "currency": "KRW"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "KRW"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 12345,
                "payment_id": "ABC12345",
                "auth_code": ""
            }
        },
        "signature": "Q8ccLF2ERNK0fbnnVil8NPh8vx83gF4aift64dN/dwyHkQIT2QN...Zr3OQ=="
}

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

Figure: Example of a declined purchase callback

{     
        "project_id": 1234,
        "payment": {
            "id": "ABC123",
            "type": "purchase",
            "status": "decline",
            "date": "2020-12-15T11:14:03+0000",
            "method": "payco",
            "sum": {
                "amount": 1000,
                "currency": "KRW"
            },
            "description": ""
        },
        "customer": {
            "id": "customer1"
        },
        "operation": {
            "id": 12345,
            "type": "sale",
            "status": "decline",
            "date": "2020-12-15T11:14:03+0000",
            "created_date": "2020-12-15T11:13:54+0000",
            "request_id": "f70a332cee48f25311ea302c334cc189993a8db4-4bb39ad...0001",
            "sum_initial": {
                "amount": 1000,
                "currency": "KRW"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "KRW"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 1234,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "ZAXzfe6IG0dMypLzKledh0Glk6uDiRy1Ql5xORwb4avqJK...oi+c86GRGEQ=="
}

Related topics

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

Refund by using Gate

General information

Payco supports full and partial refunds processing. For processing refund through Gate by using the Payco method, the merchant's web service is required to send a request with all the required parameters and signature to ECommPay URL, Gate accepts the request and redirects to the payment platform for further processing. The full sequence of the refund process is provided below.



Figure: Refund processing by usingGate: Step-by-step description

  1. A customer orders a refund by using the web service.
  2. The merchant's web service sends the request for the refund processing by using Gate to the appropriate ECommPay URL.
  3. Gate redirects the request to the ECommPay payment platform.
  4. The payment platform performs all the necessary checks and processes the request.
  5. The response with the request processing results is sent to the merchant's web service. For more information, see Response format.
  6. The payment platform redirects the refund request to the Payco service.
  7. The payment is processed on the side of the Payco service.
  8. The Payco service sends the result notification to the payment platform.
  9. The payment platform sends a callback with the payment result to the web service.
  10. The customer receives the information about the receipt of the requested funds from the web service.

The following sections provide more details about the request format and the Gate parameters to use in the Payco payment method and provide the information on the format of callbacks with refund results.

Request format

There are several things you must consider when using refund requests in the Payco method:
  1. You perform a refund by sending the request to /v2/payment/wallet/payco/refund by using HTTP method POST. This is an e-wallet refunds request group: /v2/payment/wallet/{payment_method}/refund.
  2. The following objects and parameters must be specified in any request:
    • Object general—general refund information:
      • project_id—project identifier
      • payment_id—unique refund identifier
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification
    • Object payment—refund information:
      • description—comment or description
      • amount—refund amount in major currency units, without fractional part (this parameter is mandatory for partial refund only)
      • currency—refund currency in ISO-4217 alpha-3 format (this parameter is mandatory for partial refund only)
  3. The currency of payment can only be KRW.
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct refund request in the Payco method must include project and payment IDs, signature, payment description, and request for partial refund must also contain currency and amount of the refund, as shown in the following example:

Figure: Example of a refund request

{
    "general": {
        "payment_id": "1234567",
        "project_id": 1625,
        "signature": "asdfvg...rty"
        },
    "payment": {
        "description": "refund",
        "amount": 1000,
        "currency": "KRW"
        }
}

Callback format

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

The following is the example of a callback with an information about successful 1000 KRW refund for the customer1 customer in the 1234 project.

Figure: Example of a successful refund callback

{
        "project_id": 1234,
        "payment": {
            "id": "ABC123",
            "type": "purchase",
            "status": "refunded",
            "date": "2020-12-15T11:15:58+0000",
            "method": "payco",
            "sum": {
                "amount": 0,
                "currency": "KRW"
            },
            "description": "refund"
        },
        "customer": {
            "id": "customer1"
        },
        "operation": {
            "id": 12345,
            "type": "refund",
            "status": "success",
            "date": "2020-12-15T11:15:58+0000",
            "created_date": "2020-12-15T11:15:54+0000",
            "request_id": "74e1b0af0242c7d562f991b2203794fe48d6cbaa-681285...0001",
            "sum_initial": {
                "amount": 1000,
                "currency": "KRW"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "KRW"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 3456,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "sfDbm8f+3edPKxf10/0K5btjGDOeOTdv2Mc92r...zThloXxg8xg=="
}

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

Figure: Example of a declined refund callback

{
        "project_id": 1234,
        "payment": {
            "id": "customer1",
            "type": "purchase",
            "status": "success",
            "date": "2020-12-15T11:17:19+0000",
            "method": "payco",
            "sum": {
                "amount": 1000,
                "currency": "KRW"
            },
            "description": "refund"
        },
        "customer": {
            "id": "customer1"
        },
        "operation": {
            "id": 2345,
            "type": "refund",
            "status": "decline",
            "date": "2020-12-15T11:17:19+0000",
            "created_date": "2020-12-15T11:17:17+0000",
            "request_id": "1d098669df63438f1a4079193218543f22c40160-4a9e06db...0001",
            "sum_initial": {
                "amount": 1000,
                "currency": "KRW"
            },
            "sum_converted": {
                "amount": 1000,
                "currency": "KRW"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 3456,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "04fZ8UZhuCXotsbI+8sqk98hegbVEYc3iAfFOYx8XmBUWhjd...kHf/HIA=="
}

Related topics

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

Analysis of payment results

As with other payment methods ECommPay offers, when using the Payco 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.