Things To Do with Payments Integration Examples

The payment processor used in these examples are Stripe.

Activities

Merchants

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731312
  },
  "merchant": [
    {
      "category": "restaurant",
      "merchant_id": "283475",
      "name": "The Ultimate Chocolate Experience",
      "url": "http://www.ultimatechocolateexperience123.com/",
      "telephone": "+1 123-456-7890",
      "tax_rate": {
        "micro_percent": 0
      },
      "geo": {
        "address": {
          "locality": "Mountain View",
          "country": "USA",
          "region": "CA",
          "street_address": "1600 Amphitheatre Pkwy",
          "postal_code": "94043"
        }
      },
      "tokenization_config": {
        "tokenization_parameter": {
          "stripe:publishableKey": "merch_live_209XDVJ329VJKD",
          "gateway": "stripe",
          "stripe:version": "2017-08-15"
        }
      }
    }
  ]
}

Services

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731329
  },
  "service": [
    {
      "service_id": "324560",
      "merchant_id": "283475",
      "localized_service_name": {
        "value" : "Chocolate Tasting",
        "localized_value": [
          {
            "locale": "en",
            "value": "Chocolate Tasting"
          },
          {
            "locale": "fr",
            "value": "Dégustation de chocolats"
          }
        ]
      },
      "localized_description": {
        "value" : "Indulge in the ultimate chocolate experience! Enjoy the complex and rich flavors of various imported chocolates while seeing chocolatiers perfect their craft in our workshop.",
        "localized_value": [
          {
            "locale": "en",
            "value": "Indulge in the ultimate chocolate experience! Enjoy the complex and rich flavors of various imported chocolates while seeing chocolatiers perfect their craft in our workshop."
          },
          {
            "locale": "fr",
            "value": "Offrez-vous l'expérience ultime du chocolat! Profitez des saveurs complexes et riches de divers chocolats importés tout en voyant les chocolatiers perfectionner leur savoir-faire dans notre atelier."
          }
        ]
      },
      "ticket_type": [
        {
          "ticket_type_id": "1000",
          "localized_short_description": {
            "value" : "Premium Tasting - 8 chocolate bars",
            "localized_value": [
              {
                "locale": "en",
                "value": "Premium Tasting - 8 chocolate bars"
              },
              {
                "locale": "fr",
                "value": "Dégustation supérieure - 8 barres de chocolat"
              }
            ]
          },
          "price": {
            "price_micros": 195000000,
            "currency_code": "USD"
          },
          "per_ticket_fee": {
            "taxes": {
              "price_micros": 5000000,
              "currency_code": "USD"
            }
          }
        },
        {
          "ticket_type_id": "1001",
          "localized_short_description": {
            "value" : "Standard Tasting - 4 chocolate bars",
            "localized_value": [
              {
                "locale": "en",
                "value": "Standard Tasting - 4 chocolate bars"
              },
              {
                "locale": "fr",
                "value": "Dégustation standard - 4 barres de chocolat"
              }
            ]
          },
          "price": {
            "price_micros": 90000000,
            "currency_code": "USD"
          },
          "per_ticket_fee": {
            "taxes": {
              "price_micros": 5000000,
              "currency_code": "USD"
            }
          }
        },
        {
          "ticket_type_id": "1002",
          "localized_short_description": {
            "value" : "Child's Tasting - 2 chocolate bars",
            "localized_value": [
              {
                "locale": "en",
                "value": "Child's Tasting - 2 chocolate bars"
              },
              {
                "locale": "fr",
                "value": "Dégustation pour enfant - 2 barres de chocolat"
              }
            ]
          },
          "price": {
            "price_micros": 90000000,
            "currency_code": "USD"
          },
          "per_ticket_fee": {
            "taxes": {
              "price_micros": 5000000,
              "currency_code": "USD"
            }
          }
        }
      ],
      "prepayment_type": "REQUIRED",
      "related_media": [
        {
          "url": "https://www.ultimatechocolateexperience123.com/images/content/98273192832.jpg",
          "caption": "Ultimate Chocolate Experience",
          "type": "PHOTO"
        }
      ],
      "rating": {
        "value": 4.6,
        "number_of_ratings": 123
      },
      "cancellation_policy": {
        "refund_condition": [
          {
            "min_duration_before_start_time_sec": 3600,
            "refund_percent": 100
          }
        ]
      },
      "tours_and_activities_content": {
        "highlights": [
          {
            "value" : "Chocolate tasting with world renowned chocolatier",
            "localized_value": [
              {
                "locale": "en",
                "value": "Chocolate tasting with world renowned chocolatier"
              },
              {
                "locale": "fr",
                "value": "Dégustation de chocolats avec un chocolatier de renommée mondiale"
              }
            ],
            "inclusions": [
              {
                "value" : "Chocolate box souvenir",
                "localized_value": [
                  {
                    "locale": "en",
                    "value": "Chocolate box souvenir"
                  },
                  {
                    "locale": "fr",
                    "value": "Boite de chocolats souvenir"
                  }
                ]
              },
              {
                "value" : "Secret recipe for the chef's specialty chocolate",
                "localized_value": [
                  {
                    "locale": "en",
                    "value": "Secret recipe for the chef's specialty chocolate"
                  },
                  {
                    "locale": "fr",
                    "value": "Recette secrète pour le chocolat spécial du chef"
                  }
                ]
              }
            ],
            "exclusions": [
              {
                "value" : "Transportation to/from the event",
                "localized_value": [
                  {
                    "locale": "en",
                    "value": "Transportation to/from the event"
                  },
                  {
                    "locale": "fr",
                    "value": "Transport vers/depuis l'événement"
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  ]
}

Availability

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731356
  },
  "service_availability": [
    {
      "availability": [
        {
          "ticket_type_id": [
            "1000",
            "1001"
          ],
          "start_sec": 1534750200,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "324560",
          "merchant_id": "283475",
          "spots_open": 30,
          "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS"
        },
        {
          "ticket_type_id": [
            "1000",
            "1001",
            "1002"
          ],
          "start_sec": 1534836600,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "324520",
          "merchant_id": "283475",
          "spots_open": 30
        },
        {
          "ticket_type_id": [
            "1000",
            "1001",
            "1002"
          ],
          "start_sec": 1534923000,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "324560",
          "merchant_id": "283475",
          "spots_open": 30,
          "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS"
        },
        {
          "ticket_type_id": [
            "1000",
            "1001",
            "1002"
          ],
          "start_sec": 1535009400,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "324520",
          "merchant_id": "283475",
          "spots_open": 30
        },
        {
          "ticket_type_id": [
            "1000",
            "1001",
            "1002"
          ],
          "start_sec": 1535095800,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "324560",
          "merchant_id": "283475",
          "spots_open": 30,
          "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS"
        }
      ]
    }
  ]
}

Attractions

Merchants

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731312
  },
  "merchant": [
    {
      "category": "museum",
      "merchant_id": "323342",
      "name": "Future and Beyond Museum",
      "url": "http://www.futurebeyondmuseum.com",
      "telephone": "+1 123-456-7891",
      "tax_rate": {
        "micro_percent": 0
      },
      "geo": {
        "address": {
          "locality": "Mountain View",
          "country": "USA",
          "region": "CA",
          "street_address": "1600 Amphitheatre Pkwy",
          "postal_code": "94043"
        }
      },
      "tokenization_config": {
        "tokenization_parameter": {
          "stripe:publishableKey": "merch_live_209XDVJ329VJKD",
          "gateway": "stripe",
          "stripe:version": "2017-08-15"
        }
      }
    }
  ]
}

Services

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731329
  },
  "service": [
    {
      "service_id": "975274",
      "merchant_id": "146382",
      "localized_service_name": {
        "value": "F&B Museum Admissions",
        "localized_value": [
          {
            "locale": "en",
            "value": "F&B Museum Admissions"
          },
          {
            "locale": "fr",
            "value": "Admissions au musée F&B"
          }
        ]
      },
      "localized_description": {
        "value": "Bring your family and friends to see the latest and greatest technology. Admissions to the Future and Beyond Museum will guarantee a fun and educational experience.",
        "localized_value": [
          {
            "locale": "en",
            "value": "Bring your family and friends to see the latest and greatest technology. Admissions to the Future and Beyond Museum will guarantee a fun and educational experience."
          },
          {
            "locale": "fr",
            "value": "Amenez votre famille et vos amis pour découvrir les technologies les plus récentes et les plus impressionnantes. La visite du Future and Beyond Museum garantira une expérience amusante et éducative."
          }
        ]
      },
      "ticket_type": [
        {
          "ticket_type_id": "2003",
          "localized_short_description": {
            "value": "Adulte: Age: 13 - 64"
          },
          "price": {
            "price_micros": 45000000,
            "currency_code": "USD"
          }
        },
        {
          "ticket_type_id": "2004",
          "localized_short_description": {
            "value": "Reduced Ticket: Seniors 65+ and Students with a student ID",
            "localized_value": [
              {
                "locale": "en",
                "value": "Reduced Ticket: Seniors 65+ and Students with a student ID"
              },
              {
                "locale": "fr",
                "value": "Tarif réduit: seniors 65+ et étudiants avec une carte étudiante"
              }
            ]
          },
          "price": {
            "price_micros": 25000000,
            "currency_code": "EUR"
          }
        },
        {
          "ticket_type_id": "2005",
          "localized_short_description": {
            "value": "Child: Age: 6 - 12"
          },
          "price": {
            "price_micros": 20000000,
            "currency_code": "EUR"
          }
        }
      ],
      "prepayment_type": "REQUIRED",
      "related_media": [
        {
          "url": "https://www.futurebeyondmuseum.com/images/content/12238492832.jpg",
          "caption": "ZIOLIO Space Shuttle",
          "type": "PHOTO"
        }
      ],
      "rules": {
        "min_advance_booking": 100,
        "min_booking_buffer_before_end_time": 1800,
        "admission_policy": "TIME_FLEXIBLE"
      },
      "rating": {
        "value": 3.9,
        "number_of_ratings": 1492
      },
      "cancellation_policy": {
        "refund_condition": [
          {
            "min_duration_before_start_time_sec": 86400,
            "refund_percent": 50
          },
          {
            "min_duration_before_start_time_sec": 259200,
            "refund_percent": 100
          }
        ]
      },
      "require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS",
      "tours_and_activities_content": {
        "highlights": [
          {
            "value": "Future and Beyond Museum",
            "localized_value": [
              {
                "locale": "en",
                "value": "Future and Beyond Museum"
              },
              {
                "locale": "fr",
                "value": "Future and Beyond Museum"
              }
            ]
          }
        ],
        "inclusions": [
          {
            "value": "Admission to Future and Beyond Museum",
            "localized_value": [
              {
                "locale": "en",
                "value": "Admission to Future and Beyond Museum"
              },
              {
                "locale": "fr",
                "value": "Admission pour le Future and Beyond Museum"
              }
            ]
          }
        ],
        "exclusions": [
          {
            "value": "Food is for purchase at the Museum Cafe",
            "localized_value": [
              {
                "locale": "en",
                "value": "Food is for purchase at the Museum Cafe"
              },
              {
                "locale": "fr",
                "value": "La nourriture achetée au Museum Cafe"
              }
            ]
          }
        ],
        "must_know": [
          {
            "value": "Tickets to special exhibits are sold separately",
            "localized_value": [
              {
                "locale": "en",
                "value": "Tickets to special exhibits are sold separately"
              },
              {
                "locale": "fr",
                "value": "Les billets pour les expositions spéciales sont vendus séparément"
              }
            ]
          }
        ]
      }
    }
  ]
}

Availability

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731356
  },
  "service_availability": [
    {
      "availability": [
        {
          "ticket_type_id": [
            "2003",
            "2004",
            "2005"
          ],
          "start_sec": 1534750200,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "975274",
          "merchant_id": "146382",
          "spots_open": 30,
          "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS"
        }
      ]
    }
  ]
}

Tours

Merchants

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731312
  },
  "merchant": [
    {
      "category": "tour",
      "merchant_id": "323342",
      "name": "Bike Tour Agency",
      "url": "http://www.bestbiketours.com",
      "telephone": "+1 123-456-7891",
      "tax_rate": {
        "micro_percent": 0
      },
      "geo": {
        "address": {
          "locality": "Mountain View",
          "country": "USA",
          "region": "CA",
          "street_address": "1600 Amphitheatre Pkwy",
          "postal_code": "94043"
        }
      },
      "tokenization_config": {
        "tokenization_parameter": {
          "stripe:publishableKey": "merch_live_209XDVJ329VJKD",
          "gateway": "stripe",
          "stripe:version": "2017-08-15"
        }
      }
    }
  ]
}

Services

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731329
  },
  "service": [
    {
      "service_id": "975384",
      "merchant_id": "146464",
      "localized_service_name": {
        "value": "San Francisco Bike Tour",
        "localized_value": [
          {
            "locale": "en",
            "value": "San Francisco Bike Tour"
          },
          {
            "locale": "fr",
            "value": "Tour à vélo dans San Francisco"
          }
        ]
      },
      "localized_description": {
        "value": "Learn about the history of San Francisco while enjoying a fun bike ride around the city. San Francisco is known for its eclectic architecture, cable cars, Golden Gate bridge, and delicious cuisine. This bike tour is appropriate for all ages and all fitness levels.",
        "localized_value": [
          {
            "locale": "en",
            "value": "Learn about the history of San Francisco while enjoying a fun bike ride around the city. San Francisco is known for its eclectic architecture, cable cars, Golden Gate bridge, and delicious cuisine. This bike tour is appropriate for all ages and all fitness levels."
          },
          {
            "locale": "fr",
            "value": "Découvrez l’histoire de San Francisco tout en profitant d’une balade à vélo amusante dans la ville. San Francisco est connue pour son architecture éclectique, ses téléphériques, son pont du Golden Gate et sa délicieuse cuisine. Ce tour à vélo convient à tous les âges et à tous les niveaux de condition physique."
          }
        ]
      },
      "ticket_type": [
        {
          "ticket_type_id": "TOUR-A-1",
          "localized_short_description": {
            "value": "General Tour - 30 pp",
            "localized_value": [
              {
                "locale": "en",
                "value": "General Tour - 30 pp"
              },
              {
                "locale": "fr",
                "value": "Tour standard - 30 participants"
              }
            ]
          },
          "price": {
            "price_micros": 1950000000,
            "currency_code": "USD"
          }
        },
        {
          "ticket_type_id": "TOUR-A-2",
          "localized_short_description": {
            "value": "Private Tour - up to 6 pp",
            "localized_value": [
              {
                "locale": "en",
                "value": "Private Tour - up to 6 pp"
              },
              {
                "locale": "fr",
                "value": "Tour privé - maximum 6 participants"
              }
            ]
          },
          "price": {
            "price_micros": 2950000000,
            "currency_code": "USD"
          }
        }
      ],
      "location": [
        {
          "name": "San Francisco Marriott Marquis",
          "geo": {
            "address": {
              "country": "USA",
              "locality": "San Francisco",
              "postal_code": "94103",
              "region": "CA",
              "street_address": "780 Mission St."
            }
          },
          "location_type": "START_LOCATION",
          "location_id": "hotel-1"
        },
        {
          "name": "The Ritz-Carlton, San Francisco",
          "geo": {
            "unstructured_address": "600 Stockton St, San Francisco, CA 94108 United States"
          },
          "location_type": "START_LOCATION",
          "location_id": "hotel-2"
        },
        {
          "name": "The Westin St. Francis San Francisco on Union Square",
          "geo": {
            "unstructured_address": "8335 Powell St, San Francisco, CA 94102 United States"
          },
          "location_type": "START_LOCATION",
          "location_id": "hotel-3"
        }
      ],
      "intake_form": {
        "field": [
          {
            "type": "LOCATION_SEARCH",
            "label": "Please select the pick up hotel below:",
            "value": [
              "hotel-1",
              "hotel-2",
              "hotel-3"
            ],
            "is_required": true,
            "id": "hotel-pick-up-form-1"
          }
        ]
      },
      "prepayment_type": "REQUIRED",
      "rules": {
        "min_advance_booking": null,
        "min_booking_buffer_before_end_time": null,
        "admission_policy": "TIME_STRICT"
      },
      "rating": {
        "value": 4,
        "number_of_ratings": 72
      },
      "cancellation_policy": {
        "refund_condition": [
          {
            "min_duration_before_start_time_sec": 0,
            "refund_percent": 0
          }
        ]
      },
      "require_credit_card": "REQUIRE_CREDIT_CARD_CONDITIONAL",
      "tours_and_activities_content": {
        "highlights": [
          {
            "value": "Golden Gate Bridge",
            "localized_value": [
              {
                "locale": "en",
                "value": "Golden Gate Bridge"
              },
              {
                "locale": "fr",
                "value": "Golden Gate Bridge"
              }
            ]
          },
          {
            "value": "Golden Gate Park",
            "localized_value": [
              {
                "locale": "en",
                "value": "Golden Gate Park"
              },
              {
                "locale": "fr",
                "value": "Golden Gate Park"
              }
            ]
          },
          {
            "value": "Presidio Park",
            "localized_value": [
              {
                "locale": "en",
                "value": "Presidio Park"
              },
              {
                "locale": "fr",
                "value": "Presidio Park"
              }
            ]
          }
        ],
        "inclusions": [
          {
            "value": "Free shuttle with A/C from pick-up locations ",
            "localized_value": [
              {
                "locale": "en",
                "value": "Free shuttle with A/C from pick-up locations "
              },
              {
                "locale": "fr",
                "value": "Navette gratuite avec A / C à partir du lieu de départ"
              }
            ]
          },
          {
            "value": "Biking gear: bike, helmet",
            "localized_value": [
              {
                "locale": "en",
                "value": "Biking gear: bike, helmet"
              },
              {
                "locale": "fr",
                "value": "Équipement de vélo: vélo, casque"
              }
            ]
          },
          {
            "value": "Free bottled water",
            "localized_value": [
              {
                "locale": "en",
                "value": "Free bottled water"
              },
              {
                "locale": "fr",
                "value": "Eau en bouteille gratuite"
              }
            ]
          }
        ],
        "exclusions": [
          {
            "value": "Lunch (a stop will be made at the local grocery where food can be purchased)",
            "localized_value": [
              {
                "locale": "en",
                "value": "Lunch (a stop will be made at the local grocery where food can be purchased)"
              },
              {
                "locale": "fr",
                "value": "Déjeuner (un arrêt sera fait à une épicerie locale où la nourriture peut être achetée)"
              }
            ]
          }
        ],
        "must_know": [
          {
            "value": "Bring sunscreen, sunglasses",
            "localized_value": [
              {
                "locale": "en",
                "value": "Bring sunscreen, sunglasses"
              },
              {
                "locale": "fr",
                "value": "Apportez de la crème solaire, des lunettes de soleil"
              }
            ]
          },
          {
            "value": "Tip for the tour guide is not included",
            "localized_value": [
              {
                "locale": "en",
                "value": "Tip for the tour guide is not included"
              },
              {
                "locale": "fr",
                "value": "Le pourboire du guide n'est pas inclus"
              }
            ]
          }
        ]
      }
    }
  ]
}

Availability

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "shard_number": 0,
    "total_shards": 1,
    "generation_timestamp": 1534731356
  },
  "service_availability": [
    {
      "availability": [
        {
          "ticket_type_id": [
            "TOUR-A-1",
            "TOUR-A-2"
          ],
          "start_sec": 1534750200,
          "duration_sec": 28800,
          "spots_total": 30,
          "service_id": "975384",
          "merchant_id": "323342",
          "spots_open": 30,
          "confirmation_mode": "CONFIRMATION_MODE_SYNCHRONOUS"
        }
      ]
    }
  ]
}

Notes:

  • Availability Feed
    • If all ticket types are applicable for the availability slot, no need to explicitly define them in ticket_type_id.