2023년 6월 13일에 대화형 작업이 종료되기 전에 2023년 5월 3일에 Transactions API가 지원 중단됩니다. 자세한 내용은
대화 작업 지원 중단을 참고하세요.
Method: orders.createWithCustomToken
Google에서 만든 맞춤 토큰을 사용하여 새 주문을 생성하고 반환합니다. 이 메서드를 사용하는 개발자는 요청에서 Google이 전달한 userToken을 설정해야 합니다. 이 방법은 개발자/판매자가 주문 대신 Google에 주문을 직접 저장하는 경우에 사용됩니다 (거래 및 AMP 흐름 대신).
HTTP 요청
POST https://actions.googleapis.com/v3/orders:createWithCustomToken
URL은 gRPC 트랜스코딩 구문을 사용합니다.
요청 본문
요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.
필드 |
header |
object (OrderRequestHeader )
필수: 주문 생성 요청의 헤더
|
order |
object (Order )
필수 항목: 만들 주문 참고: 1. 유효한 주문을 생성하려면 항상 다음 필드가 필요합니다. order.create_time, order.merchant_order_id, order.contents.line_items, order.contents.line_items.id 2. 주문에는 1개 이상의 광고 항목이 있어야 하며 광고 항목에는 카테고리/확장이 정의되어 있어야 합니다. 3. 모든 확장 소재(주문 수준 및 line_item 수준 모두)는 1개의 카테고리 유형에 매핑되어야 합니다. 즉, 주문이 2개 이상의 카테고리를 나타내는 경우 유효한 주문이 아닙니다.
|
userToken |
string
필수: 비동기 채널을 통해 Google에서 파트너에게 제공하는 암호화된 토큰입니다.
|
응답 본문
성공한 경우 응답 본문에 Order
의 인스턴스가 포함됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-09-12(UTC)
[null,null,["최종 업데이트: 2024-09-12(UTC)"],[[["This document explains the `orders:createWithCustomToken` method, which creates new Google Orders using a custom, Google-minted token."],["Developers should include the `userToken` provided by Google in the request."],["This process is typically used when developers or merchants directly save orders to Google on behalf of the order, rather than using Transactions or AMP flows."],["The request body must include a header, order details (with at least one line item and a specified vertical), and the `userToken`."],["A successful response will return the created `Order` object."]]],["This document outlines how to create a new order using a custom Google-minted token. It involves sending a `POST` request to `https://actions.googleapis.com/v3/orders:createWithCustomToken`. The request body requires a JSON structure with `header` (OrderRequestHeader object), `order` (Order object, including required fields like `create_time`, `merchant_order_id`, and line items), and a `userToken` (an encrypted token from Google). Successful requests return an `Order` object in the response body. The order must contain at least one line item, and all extensions should map to a single vertical type.\n"]]