עמלות

המדריך הזה כולל סקירה כללית על התרחישים השונים שבהם אפשר לקבל תשלום, וגם הוראות מפורטות לגבי ציון עמלות על קישורים לפעולות בפידים.

סוג העמלה

האפליקציה תומכת בסוגי העמלות 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 על השירות.
  • עמלת אחוז: אחוז מסוים מהסכום של עגלת הקניות מחויב כעמלת שירות. בנוסף, אפשר לציין base_value בנוסף לעמלה cart_percentage.
  • טווחי עמלות: עמלות בטווח המוגדר כ-range_amount עבור ערכי המינימום והמקסימום.

קבוע

{
  "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"
    ]
  }
}