< Return to Summary | File Generated: Wed Mar 27 2024 15:17:37 GMT+0000 (Coordinated Universal Time)

prepayment-optional >> payment-mismatch (OpenBookingApprovalFlow >> ScheduledSession)

Booking Flow: OpenBookingApprovalFlow

Opportunity Type: ScheduledSession

Feature: Payment / prepayment optional (Implemented)

Test: Expect a TotalPaymentDueMismatchError when the totalPaymentDue property does not match

Run B for a valid opportunity, with totalPaymentDue not matching the value returned by C2, expecting a TotalPaymentDueMismatchError to be returned (C1 and C2 ignored as they do not have totalPaymentDue)

Running only this test

npm start -- --runInBand test/features/payment/prepayment-optional/implemented/payment-mismatch-test.js

Is this test failing?

The OpenActive Reference Implementation test result for this test can be used as a reference to help with debugging.


⚠️ 14 passed with 0 failures, 73 warnings and 30 suggestions


✅ Unnecessary payment property at B >> Fetch Opportunities

Local Microservice Test Interface for OrderItem 0 Request

POST http://localhost:3000/test-interface/datasets/uat-ci/opportunities

{
  "@type": "ScheduledSession",
  "superEvent": {
    "@type": "SessionSeries",
    "organizer": {
      "@type": "Organization",
      "@id": "https://localhost:5001/api/identifiers/sellers/1"
    }
  },
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookableNonFreePrepaymentOptional",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingApprovalFlow"
}

Response status code: 200 OK. Responded in 7.125472ms.

{
  "@context": "https://openactive.io/",
  "@type": "ScheduledSession",
  "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877"
}

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F1388%2Fevents%2F13877?useCacheIfAvailable=true


Response status code: 200 OK. Responded in 5.127771ms.

{
  "data": {
    "@context": [
      "https://openactive.io/",
      "https://openactive.io/ns-beta"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877",
    "startDate": "2024-04-03T03:51:08+00:00",
    "endDate": "2024-04-03T07:40:08+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1388",
      "name": "Plastic Running",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "openBookingPrepayment": "https://openactive.io/Optional",
          "price": 18.16,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P14DT19H39M"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age",
      "beta:affiliatedLocation": {
        "@type": "Place",
        "identifier": 1,
        "name": "Post-ercise Plaza",
        "description": "Sorting Out Your Fitness One Parcel Lift at a Time! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1AA",
          "streetAddress": "Kings Mead House"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": true
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": true
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": true
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": false
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": false
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": false
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7502,
          "longitude": -1.2674
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/e/e5/Oxford_StAldates_PostOffice.jpg"
          }
        ],
        "telephone": "01865 000001",
        "url": "https://en.wikipedia.org/wiki/Post_Office_Limited"
      }
    },
    "duration": "PT3H49M",
    "maximumAttendeeCapacity": 20,
    "remainingAttendeeCapacity": 20
  }
}

Specs

✅ Unnecessary payment property at B >> Fetch Opportunities >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Unnecessary payment property at B >> C1

C1 Request

PUT https://localhost:5001/api/openbooking/order-quote-templates/f5e46203-6186-4970-a2e9-d72ad0ebd29a

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 200 OK. Responded in 248.193672ms.

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/f5e46203-6186-4970-a2e9-d72ad0ebd29a",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-27T15:22:49+00:00"
  },
  "orderRequiresApproval": true,
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com"
  },
  "brokerRole": "https://openactive.io/AgentBroker",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "openBookingPrepayment": "https://openactive.io/Optional",
        "price": 18.16,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P14DT19H39M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877",
        "startDate": "2024-04-03T03:51:08+00:00",
        "endDate": "2024-04-03T07:40:08+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1388",
          "name": "Plastic Running",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "identifier": 1,
            "name": "Post-ercise Plaza",
            "description": "Sorting Out Your Fitness One Parcel Lift at a Time! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1AA",
              "streetAddress": "Kings Mead House"
            },
            "amenityFeature": [
              {
                "@type": "ChangingFacilities",
                "name": "Changing Facilities",
                "value": true
              },
              {
                "@type": "Showers",
                "name": "Showers",
                "value": true
              },
              {
                "@type": "Lockers",
                "name": "Lockers",
                "value": true
              },
              {
                "@type": "Towels",
                "name": "Towels",
                "value": false
              },
              {
                "@type": "Creche",
                "name": "Creche",
                "value": false
              },
              {
                "@type": "Parking",
                "name": "Parking",
                "value": false
              }
            ],
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.7502,
              "longitude": -1.2674
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/e/e5/Oxford_StAldates_PostOffice.jpg"
              }
            ],
            "telephone": "01865 000001",
            "url": "https://en.wikipedia.org/wiki/Post_Office_Limited"
          },
          "url": "https://example.com/events/1388"
        },
        "maximumAttendeeCapacity": 20,
        "remainingAttendeeCapacity": 20
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 3.632,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  },
  "seller": {
    "@type": "Organization",
    "@id": "https://localhost:5001/api/identifiers/sellers/1",
    "name": "Acme Fitness Ltd",
    "address": {
      "@type": "PostalAddress",
      "addressCountry": "GB",
      "addressLocality": "Another town",
      "addressRegion": "Oxfordshire",
      "postalCode": "OX1 1AA",
      "streetAddress": "1 Hidden Gem"
    },
    "isOpenBookingAllowed": true,
    "legalName": "Acme Fitness Ltd",
    "taxMode": "https://openactive.io/TaxGross",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ]
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "openBookingPrepayment": "https://openactive.io/Optional",
    "price": 18.16,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 3.632,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ Unnecessary payment property at B >> C1 >> validation of C1

Specs

Validations

✅ Unnecessary payment property at B >> Assert Opportunity Capacity (after C1)

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F1388%2Fevents%2F13877?useCacheIfAvailable=true&expectedCapacity=19


Response status code: 200 OK. Responded in 301.539579ms.

{
  "state": "updated",
  "id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877",
  "modified": "1711552670860",
  "data": {
    "@context": [
      "https://openactive.io/",
      "https://openactive.io/ns-beta"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877",
    "startDate": "2024-04-03T03:51:08+00:00",
    "endDate": "2024-04-03T07:40:08+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1388",
      "name": "Plastic Running",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "openBookingPrepayment": "https://openactive.io/Optional",
          "price": 18.16,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P14DT19H39M"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age",
      "beta:affiliatedLocation": {
        "@type": "Place",
        "identifier": 1,
        "name": "Post-ercise Plaza",
        "description": "Sorting Out Your Fitness One Parcel Lift at a Time! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1AA",
          "streetAddress": "Kings Mead House"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": true
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": true
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": true
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": false
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": false
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": false
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7502,
          "longitude": -1.2674
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/e/e5/Oxford_StAldates_PostOffice.jpg"
          }
        ],
        "telephone": "01865 000001",
        "url": "https://en.wikipedia.org/wiki/Post_Office_Limited"
      }
    },
    "duration": "PT3H49M",
    "maximumAttendeeCapacity": 20,
    "remainingAttendeeCapacity": 19
  }
}

Specs

✅ Unnecessary payment property at B >> Assert Opportunity Capacity (after C1) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Unnecessary payment property at B >> C2

C2 Request

PUT https://localhost:5001/api/openbooking/order-quotes/f5e46203-6186-4970-a2e9-d72ad0ebd29a

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "customer": {
    "@type": "Person",
    "email": "[email protected]",
    "givenName": "Krajcik",
    "familyName": "Dallas"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 200 OK. Responded in 388.703479ms.

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "@id": "https://localhost:5001/api/openbooking/order-quotes/f5e46203-6186-4970-a2e9-d72ad0ebd29a",
  "lease": {
    "@type": "Lease",
    "leaseExpires": "2024-03-27T15:22:50+00:00"
  },
  "orderRequiresApproval": true,
  "bookingService": {
    "@type": "BookingService",
    "name": "Acme booking system",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ],
    "url": "https://example.com"
  },
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com"
  },
  "brokerRole": "https://openactive.io/AgentBroker",
  "customer": {
    "@type": "Person",
    "email": "[email protected]",
    "familyName": "Dallas",
    "givenName": "Krajcik"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "acceptedOffer": {
        "@type": "Offer",
        "@id": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
        "allowCustomerCancellationFullRefund": true,
        "openBookingPrepayment": "https://openactive.io/Optional",
        "price": 18.16,
        "priceCurrency": "GBP",
        "validFromBeforeStartDate": "P14DT19H39M"
      },
      "orderedItem": {
        "@type": "ScheduledSession",
        "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877",
        "startDate": "2024-04-03T03:51:08+00:00",
        "endDate": "2024-04-03T07:40:08+00:00",
        "superEvent": {
          "@type": "SessionSeries",
          "@id": "https://localhost:5001/api/identifiers/session-series/1388",
          "name": "Plastic Running",
          "activity": [
            {
              "@type": "Concept",
              "@id": "https://openactive.io/activity-list#6bdea630-ad22-4e58-98a3-bca26ee3f1da",
              "inScheme": "https://openactive.io/activity-list",
              "prefLabel": "Rave Fitness"
            }
          ],
          "location": {
            "@type": "Place",
            "identifier": 1,
            "name": "Post-ercise Plaza",
            "description": "Sorting Out Your Fitness One Parcel Lift at a Time! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "address": {
              "@type": "PostalAddress",
              "addressCountry": "GB",
              "addressLocality": "Oxford",
              "addressRegion": "Oxfordshire",
              "postalCode": "OX1 1AA",
              "streetAddress": "Kings Mead House"
            },
            "amenityFeature": [
              {
                "@type": "ChangingFacilities",
                "name": "Changing Facilities",
                "value": true
              },
              {
                "@type": "Showers",
                "name": "Showers",
                "value": true
              },
              {
                "@type": "Lockers",
                "name": "Lockers",
                "value": true
              },
              {
                "@type": "Towels",
                "name": "Towels",
                "value": false
              },
              {
                "@type": "Creche",
                "name": "Creche",
                "value": false
              },
              {
                "@type": "Parking",
                "name": "Parking",
                "value": false
              }
            ],
            "geo": {
              "@type": "GeoCoordinates",
              "latitude": 51.7502,
              "longitude": -1.2674
            },
            "image": [
              {
                "@type": "ImageObject",
                "url": "https://upload.wikimedia.org/wikipedia/commons/e/e5/Oxford_StAldates_PostOffice.jpg"
              }
            ],
            "telephone": "01865 000001",
            "url": "https://en.wikipedia.org/wiki/Post_Office_Limited"
          },
          "url": "https://example.com/events/1388"
        },
        "maximumAttendeeCapacity": 20,
        "remainingAttendeeCapacity": 20
      },
      "position": 0,
      "unitTaxSpecification": [
        {
          "@type": "TaxChargeSpecification",
          "name": "VAT at 20%",
          "price": 3.632,
          "priceCurrency": "GBP",
          "rate": 0.2
        }
      ]
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  },
  "seller": {
    "@type": "Organization",
    "@id": "https://localhost:5001/api/identifiers/sellers/1",
    "name": "Acme Fitness Ltd",
    "address": {
      "@type": "PostalAddress",
      "addressCountry": "GB",
      "addressLocality": "Another town",
      "addressRegion": "Oxfordshire",
      "postalCode": "OX1 1AA",
      "streetAddress": "1 Hidden Gem"
    },
    "isOpenBookingAllowed": true,
    "legalName": "Acme Fitness Ltd",
    "taxMode": "https://openactive.io/TaxGross",
    "termsOfService": [
      {
        "@type": "PrivacyPolicy",
        "name": "Privacy Policy",
        "requiresExplicitConsent": false,
        "url": "https://example.com/privacy.html"
      }
    ]
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "openBookingPrepayment": "https://openactive.io/Optional",
    "price": 18.16,
    "priceCurrency": "GBP"
  },
  "totalPaymentTax": [
    {
      "@type": "TaxChargeSpecification",
      "name": "VAT at 20%",
      "price": 3.632,
      "priceCurrency": "GBP",
      "rate": 0.2
    }
  ]
}

Specs

✅ Unnecessary payment property at B >> C2 >> validation of C2

Specs

Validations

✅ Unnecessary payment property at B >> Assert Opportunity Capacity (after C2)

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F1388%2Fevents%2F13877?useCacheIfAvailable=true&expectedCapacity=19


Response status code: 200 OK. Responded in 9.977965ms.

{
  "data": {
    "@context": [
      "https://openactive.io/",
      "https://openactive.io/ns-beta"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877",
    "startDate": "2024-04-03T03:51:08+00:00",
    "endDate": "2024-04-03T07:40:08+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/1388",
      "name": "Plastic Running",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#c07d63a0-8eb9-4602-8bcc-23be6deb8f83",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Jet Skiing"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
          "allowCustomerCancellationFullRefund": true,
          "openBookingFlowRequirement": [
            "https://openactive.io/OpenBookingApproval"
          ],
          "openBookingPrepayment": "https://openactive.io/Optional",
          "price": 18.16,
          "priceCurrency": "GBP",
          "validFromBeforeStartDate": "P14DT19H39M"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "taxMode": "https://openactive.io/TaxGross",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ]
      },
      "url": "https://www.example.com/a-session-age",
      "beta:affiliatedLocation": {
        "@type": "Place",
        "identifier": 1,
        "name": "Post-ercise Plaza",
        "description": "Sorting Out Your Fitness One Parcel Lift at a Time! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "address": {
          "@type": "PostalAddress",
          "addressCountry": "GB",
          "addressLocality": "Oxford",
          "addressRegion": "Oxfordshire",
          "postalCode": "OX1 1AA",
          "streetAddress": "Kings Mead House"
        },
        "amenityFeature": [
          {
            "@type": "ChangingFacilities",
            "name": "Changing Facilities",
            "value": true
          },
          {
            "@type": "Showers",
            "name": "Showers",
            "value": true
          },
          {
            "@type": "Lockers",
            "name": "Lockers",
            "value": true
          },
          {
            "@type": "Towels",
            "name": "Towels",
            "value": false
          },
          {
            "@type": "Creche",
            "name": "Creche",
            "value": false
          },
          {
            "@type": "Parking",
            "name": "Parking",
            "value": false
          }
        ],
        "geo": {
          "@type": "GeoCoordinates",
          "latitude": 51.7502,
          "longitude": -1.2674
        },
        "image": [
          {
            "@type": "ImageObject",
            "url": "https://upload.wikimedia.org/wikipedia/commons/e/e5/Oxford_StAldates_PostOffice.jpg"
          }
        ],
        "telephone": "01865 000001",
        "url": "https://en.wikipedia.org/wiki/Post_Office_Limited"
      }
    },
    "duration": "PT3H49M",
    "maximumAttendeeCapacity": 20,
    "remainingAttendeeCapacity": 19
  }
}

Specs

✅ Unnecessary payment property at B >> Assert Opportunity Capacity (after C2) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

✅ Unnecessary payment property at B >> P

P Request

PUT https://localhost:5001/api/openbooking/order-proposals/f5e46203-6186-4970-a2e9-d72ad0ebd29a

{
  "@context": "https://openactive.io/",
  "@type": "OrderProposal",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "customer": {
    "@type": "Person",
    "email": "[email protected]",
    "givenName": "Krajcik",
    "familyName": "Dallas"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/1388#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/1388/events/13877"
    }
  ],
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": 19.16,
    "priceCurrency": "GBP"
  },
  "payment": {
    "@type": "Payment",
    "identifier": "UpW6u5bEmg",
    "name": "AcmeBroker Points",
    "accountId": "SN1593",
    "paymentProviderId": "STRIPE"
  }
}

Response status code: 400 Bad Request. Responded in 263.172587ms.

{
  "@context": "https://openactive.io/",
  "@type": "TotalPaymentDueMismatchError",
  "name": "The 'totalPaymentDue' property of the submitted 'Order' or 'OrderProposal' does not match the value calculated for that 'Order' or 'OrderProposal' by the Booking System.",
  "statusCode": 400,
  "description": "totalPaymentDue price in the request (19.16) does not match expected value (18.16)"
}

Specs

✅ Unnecessary payment property at B >> P >> validation of P

Specs

Validations