KakaoPay

Overview

KakaoPay is a payment method that allows performing payments by means of e-wallets. You can perform purchases 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 the KRW currency must be 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 KakaoPay payment method requires the use of merchant's web service, one of the ECommPay interfaces, the ECommPay payment platform, and the KakaoPay service.



Operations support

  Interfaces Amounts, KRW Timespans*
Payment Page CMS Plug-ins Gate Old Dashboard minimum maximum basic time threshold time
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

In terms of purchase processing by using the KakaoPay method, the customer scans standardized QR codes by using e-wallets. 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.

Purchase by using Payment Page

General information

To process a purchase through Payment Page by using the KakaoPay 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 KakaoPay 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. Customer initiates a purchase in merchant's web service.
  2. The web service sends the request for opening Payment Page to the specified ECommPay URL.
  3. The request for opening Payment Page is sent to the payment platform.
  4. The payment platform performs initial request processing which includes validation of the required parameters and signature.
  5. In the ECommPay payment platform Payment Page is generated based on the project settings and parameters specified in the request.
  6. Payment Page is displayed to the customer.
  7. The customer selects the KakaoPay method.
  8. The request for processing the payment is sent from Payment Page to the payment platform.
  9. The payment platform processes the request.
  10. The data for displaying the payment instructions to the customer is sent from the payment platform to Payment Page.
  11. The payment instructions are displayed to the customer.
  12. The customer completes all required payment steps.
  13. The payment is processed on the side of the KakaoPay service.
  14. The KakaoPay service sends a notification about the result to the payment platform.
  15. The payment platform sends the callback with the payment result to the web service.
  16. The payment platform sends the notification about the result to Payment Page.
  17. Information about the payment result 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 KakaoPay 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 KakaoPay 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 specified in major 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 KakaoPay method as preselected payment method, set the force_payment_method parameter to kakaopay-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 KakaoPay 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 KakaoPay 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

To deliver information about the result of payment involving the KakaoPay method, the standard format for callbacks is used. 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": "kakaopay",
            "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": "kakaopay",
            "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 performing payments by using Payment Page:

Purchases by using Gate

General information

For processing a purchase through Gate by using the KakaoPay 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. Display the payment instructions to the customer.
  3. Get the callback with the payment result from the ECommPay payment platform.

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



Figure: Purchase by using Gate: Step-by-step description

  1. A customer initiates a purchase through KakaoPay 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.
  7. The payment platform sends the callback with the payment instructions data to the web service.
  8. The payment instructions are displayed to the customer.
  9. The customer completes all the payment steps required.
  10. The payment is processed on the KakaoPay service side.
  11. The KakaoPay service sends the payment result notification to the payment platform.
  12. The payment platform sends a callback to the web service.
  13. 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 KakaoPay 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 KakaoPay method:

  1. You send purchase requests by sending the /v2/payment/wallet/kakaopay/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—purchase amount specified in major units (without fractional part)
      • currency—purchase currency in the ISO-4217 alpha-3 format
  3. The currency of purchase 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 KakaoPay method must include project, customer and payment IDs, currency and amount of the purchase, customer IP address and signature, 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"
    }
}

Formats of data for displaying the payment instructions

To display the payment instructions to the customer, you need to receive and process a callback from the payment platform containing the payment data in the in the display_data array and display the customer the payment instructions to the customer.

The array display_data contains the following parameters:

  • type—data type (the value is always qr_img)
  • title—title of the data to be displayed to the customer (the value is always QR code)
  • data—string which contains the coded image of the QR code.

The following is the callback fragment containing the payment data.

"display_data": [
            {
                "type": "qr_img",
                "title": "QR code",
                "data": "data:image/png;base64,iVBORw0KGgo...AJBkEJMkgIEkGAUn/D/CW8OIAiZ8NAAAAAElFTkSuQmCC"
            }
]

Callback format

The KakaoPay 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": "kakaopay",
            "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/dwyHkQIT2QNgv...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": "kakaopay",
            "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

KakaoPay supports full and partial refunds processing. For processing refund through Gate by using the KakaoPay 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 KakaoPay service.
  7. The payment is processed on the side of the KakaoPay service.
  8. The KakaoPay 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 KakaoPay 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 KakaoPay method:
  1. You perform a refund by sending the request to /v2/payment/wallet/kakaopay/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 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 KakaoPay 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": "payment_id",
        "project_id": 1625,
        "signature": "asdfvg...rty"
        },
    "payment": {
        "description": "refund",
        "amount": 1000,
        "currency": "KRW"
        }
}

Callback format

The KakaoPay 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": "kakaopay",
            "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": "kakaopay",
            "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 payments results

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