Set up a subscription with Kakao Pay
Set up a subscription using Kakao Pay as a payment method.
Create and confirm a Subscription using two API calls. The first API call sends customer and product information to the Subscriptions API to create a Subscription and PaymentIntent in one call. The response includes a PaymentIntent ID that you must use in a Payment Intents API call to confirm a payment.
Create a product and price Dashboard
Products represent the item or service you’re selling. Prices define how much and how frequently you charge for a product. This includes how much the product costs, what currency you accept, and whether it’s a one-time or recurring charge. If you only have a few products and prices, create and manage them in the Dashboard.
This guide uses a stock photo service as an example and charges customers a 100,000 KRW monthly subscription. To model this:
- Go to the Products page and click Create product .
- Enter a Name for the product. You can optionally add a Description and upload an image of the product.
- Select a Product tax code . Learn more about product tax codes .
- Select Recurring . Then enter 100,000 for the price and select KRW as the currency.
- Choose whether to Include tax in price . You can either use the default value from your tax settings or set the value manually. In this example, select Auto .
- Select Monthly for the Billing period .
- Click More pricing options . Then select Flat rate as the pricing model for this example. Learn more about flat rate and other pricing models .
- Add an internal Price description and Lookup key to organize, query, and update specific prices in the future.
- Click Next . Then click Add product .
After you create the product and the price, record the price ID so you can use it in subsequent steps. The pricing page displays the ID and it looks similar to this: price_G0FvDp6vZvdwRZ.
Note
You must convert your prices to KRW to use the payment method.
Create a SetupIntent Server-side
Create a SetupIntent to save a customer’s payment method for future payments. The SetupIntent tracks the steps of this setup process.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The SetupIntent object contains a client_secret, which is a unique key that you must pass to Stripe.js on the client-side to redirect your customer to Kakao Pay and authorize the mandate.
Create a subscription Server-side
Create a subscription that has a price and a customer. Set the value of the default_payment_method parameter to the PaymentMethod ID from the SetupIntent response.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
Creating subscriptions automatically charges the preset default payment method of customers. After a successful payment, the status in the Stripe Dashboard changes to Active. The price that you previously set up determines the amount for future billings. Learn how to create a subscription with a free trial period.
Confirm a payment Server-side
Confirm a payment with PaymentIntents using the PaymentIntent ID from the Subscriptions response. Add the PaymentIntent ID to the URL path:
Command Line
cURL
The PaymentIntent response includes the status requires_action, which indicates that your customers must complete the payment with the payment method they select from Kakao Pay to complete the PaymentIntent. After a successful payment, the subscription becomes active and saves the payment method as the default payment method.
