تغذیه می کند

پردازشگر پرداخت مورد استفاده در این مثال Stripe است.

{
 
"metadata": {
   
"processing_instruction": "PROCESS_AS_COMPLETE",
   
"generation_timestamp": 1503638100,
   
"nonce": "1298711",
   
"total_shards": 1,
   
"shard_number": 0
 
},
 
"merchant": [
   
{
     
"category": "beauty_salon",
     
"merchant_id": "beauty-A",
     
"name": "Chic Haircuts",
     
"telephone": "+1 123-456-2390",
     
"url": "",
     
"tax_rate": {
       
"micro_percent": 0
     
},
     
"tokenization_config": {
       
"tokenization_parameter": {
         
"stripe:publishableKey": "merch_live_5203JSDFKLCX09234XCLK",
         
"gateway": "stripe",
         
"stripe:version": "2018-08-18"
       
}
     
},
     
"geo": {
       
"latitude": 37.422113,
       
"longitude": -122.084041,
       
"address": {
         
"country": "US",
         
"region": "CA",
         
"postal_code": "94043",
         
"street_address": "1600 Amphitheatre Pkwy",
         
"locality": "Mountain View"
       
}
     
},
     
"num_bookings_30d": 45,
     
"payment_option": [
       
{
         
"activation_type": "ACTIVATION_ON_FIRST_USE",
         
"payment_option_id": "ABCD-12345-12983-19283",
         
"price": {
           
"price_micros": 45000000,
           
"currency_code": "USD"
         
},
         
"session_count": 1,
         
"description": "",
         
"name": "Men's Haircut",
         
"valid_interval": {
           
"begin_sec": 1503639426,
           
"end_sec": 1506317826
         
},
         
"payment_option_type": "PAYMENT_OPTION_SINGLE_USE",
         
"purchase_interval": {
           
"begin_sec": 1503639426,
           
"end_sec": 1506317826
         
},
         
"tax_rate": {
           
"micro_percent": 6750000
         
}
       
},
       
{
         
"activation_type": "ACTIVATION_ON_FIRST_USE",
         
"payment_option_id": "EFJS-12345-12983-19283",
         
"price": {
           
"price_micros": 45000000,
           
"currency_code": "USD"
         
},
         
"session_count": 1,
         
"description": "",
         
"name": "Women's Haircut",
         
"valid_interval": {
           
"begin_sec": 1503639426,
           
"end_sec": 1506317826
         
},
         
"payment_option_type": "PAYMENT_OPTION_SINGLE_USE",
         
"purchase_interval": {
           
"begin_sec": 1503639426,
           
"end_sec": 1506317826
         
},
         
"tax_rate": {
           
"micro_percent": 6750000
         
}
       
},
       
{
         
"activation_type": "ACTIVATION_ON_FIRST_USE",
         
"payment_option_id": "SDOK-12345-12983-19283",
         
"price": {
           
"price_micros": 55000000,
           
"currency_code": "USD"
         
},
         
"session_count": 1,
         
"description": "",
         
"name": "Extensions",
         
"valid_interval": {
           
"begin_sec": 1503639426,
           
"end_sec": 1506317826
         
},
         
"payment_option_type": "PAYMENT_OPTION_SINGLE_USE",
         
"purchase_interval": {
           
"begin_sec": 1503639426,
           
"end_sec": 1506317826
         
},
         
"tax_rate": {
           
"micro_percent": 6750000
         
}
       
}
     
]
   
}
 
]
}

{
 
"metadata": {
   
"processing_instruction": "PROCESS_AS_COMPLETE",
   
"generation_timestamp": 1535437200,
   
"nonce": "12484213",
   
"total_shards": 1,
   
"shard_number": 0
 
},
 
"service": [
   
{
     
"merchant_id": "beauty-A",
     
"service_id": "209012",
     
"localized_service_name": {
       
"value": "Men's Haircut",
       
"localized_value": [
         
{
           
"locale": "en",
           
"value": "Men's Haircut"
         
}
       
]
     
},
     
"localized_description": {
       
"value": "Choose from a variety of men's styles from award-winning hairdressers.",
       
"localized_value": [
         
{
           
"locale": "en",
           
"value": "Choose from a variety of men's styles from award-winning hairdressers."
         
}
       
]
     
},
     
"price": {
       
"currency_code": "USD",
       
"price_micros": 40000000
     
},
     
"prepayment_type": "REQUIRED",
     
"rules": {
       
"min_advance_booking": 0,
       
"min_advance_online_canceling": 86400
     
},
     
"tax_rate": {
       
"micro_percent": 5000000
     
},
     
"require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS"
   
},
   
{
     
"service_id": "209013",
     
"localized_service_name": {
       
"value": "Women's Haircut",
       
"localized_value": [
         
{
           
"locale": "en",
           
"value": "Women's Haircut"
         
}
       
]
     
},
     
"localized_description": {
       
"value": "Choose from a variety of women's styles from award-winning hairdressers.",
       
"localized_value": [
         
{
           
"locale": "en",
           
"value": "Choose from a variety of women's styles from award-winning hairdressers."
         
}
       
]
     
},
     
"price": {
       
"currency_code": "USD",
       
"price_micros": 40000000
     
},
     
"prepayment_type": "REQUIRED",
     
"merchant_id": "beauty-A",
     
"rules": {
       
"min_advance_booking": 0,
       
"min_advance_online_canceling": 86400
     
},
     
"tax_rate": {
       
"micro_percent": 5000000
     
},
     
"require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS"
   
},
   
{
     
"service_id": "209014",
     
"localized_service_name": {
       
"value": "Extensions",
       
"localized_value": [
         
{
           
"locale": "en",
           
"value": "Extensions"
         
}
       
]
     
},
     
"localized_description": {
       
"value": "Add extensions for a variety of lengths and colors.",
       
"localized_value": [
         
{
           
"locale": "en",
           
"value": "Add extensions for a variety of lengths and colors."
         
}
       
]
     
},
     
"price": {
       
"currency_code": "USD",
       
"price_micros": 70000000
     
},
     
"prepayment_type": "REQUIRED",
     
"merchant_id": "beauty-A",
     
"rules": {
       
"min_advance_booking": 0,
       
"min_advance_online_canceling": 86400
     
},
     
"tax_rate": {
       
"micro_percent": 5000000
     
},
     
"require_credit_card": "REQUIRE_CREDIT_CARD_ALWAYS"
   
}
 
]
}

{
 
"metadata": {
   
"processing_instruction": "PROCESS_AS_COMPLETE",
   
"generation_timestamp": 1535178900,
   
"nonce": "192839",
   
"total_shards": 1,
   
"shard_number": 0
 
},
 
"service_availability": [
   
{
     
"availability": [
       
{
         
"merchant_id": "beauty-A",
         
"service_id": "209012",
         
"resources": {
           
"staff_name": "Jane Doe",
           
"staff_id": "12345"
         
},
         
"payment_option_id": [
           
"ABCD-12345-12983-19283"
         
],
         
"duration_sec": 1800,
         
"start_sec": 1493888400,
         
"spots_open": 1,
         
"spots_total": 1,
         
"recurrence": {
           
"repeat_every_sec": 1800,
           
"repeat_until_sec": 1493915400
         
},
         
"schedule_exception": [
           
{
             
"time_range": {
               
"begin_sec": 1493901000,
               
"end_sec": 1493902800
             
}
           
}
         
]
       
},
       
{
         
"merchant_id": "beauty-A",
         
"service_id": "209013",
         
"resources": {
           
"staff_name": "John Doe",
           
"staff_id": "89120"
         
},
         
"payment_option_id": [
           
"ABCD-12345-12983-19283"
         
],
         
"duration_sec": 1800,
         
"start_sec": 1493888400,
         
"spots_open": 1,
         
"spots_total": 1,
         
"recurrence": {
           
"repeat_every_sec": 1800,
           
"repeat_until_sec": 1493915400
         
},
         
"schedule_exception": [
           
{
             
"time_range": {
               
"begin_sec": 1493901000,
               
"end_sec": 1493902800
             
}
           
}
         
]
       
},
       
{
         
"merchant_id": "beauty-A",
         
"service_id": "209014",
         
"resources": {
           
"staff_name": "Susie Chung",
           
"staff_id": "12347"
         
},
         
"payment_option_id": [
           
"SDOK-12345-12983-19283"
         
],
         
"duration_sec": 3600,
         
"start_sec": 1493888400,
         
"spots_open": 1,
         
"spots_total": 1,
         
"recurrence": {
           
"repeat_every_sec": 3600,
           
"repeat_until_sec": 1493915400
         
}
       
}
     
]
   
}
 
]
}