# 토큰 생성 임의의 사용자 매개 변수로 토큰을 생성할 수 있습니다. 토큰을 받을 때 이러한 매개 변수를 보내고 성공적인 결제 후에 다시 받습니다. 토큰은 이 문서에 설명되어 있거나 사용자가 미리 정의한 매개 변수만 포함할 수 있습니다. 매개 변수가 잘못된 형식으로 전송되거나 잘못된 유형인 경우 토큰이 발급되지 않습니다. JSON 본문에 오류 설명이 포함된 422 HTTP 코드를 받게 됩니다. extended_message에서 정확히 어떤 매개 변수가 잘못 전송되었는지에 대한 정보를 받게 됩니다. 주의이 API 호출에는 project_id 경로 매개 변수가 포함되어 있지 않으므로 회사의 모든 프로젝트에서 유효한 API 키를 사용하여 인증을 설정해야 합니다. Endpoint: POST /merchants/{merchant_id}/token Version: 2.0 Security: basicAuth ## Path parameters: - `merchant_id` (integer, required) 판매자 ID입니다. ## Request fields (application/json): - `custom_parameters` (object) custom_parameters 개체의 토큰에서 추가 매개 변수를 전달하여 부정 결제 방지 필터를 구성하세요. 권장 매개 변수는 드롭다운 목록에 표시됩니다. [페이 스테이션 설명서 ](https://developers.xsolla.com/ko/doc/pay-station/features/antifraud/)를 참조하십시오. - `custom_parameters.active_date` (string) [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)에 따른 마지막 확인 날짜입니다. - `custom_parameters.additional_verification` (boolean) Whether the player uses account verification procedures. - `custom_parameters.character_customized` (boolean) Whether the player has customized their character. - `custom_parameters.chat_activity` (boolean) Whether the player uses the chat function. - `custom_parameters.completed_tasks` (integer) Number of tasks/objectives completed. - `custom_parameters.forum_activity` (boolean) Whether the player uses the forum function. - `custom_parameters.items_used` (boolean) Whether the player uses purchased in-game items. - `custom_parameters.karma_points` (integer) Player’s karma. - `custom_parameters.last_change_password_date` (string) [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)에 따른 마지막 암호 변경 날짜입니다. - `custom_parameters.non_premium_currency` (integer) Amount of non-premium currency. - `custom_parameters.notifications_enabled` (boolean) Whether the player enabled notifications. - `custom_parameters.profile_completed` (boolean) Whether the player added additional information to their profile. - `custom_parameters.profile_image_added` (boolean) Whether the player has uploaded a profile image. - `custom_parameters.pvp_activity` (boolean) Whether the player takes part in PvP battles. - `custom_parameters.registration_date` (string) [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)에 따른 계정 생성일입니다. - `custom_parameters.session_time` (string) [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)에 따른 평균 세션 시간입니다. - `custom_parameters.social_networks_added` (boolean) Whether the player has connected social media profiles. - `custom_parameters.total_bans` (integer) Number of times the player was banned in the chat/forum. - `custom_parameters.total_characters` (integer) Number of in-game characters. - `custom_parameters.total_clans` (integer) Number of clans the player is a member of. - `custom_parameters.total_friends` (integer) Number of friends. - `custom_parameters.total_game_events` (integer) Number of in-game events the player took part in. - `custom_parameters.total_gifts` (integer) Number of in-game gifts the player has sent/received. - `custom_parameters.total_hours` (integer) Total number of in-game hours. - `custom_parameters.total_inventory_value` (integer) Total inventory value (in-game currency). - `custom_parameters.total_sum` (integer) Total amount of payments. - `custom_parameters.tutorial_completed` (boolean) Whether the player has completed the game’s tutorial. - `custom_parameters.unlocked_achievements` (integer) Number of achievements unlocked. - `custom_parameters.user_level` (integer) Player’s level, reputation, or rank. - `custom_parameters.win_rate` (integer) Win rate. - `purchase` (object) 구매 데이터 관련 값입니다. Example: {"checkout":{"amount":10,"currency":"USD"},"subscription":{"gift":{"email":"recipient_email@email.com","recipient":"test_recipient_v1"}}} - `purchase.checkout` (object) Object containing checkout details. Example: {"amount":10,"currency":"USD"} - `purchase.checkout.amount` (integer) 구매 금액입니다. Example: 10 - `purchase.checkout.currency` (string) 구매 통화입니다. [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)에 따른 3자릿수 통화 코드입니다. Example: "USD" - `purchase.subscription` (object) 정기 결제 데이터 관련 값입니다. Example: {"gift":{"email":"recipient_email@email.com","recipient":"test_recipient_v1"}} - `purchase.subscription.available_plans` (array) 결제 UI에 표시되는 정기 결제 요금제입니다. - `purchase.subscription.currency` (string) Currency of the subscription plan to use in all calculations. - `purchase.subscription.gift` (object) 정기 결제 선물 세부 정보입니다. Example: {"email":"recipient_email@email.com","recipient":"test_recipient_v1"} - `purchase.subscription.gift.anonymous` (boolean) 선물한 사람의 이름을 숨길지 여부입니다. true인 경우 이메일 알림에서 발신자 이름이 숨겨집니다. 기본값은 false입니다. - `purchase.subscription.gift.email` (string, required) 수신자 이메일입니다. Example: "recipient_email@email.com" - `purchase.subscription.gift.message` (string) 수신자에게 표시되는 메시지입니다. - `purchase.subscription.gift.recipient` (string, required) 수신자의 ID입니다. Example: "test_recipient_v1" - `purchase.subscription.gift.redirect_url` (string) 정기 결제 선물에 대한 추가 정보가 있는 페이지 또는 계정 생성 페이지로 연결되는 링크를 여기에 입력합니다. 선물 받는 사람은 정기 결제 선물 이메일 알림에서 이 페이지로 이동할 수 있습니다. - `purchase.subscription.operation` (string) 사용자의 정기 결제 요금제에 적용되는 작업 유형입니다. 정기 결제 요금제을 변경하려면 change_plan 값을 전달합니다. purchase.subscription.plan_id 매개 변수에서 새 요금제 ID를 지정해야 합니다. - `purchase.subscription.plan_id` (string) 정기 결제 요금제 외부 ID입니다. 관리자 페이지의 정기 결제 > 정기 결제 요금제 섹션에서 확인할 수 있습니다. - `purchase.subscription.product_id` (string) Product ID. - `purchase.subscription.trial_days` (integer) 평가 기간(일)입니다. - `settings` (object) 사용자 지정 프로젝트 설정과 관련된 값입니다. Example: {"currency":"USD","language":"en","project_id":16184,"ui":{"components":{"virtual_currency":{"custom_amount":true}},"desktop":{"virtual_item_list":{"button_with_price":true,"layout":"list"}},"size":"medium"}} - `settings.currency` (string) 선호하는 결제 통화입니다. [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)에 따른 3자릿수 통화 코드입니다. Example: "USD" - `settings.external_id` (string) 게임의 트랜잭션 ID입니다. 각 사용자 결제마다 고유해야 합니다. - `settings.language` (string) 인터페이스 언어입니다. 두 자릿수 소문자 [언어 코드](https://developers.xsolla.com/ko/doc/pay-station/features/localization/)입니다. Example: "en" - `settings.mode` (string) 결제 프로세스를 테스트하기 위한 sandbox 값을 설정합니다. 이 경우 https://sandbox-secure.xsolla.com을 사용하여 테스트 결제 UI에 액세스합니다. - `settings.payment_method` (integer) 결제 수단의 ID입니다. - `settings.payment_widget` (string) 결제 위젯입니다. 'paybycash' 혹은 'giftcard'일 수 있습니다. 매개 변수가 설정되면, 사용자는 각각 페이바이캐쉬(Pay by Cash) 혹은 기프트 카드(Gift Cards) 위젯으로 리디렉션됩니다. Enum: "paybycash", "giftcard" - `settings.project_id` (integer, required) Game’s Xsolla ID. Can be found in Publisher Account. Example: 16184 - `settings.redirect_policy` (object) 정책 설정을 리디렉션합니다. - `settings.redirect_policy.autoredirect_from_status_page` (boolean) 상태 페이지에서 자동 리디렉션 여부입니다. - `settings.redirect_policy.delay` (integer) 사용자가 자동으로 복귀 URL로 리디렉션된 이후 지연 시간(초)입니다. - `settings.redirect_policy.manual_redirection_action` (string) 페이 스테이션 동작은 닫기 버튼 또는 게임으로 돌아가기 버튼을 사용자가 클릭하면 트리거됩니다. redirect(기본값) 및 postmessage일 수 있습니다. redirect로 설정된 경우 사용자는 토큰에서 전달되었거나 관리자 페이지에서 지정된 URL로 리디렉션됩니다. postmessage로 설정된 경우 사용자는 다른 페이지로 리디렉션되지 않습니다. 닫기 아이콘을 클릭하면 close 이벤트 전송이 시작되고 게임으로 돌아가기 버튼을 클릭하면 return 이벤트 전송이 시작됩니다. Enum: "redirect", "postmessage" - `settings.redirect_policy.redirect_button_caption` (string) 수동 리디렉션을 위한 버튼 텍스트입니다. - `settings.redirect_policy.redirect_conditions` (string) 사용자가 복귀 URL로 리디렉션되는 결제 상태입니다. 이는 none, successful, successful_or_canсeled, 혹은 any일 수 있습니다. Enum: "none", "successful", "successful_or_canceled", "any" - `settings.redirect_policy.status_for_manual_redirection` (string) 사용자를 복귀 URL로 리디렉션하는 버튼이 표시되는 결제 상태입니다. 이는 none, successful, successful_or_canсeled, 혹은 any일 수 있습니다. Enum: "none", "successful", "successful_or_canceled", "any" - `settings.return_url` (string) 사용자를 결제 이후로 리디렉션하는 페이지입니다. 매개 변수 user_id, foreigninvoice, invoice_id및 status는 자동으로 링크에 추가됩니다. - `settings.ui` (object) 인터페이스 설정과 관련된 값입니다. Example: {"components":{"virtual_currency":{"custom_amount":true}},"desktop":{"virtual_item_list":{"button_with_price":true,"layout":"list"}},"size":"medium"} - `settings.ui.components` (object) 메뉴 설정과 관련된 값입니다. Example: {"virtual_currency":{"custom_amount":true}} - `settings.ui.components.subscriptions` (object) 정기 결제 요금제 하위 메뉴 설정과 관련된 값입니다. - `settings.ui.components.subscriptions.hidden` (boolean) Whether to show the submenu. - `settings.ui.components.subscriptions.order` (integer) Position of the submenu in the menu. - `settings.ui.components.virtual_currency` (object) 인게임 재화 하위 메뉴 설정과 관련된 값입니다. Example: {"custom_amount":true} - `settings.ui.components.virtual_currency.custom_amount` (boolean) Whether the user can enter an arbitrary quantity of the virtual currency in the payment UI. Example: true - `settings.ui.components.virtual_items` (object) 가상 아이템 하위 메뉴 설정과 관련된 값입니다. - `settings.ui.components.virtual_items.selected_group` (string) Group to show after opening the virtual items tab. - `settings.ui.components.virtual_items.selected_item` (string) Item to show after opening the virtual items tab (item SKU). - `settings.ui.desktop` (object) PC 버전의 인터페이스 설정과 관련된 값입니다. Example: {"virtual_item_list":{"button_with_price":true,"layout":"list"}} - `settings.ui.desktop.header` (object) 헤더 설정과 관련된 값입니다. - `settings.ui.desktop.header.close_button` (boolean) 페이 스테이션 데스크탑에서 닫기 버튼을 표시할지 여부입니다. 이 버튼을 누르면 페이 스테이션이 종료되고settings.return_url 매개 변수에 지정된 URL로 사용자를 리디렉션합니다(기본값: false). - `settings.ui.desktop.header.is_visible` (boolean) Whether to show the header in the payment UI. - `settings.ui.desktop.header.type` (string) 헤더를 표시하는 설정 방식입니다. compact(프로젝트 이름 및 사용자 ID 표시 안 함) 또는 normal(기본값)을 설정할 수 있습니다. Enum: "compact", "normal" - `settings.ui.desktop.header.visible_logo` (boolean) true인 경우, 로고가 헤더에 표시됩니다(먼저 고객 성공 관리자에게 이미지를 제공하세요). - `settings.ui.desktop.header.visible_name` (boolean) Whether to show the project name in the header. - `settings.ui.desktop.header.visible_purchase` (boolean) 구매 설명(purchase.description.value)이 헤더에 표시되는지 여부입니다. 기본값은 true입니다. - `settings.ui.desktop.subscription_list` (object) 정기 결제 요금제 목록 설정과 관련된 값입니다. - `settings.ui.desktop.subscription_list.description` (string) Any text to show above the list of available subscription plans in the payment UI. - `settings.ui.desktop.subscription_list.display_local_price` (boolean) true인 경우 및 사용자의 현지 통화가 정기 결제 요금제의 통화와 다른 경우, 사용자는 현지 통화의 가격 및 기본 통화의 가격 등 두 가지 가격을 볼 수 있습니다. - `settings.ui.desktop.subscription_list.layout` (string) 정기 결제 목록 패턴입니다. list(기본값) 또는 grid일 수 있습니다. Enum: "list", "grid" - `settings.ui.desktop.virtual_currency_list` (object) 인게임 재화 목록 설정과 관련된 값입니다. - `settings.ui.desktop.virtual_currency_list.button_with_price` (boolean) true인 경우, 가격이 버튼에 표시됩니다. false인 경우, 가격이 버튼 왼쪽에 표시됩니다. 기본값은 false입니다. - `settings.ui.desktop.virtual_currency_list.description` (string) Any text to show above the list of virtual currencies. - `settings.ui.desktop.virtual_item_list` (object) 가상 아이템 목록 설정과 관련된 값입니다. Example: {"button_with_price":true,"layout":"list"} - `settings.ui.desktop.virtual_item_list.view` (string) 가상 아이템 그룹을 세로/가로 보기 메뉴로 표시합니다. horizontal_navigation 또는 vertical_navigation(기본값)일 수 있습니다. Enum: "horizontal_navigation", "vertical_navigation" - `settings.ui.header` (object) - `settings.ui.header.visible_virtual_currency_balance` (boolean) 결제 UI에서 이 요소를 숨길 수 있는지 여부입니다. 기본값은 true입니다. - `settings.ui.is_prevent_external_link_open` (boolean) 외부 리소스에 대한 리디렉션 링크가 비활성화되었는지 여부입니다. true가 기본값입니다. 외부 링크를 클릭하면external-link-open이벤트가 postMessage 메커니즘을 통해 전송됩니다. 리디렉션 링크용 주소는url 매개 변수에서 전달됩니다. - `settings.ui.license_url` (string) EULA의 링크입니다. - `settings.ui.mobile` (object) - `settings.ui.mobile.footer` (object) - `settings.ui.mobile.footer.is_visible` (boolean) 모바일 버전의 결제 UI에서 바닥글을 표시하거나 숨길지 여부입니다. - `settings.ui.mobile.mode` (string) 사용자는 저장된 결제 방식을 통해서만 결제를 할 수 있습니다. saved_accounts일 수 있습니다. Enum: "saved_accounts" - `settings.ui.mode` (string) 페이 스테이션의 인터페이스 모드입니다. user_account만 가능합니다. 헤더는 계정 탐색 메뉴만 포함하고 사용자는 제품을 선택하거나 결제를 진행할 수 없습니다. 이 모드는 데스크탑에서만 사용할 수 있습니다. - `settings.ui.size` (string) 결제 UI의 크기입니다. 이 매개 변수는 결제 UI의 필요한 크기에 따라 값이 다음과 같을 수 있습니다. - [small](https://livedemo.xsolla.com/developers/small/): 결제 UI의 가능한 최소 크기입니다. 창 크기가 엄격히 제한되는 경우 이 값을 사용합니다. (크기: 620 x 630) - [medium](https://livedemo.xsolla.com/developers/medium/): 결제 UI의 권장 크기입니다. 이 값을 사용하여 라이트박스에 결제 UI를 표시합니다. (크기: 740 x 760) - [large](https://livedemo.xsolla.com/developers/large/): 새 창 또는 탭에 결제 UI 표시를 위한 최적의 크기입니다. (크기: 820 x 840) Enum: "small", "medium", "large" - `settings.ui.theme` (string) 결제 UI의 모양 테마입니다. default(기본값) 또는 default_dark일 수 있습니다. Enum: "default", "default_dark" - `settings.ui.user_account` (object) 사용자 계정 세부 정보입니다. - `settings.ui.user_account.history` (object) 기록 하위 메뉴입니다. - `settings.ui.user_account.history.enable` (boolean) 하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다. - `settings.ui.user_account.info` (object) 내 계정 페이지입니다. - `settings.ui.user_account.payment_accounts` (object) 내 결제 계정 하위 메뉴입니다. - `settings.ui.user_account.subscriptions` (object) 정기 결제 관리 하위 메뉴입니다. - `settings.ui.version` (string) 장치 유형입니다. desktop(기본값) 또는 mobile일 수 있습니다. Enum: "desktop", "mobile" - `user` (object) 사용자의 세부 정보입니다. Example: {"age":19,"country":{"allow_modify":true,"value":"US"},"email":{"value":"john.smith@mail.com"},"id":{"value":"user_2"},"name":{"value":"John Smith"}} - `user.age` (integer) 사용자 나이입니다. Example: 19 - `user.attributes` (object) User attributes for filtering the item list, represented as a valid JSON set of key-value pairs. - `user.country` (object) Example: {"allow_modify":true,"value":"US"} - `user.country.allow_modify` (boolean) 결제 UI에서 사용자의 국가 변경 가능 여부입니다. country.value가 토큰에서 전달되면 기본값은 false입니다. Example: true - `user.country.value` (string) [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)에 따른 두 자릿수 국가 코드입니다. Example: "US" - `user.email` (object) user.email 개체는 부정 결제 방지 모델 만들기의 정수 부분이며 수락률을 높여줍니다. 해당 개체는 엑솔라와 결제 시스템 양쪽 모두의 요구 사항입니다. 매개 변수가 전달되지 않으면 이메일 입력용 필수 필드가 결제 페이지에 나타납니다. 사용자는 매개 변수에서 전달되었거나 결제 페이지에 입력된 이메일로 구매 영수증을 받습니다. Example: {"value":"john.smith@mail.com"} - `user.email.value` (string, required) 사용자 이메일입니다. [RFC 822](https://www.w3.org/Protocols/rfc822/#z8) 프로토콜에 따라 유효해야 합니다. Example: "john.smith@mail.com" - `user.id` (object, required) Example: {"value":"user_2"} - `user.id.value` (string, required) User ID. Example: "user_2" - `user.is_legal` (boolean) Whether the user is a legal entity. - `user.legal` (object) 법인 세부 정보가 있는 개체입니다. user.is_legal가 true인 경우 개체와 이에 해당하는 모든 매개 변수는 필수입니다. - `user.legal.address` (string) Full legal address. - `user.legal.country` (string) 기업이 속한 국가입니다. [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)에 따른 두 자릿수 대문자 국가 코드입니다. - `user.legal.name` (string) Full legal name. - `user.legal.vat_id` (string) Individual taxpayer identifier. - `user.name` (object) Example: {"value":"John Smith"} - `user.name.value` (string) User screen name. Example: "John Smith" - `user.phone` (object) - `user.phone.value` (string) User phone number. - `user.public_id` (object) - `user.public_id.value` (string) Parameter that uniquely identifies the user and is known to the user (email, screen name, etc). Allows the user to make purchases outside the game store (e.g., via cash kiosks). - `user.steam_id` (object) - `user.steam_id.value` (string) Steam ID입니다. - `user.tracking_id` (object) - `user.tracking_id.value` (string) 고유한 추적 ID(마케팅 캠페인에 사용됨)입니다. - `user.utm` (object) 트래픽 특성입니다. - `user.utm.utm_campaign` (string) Campaign title, transliterated or translated to English. - `user.utm.utm_content` (string) Campaign content. - `user.utm.utm_medium` (string) Traffic channel (contextual ads, media ads, email lists, etc.). - `user.utm.utm_source` (string) Traffic source. - `user.utm.utm_term` (string) 캠페인 키워드입니다. 설정된 경우 특정 검색 질의보다 타켓 광고에 사용하는 키워드 데이터에 기반하여 통계가 만들어집니다. Google Analytics에서는 지정된 utm_term이 일반 검색 용어 보고서의 일부입니다. ## Response 200 fields (application/json): - `token` (string) ## Response 422 fields (application/json): - `extended_message` (object) - `extended_message.global_errors` (array) - `extended_message.property_errors` (object) 개체는 오류 설명과 함께 매개 변수 이름을 포함합니다. - `http_status_code` (integer) - `message` (string) - `request_id` (string)