Search
K
⌨️

Daou (PAYJOA)

Daou payment window integration guide

1. Configure Daou PG settings

Refer to the Daou settings page to configure the PG settings.

2. Request payment

To open the payment window, call JavaScript SDK IMP.request_pay(param, callback).
In PC browsers, callback is invoked after calling IMP.request_pay(param, callback). In mobile browsers, the page is redirected to m_redirect_url.
PAYJOA payment window integration requires JS SDK 1.2.0 or later version.
Authenticated payment request
Non-authenticated API request
Javascript SDK
IMP.request_pay({
pg : 'daou',
pay_method : 'card',
merchant_uid: 'mid_1234567890',
escrow: false,
amount: 1004,
name: 'NF long padding jacket M',
buyer_name: 'John Doe',
buyer_email: '[email protected]',
buyer_tel: '01012345678',
digital : false, // Set to true if contracted as digital
m_redirect_url: 'https://allerts.com/payments/complete',
bypass: {
// PAYJOA (DaouData) specific parameters
daou: {
PRODUCTCODE: 'iamport',
CASHRECEIPTFLAG: 2,
},
},
app_scheme: 'iamportappscheme',
}, function(rsp) { // callback logic
//* ...Omitted... *//
});

Key parameter description

pg *** **string
PG code
  • If not specified and this is the only PG setting that exists, default PG is automatically set.
  • If there are multiple PG settings, set to daou.
pay_method *** **string
Payment method code
Payment method codes
  • card (credit card)
  • trans(instant account transfer)
  • vbank(virtual account)
merchant_uid *** **string
Order ID
Must be unique for each request.
digital*string
Digital contents option
Must specify the value based on the contract between merchant and PAYJOA. Otherwise, request will fail.
bypass.daou.PRODUCTCODE`` string
Product code
If there is no specification for the value and the value is not specified, i'mport sets it to the default value (iamport) and sends it to PAYJOA.
bypass.daou.CASHRECEIPTFLAG`` integer
Cash receipt issuance code
Auto cash receipt issuance code for cash payments (account transfer, virtual account)
1: Allow
2: Block
app_scheme`` string
Mobile app URL scheme
Required in mobile app
amount *** **integer
Payment amount
Must be an integer (not string)
escrow`` boolean
Escrow option
Only supports account transfer and virtual account payment.
You can use i'mport REST API to request billing key, request payment, and schedule payment.

Request one-time payment

To request a one-time payment, use the key-in REST API POST /subscribe/payments/onetime. The card information is not saved during this process.
curl -H "Content-Type: application/json" \
-X POST -d '{"merchant_uid":"order_id_8237352", "card_number":"1234-1234-1234-1234", "expiry":"2019-01", "birth":"123456", "amount":3000}' \
https://api.iamport.kr/subscribe/payments/onetime

Request billing key

To request a billing key, use the billing key request REST API POST /subscribe/customers/{customer_uid}.
curl -H "Content-Type: application/json" \
-X POST -d '{"card_number":"1234-1234-1234-1234", "expiry":"2025-12", "birth":"820213", "pwd_2digit":"00"}' \
https://api.iamport.kr/subscribe/customers/your-customer-unique-id

Request billing key + initial payment

To request a billing key and initial payment, use the key-in REST API POST /subscribe/payments/onetime.
  • customer_uid : required for saving the billing key.
curl -H "Content-Type: application/json" \
-X POST -d '{"customer_uid":"your-customer-unique-id", "merchant_uid":"order_id_8237352", "card_number":"1234-1234-1234-1234", "expiry":"2019-01", "birth":"123456", "amount":3000}' \
https://api.iamport.kr/subscribe/payments/onetime

Request payment with billing key

After successfully getting the billing key and making the initial payment, the billing key is stored on the i'mport server mapped 1:1 with the specified customer_uid. For security reasons, the server cannot directly access the billing key. Subsequent payments can be requested by calling the repeat pay REST API (POST /subscribe/payments/again) with the customer_uid as follows:
curl -H "Content-Type: application/json" \
-X POST -d '{"customer_uid":"your-customer-unique-id", "merchant_uid":"order_id_8237352", "amount":3000}' \
https://api.iamport.kr/subscribe/payments/again
For detailed information, refer to:

3. Additional functions

Installment setting
Escrow payment
javascript
display: {
card_quota: [6] // Display up to 6 months installment plans
}
Parameters
  • card_quota :
    • []: Only immediate pay
    • 2,3,4,5,6: immediate, 2, 3, 4, 5, 6 month installment plans\
Installment plan option is available only for KRW 50,000 or more.
For escrow payment, the escrow parameter must be set to true. When the escrow payment is completed, the merchant must register the shipping information for settlement. You can manage shipping information by using the Add delivery info and Update delivery info APIs.
API Body Example
{
"logis": {
"invoice": "1728384716123",
"company": "CJGLS",
"receiving_at": "20220215",
"address": "16, Seongsui-ro 20-gil"
},
"receiver": {
"name": "John DOe"
},
"sender": {
"relationship": "self"
}
}
Precaution
  • When adding/updating the escrow delivery information, PAYJOA does not validate the delivery information (tracking number, courier name, etc.) received from the merchant.