このチュートリアルでは、サポートされているさまざまな料金のユースケースの概要と、フィード内のアクション リンクの料金を指定する詳しい手順について説明します。
料金タイプ
アプリケーションは、DELIVERY
と SERVICE
の料金タイプをサポートしています。
提供
{ "fee": { "fee_id": "12345/delivery_fee", "fee_type": "DELIVERY", "fixed_amount": { "currency_code": "USD", "units": 10, "nanos": 0 }, "service_ids": ["service/entity002"] } }
サービス
{ "fee": { "fee_id": "12345/service_fee", "fee_type": "SERVICE", "fixed_amount": { "currency_code": "USD", "units": 10, "nanos": 0 }, "service_ids": ["service/entity002"] } }
料金フィード
以下に、サポートされているさまざまなユースケースとサンプル例を示します。- 固定料金: サービスに対して
fixed_amount
として定義される固定料金が請求されます。 - パーセンテージ料金: カート合計額の割合がサービス手数料として請求されます。また、
cart_percentage
料金に加えてbase_value
を指定できます。 - 料金範囲: 最低額と最高額が
range_amount
として定義された範囲内の料金。
Fixed
{ "fee": { "fee_id": "12345/delivery_fee", "fee_type": "DELIVERY", "fixed_amount": { "currency_code": "USD", "units": 10, "nanos": 0 }, "service_ids": ["service/entity002"] } }
カート率
{ "fee": { "fee_id": "12345/delivery_fee", "fee_type": "DELIVERY", "cart_percentage": { "base_value": { "currency_code": "USD", "units": 3, "nanos": 500000000 }, "percentage_of_cart_value": 10 }, "service_ids": [ "service/entity002" ] } }
範囲
{ "fee": { "fee_id": "12345/delivery_fee", "fee_type": "DELIVERY", "range_amount": { "min_amount": { "currency_code": "USD", "units": 3, "nanos": 500000000 }, "max_amount": { "currency_code": "USD", "units": 5, "nanos": 600000000 } }, "service_ids": [ "service/entity002" ] } }