For the complete documentation index, see llms.txt. This page is also available as Markdown.

Credit Card

This page describes how to submit a CreditCard payin in Korea using Pagsmile Checkout Web SDK.

The integration flow contains four steps:

  1. Create a payin order and get the prepay_id.

  2. Include Pagsmile script.

  3. Initialize Pagsmile SDK with the prepay_id.

  4. Trigger the payment.

Korea CreditCard payins support partial refund.

Korea CreditCard payins only support integer amounts. Decimal amounts are not supported. The minimum amount is 100 KRW. The maximum amount is not specified because it may be configured based on the user or product.


CreditCard

For CreditCard payments, use the following parameter values:

Parameter
Type
Description

method*

string

Fixed value: CreditCard

order_currency*

string

Fixed value: KRW


Step 1: Get prepay_id

POST https://gateway-test.pagsmile.com/trade/create

Use this endpoint to create a payin order and get the prepay_id.

Request Body

Parameter
Type
Required
Constraints
Description

app_id

string

Yes

Max length: 32 characters

The merchant application ID assigned by Pagsmile.

out_trade_no

string

Yes

Max length: 64 characters; must be unique

The merchant-side order ID.

method

string

Yes

Fixed value: CreditCard

Payment method.

order_amount

string

Yes

Integer only; minimum: 100 KRW

Payment amount.

order_currency

string

Yes

Fixed value: KRW

Payment currency.

subject

string

Yes

Max length: 128 characters

Order title or product name.

content

string

Optional

Max length: 255 characters

Order description.

notify_url

string

Yes

Valid URL

The URL used to receive asynchronous payment notifications.

return_url

string

Optional

Valid URL

The URL to redirect the customer after payment.

buyer_id

string

Yes

Merchant-defined unique ID

The unique customer ID in the merchant system.

timestamp

string

Yes

Format: yyyy-MM-dd HH:mm:ss; max length: 19 characters

Request timestamp.

trade_type

string

Yes

Fixed value: web

Request Sample

Response


Step 2: Include Pagsmile Script

Add the Pagsmile Checkout Web SDK script to the <head> section of your checkout page.


Step 3: Initialize Pagsmile SDK

Use Pagsmile.setPublishableKey to initialize the SDK.

Request Parameters

Parameter
Type
Required
Constraints
Description

app_id

string

Yes

Max length: 32 characters

The merchant application ID assigned by Pagsmile.

public_key

string

Yes

Starts with Pagsmile_pk_

The publishable public key assigned by Pagsmile.

env

string

Yes

One of: sandbox, prod

The SDK environment. Use sandbox for testing and prod for production.

region_code

string

Yes

Fixed value: KOR

code used to initialize the SDK for Korea Wallet payins.

prepay_id

string

Yes

Returned from Step 1

The Pagsmile prepay ID returned from the Create Payin request.

Sample


Step 4: Trigger Payment

After the SDK is initialized successfully, call clientInstance.createOrder() when the customer clicks the payment button.

When query is returned as true, query the transaction status through the /trade/query API.

Last updated