小売の支払いと注文
製品、バリエーション、プロモーション、配送、履行、および顧客コンテキストを使用した小売チェックアウトを構築。
製品豊富なチェックアウトを支払いオーケストレーションに接続し、履行とサポートに必要なデータを失わない。DEUNAは、注文ライフサイクル全体で使用される、カタログ、プロモーション、配送、および顧客コンテキストを同じ注文に保持します。
カタログの深さSKU、UPC、ブランド、カテゴリ、バリエーション、画像、重量、数量、およびアイテム価格を保持。プロモーションコンテキスト注文と商品の割引を、安定したキャンペーンとクーポン参照で表現します。履行配送先住所、配送業者、配送方法、日付、費用、および場所に関するコンテキストを関連付けます。
小売注文のペイロードを完了します#
この例には、製品のバリエーション、アイテムレベルの割引参照、対応する注文割引、配送先住所、および選択された配送方法が含まれています。
完全な注文ペイロード
小売
商品バリエーション、販促、配送先、配送方法、フルフィルメント情報を扱います。
itemsdiscountsshipping_addressshipping_methodリクエスト本文JSON
{
"order_type": "DEUNA_CHECKOUT",
"order": {
"order_id": "retail-93418",
"store_code": "es-online",
"currency": "EUR",
"items_total_amount": 10900,
"sub_total": 11400,
"shipping_amount": 500,
"total_tax_amount": 2152,
"total_discount": 1000,
"total_amount": 13552,
"items": [
{
"id": "shoe-runner-42-blue",
"sku": "RUNNER-BLU-42",
"upc": "8437012345678",
"name": "Runner trainers",
"description": "Everyday lightweight trainers",
"quantity": 1,
"brand": "Northline",
"category": "footwear",
"sub_category": "trainers",
"color": "navy",
"size": "42",
"taxable": true,
"image_url": "https://merchant.example.com/products/runner-blue.jpg",
"details_url": "https://merchant.example.com/products/runner-blue",
"unit_price": {
"amount": 11900,
"currency": "EUR",
"currency_symbol": "€"
},
"total_amount": {
"amount": 10900,
"original_amount": 11900,
"currency": "EUR",
"currency_symbol": "€",
"total_discount": 1000
},
"tax_amount": {
"amount": 2052,
"currency": "EUR",
"currency_symbol": "€"
},
"weight": {
"weight": 850,
"unit": "g"
},
"discounts": [
{
"amount": 1000,
"ref_idx": 0
}
]
}
],
"discounts": [
{
"amount": 1000,
"code": "WELCOME10",
"reference": "campaign-2026-welcome",
"description": "Welcome discount",
"details_url": "https://merchant.example.com/promotions/welcome10",
"free_shipping": {
"is_free_shipping": false,
"maximum_cost_allowed": 0
},
"discount_category": "coupon",
"target_type": "items",
"type": "fixed_amount"
}
],
"shipping_address": {
"first_name": "Alex",
"last_name": "Morgan",
"email": "alex@example.com",
"phone": "+34600000000",
"address1": "Calle de Alcalá 125",
"address2": "3B",
"city": "Madrid",
"zipcode": "28009",
"state_name": "Madrid",
"state_code": "MD",
"country_code": "ES",
"address_type": "home",
"is_default": true
},
"shipping_method": {
"code": "standard-48h",
"name": "Standard delivery",
"min_delivery_date": "2026-10-05",
"max_delivery_date": "2026-10-06",
"cost": 500,
"display_cost": "€5.00",
"tax_amount": 100,
"display_tax_amount": "€1.00",
"scheduler": []
},
"shipping_options": {
"type": "delivery",
"method": "standard-48h",
"carrier": "Merchant Logistics",
"price": {
"amount": 500,
"currency": "EUR"
},
"requires_shipping": true,
"details": {
"store_id": "es-online",
"store_name": "Online store",
"address": "Calle de Alcalá 125, Madrid",
"address_coordinates": {
"lat": 40.4217,
"lng": -3.6772
},
"contact": {
"name": "Customer care",
"phone": "+34910000000"
},
"additional_details": {
"address_notes": "Leave with the concierge."
}
}
},
"payer_info": {
"email": "alex@example.com"
},
"channel_type": "desktop_web",
"metadata": {
"vertical": "retail",
"fulfillment_node": "warehouse-mad-02"
},
"callback_urls": {
"on_success": "https://merchant.example.com/payments/success",
"on_pending": "https://merchant.example.com/payments/pending",
"on_reject": "https://merchant.example.com/payments/rejected",
"on_canceled": "https://merchant.example.com/payments/canceled",
"on_failed": "https://merchant.example.com/payments/failed"
}
}
}ビジネスのコンテキストを定義する#
| 要件 | 注文フィールド |
|---|---|
| 製品の識別 | items[].id, sku, upc, brand, category, sub_category |
| バリエーションと表示 | color, size, image_url, details_url, weight |
| プロモーション | discounts[] と商品 discounts[].ref_idx |
| 配送 | shipping_address, shipping_method, shipping_options |
| 履行操作 | 店舗、倉庫、配送業者、配送日、および商人のメタデータ |
生産時のチェックリスト#
- 表示名ではなく、不変の製品およびバリエーション識別子をキーとして使用します。
- アイテムと注文レベルで割引参照を一致させます。
discountsarray. - 支払い前に、郵便番号、配送業者、配送日、および配送費用を検証します。
- キャプチャ、払い戻し、キャンセル、およびサポートフローの元の注文トークンを保持します。
- プロモーションの変更、在庫切れの商品、分割配送、部分払い戻し、および再試行シナリオをテストします。
APIと顧客アクションのライフサイクルを実装するために、 チェックアウトモジュール, キャプチャと払い戻し, および 注文の支払い処理.