Dining with Payments integration examples

The payment processor used in this example is Stripe.

Merchants

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "nonce": "12923311",
    "generation_timestamp": 1530431933
  },
  "merchant": [
    {
      "merchant_id": "100001",
      "name": "The Noodle Shop",
      "telephone": "+01 123-456-7890",
      "url": "0",
      "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": "Chinese"
    },
    {
      "merchant_id": "100002",
      "name": "Burrito Express",
      "telephone": "+01 123-456-7890",
      "url": "0",
      "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": "Mexican"
    },
    {
      "merchant_id": "100003",
      "name": "Coffee Café",
      "telephone": "+01 123-456-7854",
      "url": "0",
      "tax_rate": {
        "micro_percent": 6750000
      },
      "tokenization_config": {
        "tokenization_parameter": {
          "stripe:publishableKey": "merch_live_239SEDFF4VJ9324",
          "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": "Cafe"
    }
  ]
}

Services

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "nonce": "12484913",
    "generation_timestamp": 1530432018
  },
  "service": [
    {
      "merchant_id": "100001",
      "service_id": "1000",
      "name": "dining",
      "description": "The Noodle House serves homemade noodles in a delicious broth.",
      "rules": {
        "min_advance_booking": 7200,
        "min_advance_online_canceling": 1800
      },
      "prepayment_type": "REQUIRED",
      "require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS",
      "type": "SERVICE_TYPE_DINING_RESERVATION"
    },
    {
      "merchant_id": "100002",
      "service_id": "1000",
      "name": "dining",
      "description": "Burrito Express is a fast-casual restaurant that serves hearty burritos with fresh, organic ingredients.",
      "rules": {
        "min_advance_booking": 7200,
        "min_advance_online_canceling": 1800
      },
      "prepayment_type": "REQUIRED",
      "require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS",
      "type": "SERVICE_TYPE_DINING_RESERVATION"
    },
    {
      "merchant_id": "100003",
      "service_id": "1000",
      "name": "dining",
      "description": "Grab a fresh cup of coffee at Coffee Cafe.",
      "rules": {
        "min_advance_booking": 7200,
        "min_advance_online_canceling": 1800
      },
      "prepayment_type": "REQUIRED",
      "require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS",
      "type": "SERVICE_TYPE_DINING_RESERVATION"
    }
  ]
}

Availability

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "nonce": "11203880",
    "generation_timestamp": 1524606581
  },
  "service_availability": [
    {
      "availability": [
        {
          "merchant_id": "100001",
          "service_id": "1000",
          "start_sec": 1524853800,
          "duration_sec": 2700,
          "spots_total": 1,
          "spots_open": 1,
          "resources": {
            "room_id": "ABCD-EF012-DFS123",
            "room_name": "Restaurant",
            "party_size": 2
          }
        },
        {
          "merchant_id": "100001",
          "service_id": "1000",
          "start_sec": 1524853800,
          "duration_sec": 2700,
          "spots_total": 1,
          "spots_open": 1,
          "resources": {
            "room_id": "ABCD-EF012-Dd1203",
            "room_name": "Restaurant",
            "party_size": 3
          }
        },
        {
          "merchant_id": "100002",
          "service_id": "1000",
          "start_sec": 1524853800,
          "duration_sec": 1800,
          "spots_total": 1,
          "spots_open": 1,
          "resources": {
            "room_id": "ADMN-EF012-D09203",
            "room_name": "Restaurant",
            "party_size": 1
          }
        }
      ]
    }
  ]
}