EBP API Docs v0.5.12
KR

빌링계정 API - 결제 수단 생성 #

1. API Overview #

Target Coverage #

PG 결제 수단
Worldpay Card
Omise Card Direct_Debit

Purpose #

재사용할 결제 수단을 생성하는 API입니다.
사용자가 제공한 결제 수단 정보를 토큰화하여 안전하게 저장하고 민감한 데이터를 직접 노출하지 않도록 설계되었습니다.
이 API는 이후 결제 요청에서 저장된 결제 수단을 활용해 편리하고 안전한 결제 경험을 제공하는 것을 목표로 합니다.

Worldpay의 상세 가이드는 다음을 참조하세요: Worldpay 상세 가이드
Omise의 상세 가이드는 다음을 참조하세요: Omise 상세 가이드
Checkout.com의 상세 가이드는 다음을 참조하세요: Checkout.com 상세 가이드

Details #

항목
API Name결제 수단 생성
API Path/api/v2/payment-methods
API IDEBP_API_120
HTTP MethodPOST
RegionGlobal

[!INFO] 빌링 계정 생성 시점
빌링 계정은 별도의 가입 절차 없이, 사용자가 최초로 토큰을 등록하거나 결제를 요청할 때 전달된 스토어 ID(X-Store-Id)와 사용자 번호(userNo)를 기준으로 시스템에 자동 생성됩니다.

2. Request Specification #

2.1 Request Header #

상세한 헤더 정보는 Common Headers 문서를 참고하세요.

2.2 Request Data Schema #

depthFieldDetails & Description
0userNo

string≤ 500

🔴 Required

사용자를 식별하는 고유 번호

0email

string≤ 128

🔴 Required

사용자 이메일 주소

0paymentMethod

string

🔴 Required

등록할 결제 수단 유형

e.g., CARD, DIRECT_DEBIT
0successUrl

string≤ 500

🔴 Required

결제 수단 등록 성공 후 리다이렉트할 URL

0failureUrl

string≤ 500

🔴 Required

결제 수단 등록 과정이 실패했을 때 이동할 URL

0billingAddress

object

Optional

청구지 주소 정보 (세금계산서 발급 시 필수)

1billingEmail

string≤ 128

Optional

청구 담당자 이메일 주소

1billingLastName

string≤ 100

🟡 Conditional

청구 담당자 성(현지 언어)

1billingFirstName

string≤ 100

🟡 Conditional

청구 담당자 이름(현지 언어)

1billingCountry

string≤ 3

🟡 Conditional

ISO 3166-1 alpha-3 국가 코드

1billingStreet

string≤ 100

🟡 Conditional

청구지 도로명

1billingAddressLine1

string≤ 100

🟡 Conditional

청구지 주소 1

1billingAddressLine2

string≤ 100

Optional

청구지 주소 2

1billingCity

string≤ 100

🟡 Conditional

청구지 도시

1billingPostalCode

string≤ 100

🟡 Conditional

청구지 우편번호

1billingState

string≤ 100

🟡 Conditional

청구지 주/도

0account

object

Optional

계정 소유자 정보

1accountLastName

string≤ 100

Optional

사용자 성(현지 언어)

1accountFirstName

string≤ 100

Optional

사용자 이름(현지 언어)

0directDebitType

string

🟡 Conditional

결제 수단 DIRECT_DEBIT 이용 시 필수 항목입니다. 상세 내용은 하단의 [직불계좌 결제 정보 안내

(#direct-debit-info)를 참조하십시오.]

직불계좌 결제 정보 (directDebitType) 안내

태국 직불계좌 결제(DIRECT_DEBIT) 이용 시 다음의 지원 은행 코드를 확인하십시오.

  • direct_debit_bay (Krungsri Bank)
  • direct_debit_kbank (Kasikorn Bank)
  • direct_debit_ktb (Krungthai Bank)
  • direct_debit_scb (Siam Commercial Bank)

2.3 Request Examples #

JSON Example #

CARD
DIRECT_DEBIT
{
  "userNo": "AU1234567890",
  "userId": "gildong.hong@example.com",
  "email": "gildong.hong@example.com",
  "paymentMethod": "CARD",
  "successUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/worldpay/success",
  "failureUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/worldpay/failure"
}
{
  "userNo": "TH1234567890",
  "userId": "gildong.hong@example.com",
  "email": "gildong.hong@example.com",
  "paymentMethod": "DIRECT_DEBIT",
  "successUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/omise/success",
  "failureUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/omise/failure",
  "directDebitType": "direct_debit_bay"
}

3. Response Specification #

3.1 Response Data Schema #

Response Data Schema #

depthFieldDetails & Description
-1resultCode

string

🔴 Required

결과 코드 (성공 "0", 에러 시 "EBP-A-0001" 등)

-1message

string

🔴 Required

결과 메시지 (성공 또는 에러 상세)

-1requestId

string

🔴 Required

추적을 위한 고유 요청 ID

-1timestamp

string

🔴 Required

ISO 8601 형식의 응답 타임스탬프

e.g., 2025-12-19T14:24:00+09:00
-1data

object

🔴 Required

응답 데이터 (비즈니스 결과물)

0paymentMethodId

string

🔴 Required

저장된 결제 수단 ID

0orderNo

string

🔴 Required

주문 번호

0status

string

🔴 Required

결제 수단 상태

e.g., ACTION_REQUIRED
0paymentUrl

string

Optional

추가 인증(HPP 등)이 필요한 경우 사용자를 리다이렉트시킬 EBP 표준 URL입니다. requiresClientActiontrue인 경우 필수적으로 참조합니다.

0paymentHeaderContext

string

Optional

EBP에서 발급한 암호화된 결제 헤더 컨텍스트. '결제 수단 등록 완료 API' 호출 시 x-ebp-context 헤더 값으로 전달해야 합니다.

0pgResponse

object

Optional

PG사 응답 원본 객체 (직접 액션 시 필요)

1resultCode

string

Optional

PG사 응답 결과 코드

1data

object

Optional

PG사 응답 데이터 상세. PG별 상이

0successUrl

string≤ 500

Optional

결제 수단 등록 성공 후 리다이렉트할 URL

0failureUrl

string≤ 500

Optional

결제 수단 등록 실패 시 리다이렉트할 URL

-1instructions

object

🔴 Required

후속 처리를 위한 지침 (프로세스 제어)

0nextStep

string

🔴 Required

다음 행동 지시

e.g., CLIENT_ACTION
0completionMethod

string

🔴 Required

전체 프로세스의 최종 등록 완료 방식

e.g., WEBHOOK, API
0requiresClientAction

boolean

🔴 Required

클라이언트 추가 액션(HPP 이동, 토큰화 등)이 필요한지 여부

0clientAction

object

Optional

클라이언트의 추가 액션 지시 정보 객체. requiresClientActiontrue인 경우 필수적으로 참조합니다.

1type

string

Optional

클라이언트 액션 유형

e.g., TOKENIZE_CARD, CREATE_SOURCE
1pgProvider

string

Optional

액션을 처리할 PG사

0requiresFollowUpApi

boolean

🔴 Required

후속 API(등록 완료 API) 호출이 필수인지 여부

0followUpApi

object

Optional

Information for the follow-up API to be called after the client action. Mandatory if requiresFollowUpApi is true.

1method

string

Optional

HTTP method of the follow-up API

e.g., POST
1url

string

Optional

Call path of the follow-up API

1description

string

Optional

Additional description of the follow-up API

3.2 Response Samples #

Case 1: Worldpay 카드 등록 (리다이렉트 + 웹훅 완료) #

PG사의 결제 페이지(HPP)를 통해 카드 정보를 입력받는 방식입니다. 사용자가 정보를 입력하면 PG사에서 EBP로 웹훅을 보내 등록이 최종 완료됩니다.

  • Next Step: REDIRECT (PG사 HPP로 이동 필요)
  • Completion: WEBHOOK (사용자 인증 완료 후 웹훅에 의해 비동기로 완료됨)
{
  "resultCode": "0",
  "message": "SUCCESS",
  "requestId": "06EFX0CRR7ME0KCSSTFEEDRDVG",
  "timestamp": "2026-01-27T04:39:47.222978900Z",
  "data": {
    "paymentMethodId": "3e104ef7b98f4123948a8c248d0da4c5",
    "orderNo": "ORD_7202603277730794",
    "status": "ACTION_REQUIRED",
    "paymentUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/worldpay/wrapping",
    "paymentHeaderContext": "eyJhY3Rpb24iOiJSRURJUkVDVF9UT19IUFAiLCJwcm92aWRlciI6IldPUkxEUEFZIiwiY29udGV4dCI6I...",
    "pgResponse": {
      "resultCode": "PASS",
      "data": {
        "pgRefId": "3579052412",
        "returnUrl": "https://payments-test.worldpay.com/app/hpp/...",
        "referenceUrl": "https://payments-test.worldpay.com/app/hpp/..."
      }
    },
    "successUrl": "http://<yourhost>/v2/ebp/test/token/success",
    "failureUrl": "http://<yourhost>/v2/ebp/test/token/fail"
  },
  "instructions": {
    "nextStep": "REDIRECT",
    "completionMethod": "WEBHOOK",
    "requiresClientAction": true,
    "clientAction": {
      "type": "REDIRECT_TO_HPP",
      "pgProvider": "WORLDPAY"
    },
    "requiresFollowUpApi": false
  }
}

Case 2: Omise 카드 등록 (클라이언트 액션 + API 완료) #

클라이언트가 Omise JS SDK를 사용하여 카드 정보를 직접 토큰화하는 방식입니다. 획득한 토큰을 EBP의 등록 완료 API로 전달하여 등록을 확정합니다.

  • Next Step: CLIENT_ACTION (JS SDK 호출 및 토큰 획득 필요)
  • Completion: API (획득한 토큰을 사용하여 결제 수단 등록 완료 API 호출 필요)
{
  "resultCode": "0",
  "message": "SUCCESS",
  "requestId": "06EFWD32XT8HCBDCYR9RK7R0PC",
  "timestamp": "2026-01-27T04:39:50.123456700Z",
  "data": {
    "paymentMethodId": "3a9437e612ac4ccb9beaa6585e899321",
    "orderNo": "ORD_7202603277730795",
    "status": "ACTION_REQUIRED",
    "paymentUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/omise/card/wrapping",
    "paymentHeaderContext": "eyJhY3Rpb24iOiJUT0tFTklaRV9DQVJEIiwicHJvdmlkZXIiOiJPTUlTRSIsImNvbnRleHQiOiI...",
    "pgResponse": {
      "resultCode": "SUCCESS",
      "data": {
        "publicKey": "pkey_test_46lmsec8z06uh..."
      }
    }
  },
  "instructions": {
    "nextStep": "CLIENT_ACTION",
    "completionMethod": "API",
    "requiresClientAction": true,
    "clientAction": {
      "type": "TOKENIZE_CARD",
      "pgProvider": "OMISE"
    },
    "requiresFollowUpApi": true,
    "followUpApi": {
      "method": "POST",
      "url": "/api/v2/payment-methods/3a9437e612ac4ccb9beaa6585e899321/complete",
      "description": "카드 토큰화 완료 후 이 API를 호출하여 등록을 확정해야 합니다."
    }
  }
}

Case 3: Omise 직불계좌 등록 (클라이언트 액션 + 인증 필요) #

클라이언트가 Omise JS SDK를 사용하여 계좌 정보를 소스화(SourceId 생성)하는 방식입니다. 획득한 소스 ID를 사용하여 응답받은 paymentUrl을 통해 사용자가 은행 인증을 진행하게 됩니다. 최종 등록은 인증 완료 후 웹훅을 통해 처리됩니다.

  • 1단계 (현재 API): CLIENT_ACTION (JS SDK 호출 및 SourceId 획득 필요)
  • 2단계 (인증): 응답받은 paymentUrl로 사용자 리다이렉트 및 은행 인증
  • 최종 완료: WEBHOOK (사용자 인증 완료 후 웹훅에 의해 비동기로 활성화됨)
{
  "resultCode": "0",
  "message": "SUCCESS",
  "requestId": "06EP2JWT2DHQEQGBC3W3RRK72W",
  "timestamp": "2026-04-06T05:37:22.536Z",
  "data": {
    "paymentMethodId": "1fc83f065287471987ee754ef01e7d40",
    "orderNo": "ORD_7202603277730796",
    "status": "ACTION_REQUIRED",
    "paymentUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/omise/direct-debit/wrapping",
    "paymentHeaderContext": "eyJhY3Rpb24iOiJDUkVBVEVfU09VUkNFIiwicHJvdmlkZXIiOiJPTUlTRSIsImNvbnRleHQiOiI...",
    "successUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/omise/success",
    "failureUrl": "https://devkic-pgui.nebp.lge.com/pgui/v2/hpp/omise/failure",
    "pgResponse": {
      "resultCode": "OK",
      "pgProvider": "OMISE",
      "data": {
        "type": "OMISE_DIRECT_DEBIT",
        "linkedAccountId": "lnac_test_679grm7z8axarr41r6m",
        "registrationUri": "https://pay.omise.co/registrations/linked_accounts/lnac_test_679grm7z8axarr41r6m/authorize"
      }
    }
  },
  "instructions": {
    "nextStep": "CLIENT_ACTION",
    "completionMethod": "WEBHOOK",
    "requiresClientAction": true,
    "clientAction": {
      "type": "CREATE_SOURCE",
      "pgProvider": "OMISE"
    },
    "requiresFollowUpApi": false
  }
}
Last updated: 2026-04-24 07:45:12 © 2026 LG Electronics Inc. All rights reserved.