🪧Subscription payment using billing key
Request subscription (scheduled) payments using the customer_uid.
subscriptionsubscriptionYou can use the customer_uid obtained through the Get billing key or Non-authenticated payment (one-time) API to request a subscription or scheduled payment.
STEP 01. Request payment
// Schedule payment
axios({
url: \`https://api.iamport.kr/subscribe/payments/schedule\`,
method: "post",
headers: { "Authorization": access_token }, // Add access token to authorization header
data: {
customer_uid: "gildong_0001_1234", // Unique ID for each card (billing key)
schedules: [
{
merchant_uid: "order_monthly_0001", // Order ID
schedule_at: 1519862400, // Schedule time in UNIX timestamp.
amount: 8900,
name: "Recurring payment for monthly subscription",
buyer_name: "Hong Gildong",
buyer_tel: "01012345678",
buyer_email: "gildong@gmail.com"
}
]
}
});
STEP 02. Receive payment result
Recurring payment

Last updated