빌링 / 자동결제
빌링은 카드 등록으로 `billingKey`를 발급한 뒤, 그 키로 서버 승인 API를 호출하는 2단계 흐름입니다.
customerKey 규칙
`customerKey`는 UUID 형식의 2~50자 문자열을 권장합니다. 비회원 흐름은 `ANONYMOUS`를 사용할 수 있지만, 정기결제는 고정된 사용자 식별자를 유지하는 편이 안전합니다.
POST /v1/billing/authorizations/issue
POST /v1/billing/authorizations/issue
{
"authKey": "auth_123",
"customerKey": "550e8400-e29b-41d4-a716-446655440000"
}
{
"billingKey": "bill_123",
"customerKey": "550e8400-e29b-41d4-a716-446655440000",
"method": "CARD"
}POST /v1/billing/{billingKey}
POST /v1/billing/bill_123
{
"customerKey": "550e8400-e29b-41d4-a716-446655440000",
"orderId": "billing-order-001",
"orderName": "월 구독권",
"amount": 9900
}
{
"paymentKey": "pay_bill_123",
"status": "DONE",
"approvedAt": "2026-04-21T11:00:00+09:00"
}실 Toss 유의사항
실서비스에서는 PCI DSS 준수를 위해 카드번호를 직접 입력받아 서버로 보내면 안 됩니다. 카드 입력과 인증은 반드시 Toss 제공 UI 또는 허용된 SDK/호스팅 페이지를 통해 처리하세요.