KCP payment method types and SDK options
This reference lists the supported payment method types, SDK configuration options, and required callbacks for the NHN KCP gateway integration.
The KCP gateway integration supports three payment method types in the Payment Form SDK. Each type uses KCP's hosted payment window and requires specific SDK options and callbacks to function correctly.
| Payment method type | Description |
|---|---|
creditcard | Credit card payment collected through KCP's hosted payment window. The Payment Form renders a single button instead of card input fields. Card data is collected and encrypted entirely within KCP's window and never passes through the Zuora SDK. Set isGatewayHostedCard to true in the Payment Form configuration to enable this rendering mode. |
kakaopay | KakaoPay wallet payment. Rendered as a hosted button component that opens KCP's payment window when clicked. |
payco | PAYCO wallet payment. Rendered as a branded PAYCO button using the hosted-components pattern. Supports button dimension and style options. |
| Option | Required | Description |
|---|---|---|
createPaymentSession | Required | Callback function that creates a payment session before the KCP payment window opens. Must be provided; a configuration error is returned if this callback is absent. |
onComplete | Required | Callback function invoked when the payment flow completes. Receives the payment result, including paymentMethodId and paymentId on success, or an error object on failure. |
buttonWidth | Optional | Width of the PAYCO button. Accepts a CSS length value. When not specified, the button uses the default width from the Payment Form theme. |
buttonHeight | Optional | Height of the PAYCO button. Accepts a CSS length value. When not specified, the button uses the default height from the Payment Form theme. |
buttonRadius | Optional | Border radius of the PAYCO button. Accepts a CSS length value. Controls the corner rounding of the button. |
buttonColor | Optional | Background color of the PAYCO button. Accepts a CSS color value. When not specified, the button renders in the PAYCO brand color. |
| Option | Required | Description |
|---|---|---|
isGatewayHostedCard | Required for KCP credit card | Set to true on the PaymentMethodSetting for the creditcard type when using the KCP gateway. When true, the Payment Form renders a single button instead of card input fields. Card collection occurs entirely in KCP's hosted payment window. When absent or false, the standard card input form is rendered. |
createPaymentSession | Required for KCP credit card | Callback function that creates a payment session before the KCP payment window opens. Must be provided when isGatewayHostedCard is true; a configuration error is returned if this callback is absent. |
| Field | Description |
|---|---|
ordr_idxx | Order identifier returned by KCP on payment window completion. |
res_cd | Result code returned by KCP indicating the outcome of the payment attempt. |
res_msg | Result message returned by KCP describing the outcome. |
enc_data | Encrypted payment data returned by KCP and submitted to Zuora's update-3DS2-transaction API. |
enc_info | Encryption metadata returned by KCP and submitted to Zuora's update-3DS2-transaction API. |
tran_cd | Transaction code returned by KCP on payment window completion. |
card_mask_no | Masked card number returned by KCP for credit card transactions. |
KCP SDK loading behavior
The KCP SDK script (kcp_spay_hub.js) is loaded dynamically when a KCP payment method is used. Separate URLs are used for the test and production environments. The SDK has a 10-second readiness timeout. If the required KCP scripts do not load within this period, a warning is logged and the payment window call reports a failure.