Dining with Payments integration examples

Merchant "A" uses a $100 deposit, with a 1-hour cancellation window, to ensure that their popular patio seating remains full. Their indoor seating doesn't have this fee and does not require a credit card to make a reservation.

Merchant "B" has a $20 per-person no-show fee on all their seating which they can choose to apply. They also require that all bookings and cancellations happen at least 30 minutes beforehand.

Merchant "C" does not work with payments. They accept standard bookings for their lunch block, but require approval by the restaurant manager for booking during the dinner rush. To support this process, they require that all dinner booking be made at least an hour in advance.

Merchants

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "nonce": "12923311",
    "generation_timestamp": 1530431933
  },
  "merchant": [
    {
      "merchant_id": "A",
      "name": "The Noodle Shop",
      "telephone": "+1 123-456-7890",
      "url": "www.merchantAspublicsite.com",
      "tax_rate": {
        "micro_percent": 6750000
      },
      "tokenization_config": {
        "tokenization_parameter": {
          "stripe:publishableKey": "merch_live_5ALFBK23V29384",
          "gateway": "stripe",
          "stripe:version": "2017-08-15"
        }
      },
      "geo": {
        "latitude": 37.422113,
        "longitude": -122.084041,
        "address": {
          "country": "United States",
          "region": "CA",
          "postal_code": "94043",
          "street_address": "1600 Amphitheatre Pkwy",
          "locality": "Mountain View"
        }
      },
      "category": "restaurant"
    },
    {
      "merchant_id": "B",
      "name": "Burrito Express",
      "telephone": "+1 123-456-7890",
      "url": "www.merchantBspublicsite.com",
      "tax_rate": {
        "micro_percent": 6750000
      },
      "tokenization_config": {
        "tokenization_parameter": {
          "stripe:publishableKey": "merch_live_209XDVJ329VJKD",
          "gateway": "stripe",
          "stripe:version": "2017-08-15"
        }
      },
      "geo": {
        "latitude": 37.422113,
        "longitude": -122.084041,
        "address": {
          "country": "United States",
          "region": "CA",
          "postal_code": "94043",
          "street_address": "1600 Amphitheatre Pkwy",
          "locality": "Mountain View"
        }
      },
      "category": "restaurant"
    },
    {
      "merchant_id": "C",
      "name": "Coffee Café",
      "telephone": "+1 123-456-7854",
      "url": "www.merchantCspublicsite.com",
      "geo": {
        "latitude": 37.422113,
        "longitude": -122.084041,
        "address": {
          "country": "United States",
          "region": "CA",
          "postal_code": "94043",
          "street_address": "1600 Amphitheatre Pkwy",
          "locality": "Mountain View"
        }
      },
      "category": "restaurant"
    }
  ]
}

Services

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "nonce": "12484913",
    "generation_timestamp": 1530432018
  },
  "service": [
    {
      "merchant_id": "A",
      "service_id": "1000",
      "localized_service_name": {
        "localized_value": [
          {
            "locale": "en",
            "value": "Reservation"
          }
        ]
      }
    },
    {
      "merchant_id": "B",
      "service_id": "1000",
       "localized_service_name": {
        "localized_value": [
          {
            "locale": "en",
            "value": "Reservation"
          }
        ]
      },
      "no_show_fee": {
        "fee": {
          "price_micros": 20000000,
           "currency_code": "USD"
         },
         "fee_type": "PER_PERSON"
      },
     "rules": {
        "min_advance_booking": 1800,
        "min_advance_online_canceling": 1800
      }
    },
    {
      "merchant_id": "C",
      "service_id": "1000",
       "localized_service_name": {
        "localized_value": [
          {
            "locale": "en",
            "value": "Reservation"
          }
        ]
      }
    }
  ]
}

Availability

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "nonce": "11203880",
    "generation_timestamp": 1543875200
  },
  "service_availability": [
    {
      "availability": [
        {
          "merchant_id": "A",
          "service_id": "1000",
          "start_sec": 1553875200,
          "duration_sec": 2700,
          "spots_total": 2,
          "spots_open": 2,
          "resources": {
            "room_id": "A-dining-room",
            "room_name": "Dining Room",
            "party_size": 2
          }
        },
        {
          "merchant_id": "A",
          "service_id": "1000",
          "start_sec": 1553875200,
          "duration_sec": 1800,
          "spots_total": 2,
          "spots_open": 2,
          "resources": {
            "room_id": "A-patio",
            "room_name": "Patio",
            "party_size": 2
          },
          "deposit": {
            "deposit": {
              "price_micros": 100000000,
              "currency_code": "USD"
            },
            "min_advance_cancellation_sec": 3600
          }
        },
        {
          "merchant_id": "B",
          "service_id": "1000",
          "start_sec": 1553875200,
          "duration_sec": 1800,
          "spots_total": 2,
          "spots_open": 2,
          "resources": {
            "party_size": 2
          }
        },
        {
          "merchant_id": "B",
          "service_id": "1000",
          "start_sec": 1553875200,
          "duration_sec": 1800,
          "spots_total": 2,
          "spots_open": 2,
          "resources": {
            "party_size": 4
          }
        },
        {
          "merchant_id": "C",
          "service_id": "1000",
          "start_sec": 1553875200,
          "duration_sec": 1800,
          "spots_total": 2,
          "spots_open": 2,
          "resources": {
            "party_size": 2
          },
          "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS"
        },
        {
          "merchant_id": "C",
          "service_id": "1000",
          "start_sec": 1553853600,
          "duration_sec": 1800,
          "spots_total": 2,
          "spots_open": 2,
          "resources": {
            "party_size": 2
          },
          "confirmation_mode": "CONFIRMATION_MODE_ASYNCHRONOUS",
          "scheduling_rule_overrides": {
            "last_bookable_sec": 1553850000
          }
        }
      ]
    }
  ]
}