コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けのツール
概要
Stripe Payments について
構築済みのシステムをアップグレード
支払いの分析
オンライン決済
概要ユースケースを見つけるManaged Payments
Payment Links を使用する
決済ページを構築
高度なシステムを構築
アプリ内実装を構築
決済手段
決済手段を追加
    概要
    支払い方法の導入オプション
    ダッシュボードで支払い方法を管理
    決済手段のタイプ
    カード
    Stripe 残高で支払う
    仮想通貨
    銀行口座引き落とし
    銀行へのリダイレクト
    銀行振込
    クレジットトランスファー (Sources)
    後払い
    リアルタイム決済
    店舗支払い
    ウォレット
    国ごとに現地の支払い方法を有効化
      ナイジェリア
      韓国
        韓国のカード
        カカオペイ
          決済を受け付ける
          将来の支払いを設定する
        Naver Pay
        PAYCO
        Samsung Pay
    カスタムの決済手段
決済手段を管理
Link による購入の迅速化
支払いインターフェイス
Payment Links
Checkout
Web Elements
アプリ内 Elements
決済シナリオ
カスタムの決済フロー
柔軟なアクワイアリング
オーケストレーション
店頭支払い
端末
他の Stripe プロダクト
Financial Connections
仮想通貨
Climate
ホーム支払いAdd payment methodsEnable local payment methods by countrySouth Korea

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

韓国で Kakao Pay を使用した決済を受け付ける

Kakao Pay ユーザーからの決済を受け付ける方法をご紹介します。

ページをコピー

Kakao Pay を導入すると、韓国在住の顧客が、現地で一般的なこの支払い方法を使用して支払いできるようになります。

When a customer makes a payment, we redirect them to our local processor partner to authenticate and authorize the payment. After the customer authorizes the payment, Stripe redirects them back to your site.

Payment Intents API を使用して、韓国の顧客から現地のカードと支払い方法による決済を受け付けます。

Set up Stripe
Server-side

First, you need a Stripe account. Register now.

アプリケーションから Stripe APIにアクセスするには、公式ライブラリを使用してください。

Command Line
Ruby
# Available as a gem sudo gem install stripe
Gemfile
Ruby
# If you use bundler, you can add this line to your Gemfile gem 'stripe'

Create a PaymentIntent
Server-side

A PaymentIntent is an object that represents your intent to collect a payment from a customer and tracks the payment process. To create a PaymentIntent that accepts a payment using kakao_pay, specify the amount to collect, krw as the currency, and kakao_pay in the payment_method_types list. If you maintain a list of payment method types that you pass when creating a PaymentIntent, add kakao_pay to it.

Additionally, you must provide the buyer’s email address.

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=10000 \ -d currency=krw \ -d "payment_method_types[]"=kakao_pay \ -d "payment_method_data[type]"=kakao_pay \ --data-urlencode "payment_method_data[billing_details][email]"="jane.diaz@stripe.com"

client secret を取得する

PaymentIntent には、client secret が含まれています。これは、支払いプロセスを安全に完了するためにクライアント側で使用されます。client secret をクライアント側に渡す際は、いくつかの方法を使用できます。

ブラウザーの fetch 関数を使用して、サーバーのエンドポイントから client secret を取得します。この方法は、クライアント側が 1 ページのアプリケーションで、特に React などの最新のフロントエンドフレームワークで構築されている場合に最適です。client secret を処理するサーバーのエンドポイントを作成します。

main.rb
Ruby
get '/secret' do intent = # ... Create or retrieve the PaymentIntent {client_secret: intent.client_secret}.to_json end

その後、クライアント側で JavaScript を使用して client secret を取得します。

(async () => { const response = await fetch('/secret'); const {client_secret: clientSecret} = await response.json(); // Render the form using the clientSecret })();

Make sure that your customers understand the terms of use
Client-side

Stripe’s processor partner requires that customers be made aware of the identity of the processor, and understand its terms of use. You must include the following language and link in your checkout page:

注

After submission, you’re redirected to complete next steps. This transaction is processed through NICEPAY in accordance with NICEPAY’s terms of use.

Redirect to local processor
Client-side

顧客が Kakao Pay での支払いをクリックしたときに、Stripe.js を使用してその支払いを Stripe に送信します。Stripe.js は、決済フローを構築するための基本的な JavaScript ライブラリです。このライブラリにより、以下で説明するリダイレクトなどの複雑な処理が自動的に行われ、他の決済手段にも対応できるように実装を拡張できます。Stripe.js スクリプトを決済ページに含めるには、HTML ファイルの head にこのスクリプトを追加します。

checkout.html
<head> <title>Checkout</title> <script src="https://js.stripe.com/v3/"></script> </head>

決済ページで以下の JavaScript を使用して、Stripe.js のインスタンスを作成します。

client.js
// Set your publishable key. Remember to change this to your live publishable key in production! // See your keys here: https://dashboard.stripe.com/apikeys const stripe = Stripe(
'pk_test_TYooMQauvdEDq54NiTphI7jx'
);

Use the client secret of the PaymentIntent and call stripe.confirmPayment to handle redirecting to the checkout page of the local processor. On this page, the customer selects their issuer and authorizes the payment. Add a return_url to determine where Stripe redirects the customer after they complete the payment.

client.js
const form = document.getElementById('payment-form'); form.addEventListener('submit', async function(event) { event.preventDefault(); // Set the clientSecret of the PaymentIntent const { error } = await stripe.confirmPayment({ clientSecret: clientSecret, confirmParams: { payment_method_data: { type: 'kakao_pay', }, // Return URL where the customer should be redirected after the authorization return_url: `${window.location.href}`, }, }); if (error) { // Inform the customer that there was an error. const errorElement = document.getElementById('error-message'); errorElement.textContent = result.error.message; } });

The return_url corresponds to a page on your website that displays the result of the payment. You can determine what to display by verifying the status of the PaymentIntent. To verify the status, the Stripe redirect to the return_url includes the following URL query parameters. You can also append your own query parameters to the return_url. They persist throughout the redirect process.

Parameter説明
payment_intentThe unique identifier for the PaymentIntent.
payment_intent_client_secretThe client secret of the PaymentIntent object.

Test integration with Kakao Pay

Test your integration with Kakao Pay with your test API keys by viewing the redirect page. You can test the successful payment case by authenticating the payment on the redirect page. The PaymentIntent transitions from requires_action to succeeded. To test the case where the customer fails to authenticate, use your test API keys and view the redirect page. On the redirect page, click Fail test payment. The PaymentIntent transitions from requires_action to requires_payment_method.

オプションHandle post-payment events

このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc