Open nickevansuk opened 9 months ago
Surely we can just compare the payment
property against what we expect? Is there anything inherently wrong with a payment of zero? An example of this could be if you've pre-authenticated the original offer amount, but the user has a 100% discount. It's useful metadata for the booking system to have some information regarding that payment.
I think this part of the example might be slightly misleading:
"description": "Orders without prepayment must have zero price."
The price is handled spearately in the totalPaymentDue
field.
The payment
field, in an Order, represents an actual payment made by the customer, which is why it has data like Stripe payment details in it.
So if this field is included in a B request, it means that a payment is actually in the process of being extracted from the user (e.g. via Stripe). Therefore, it's useful for the Booking System to reject these requests to demonstrate to the client that this payment is being made erroneously and so should be cancelled rather than completed.
If
payment
is supplied for a free opportunity,UnnecessaryPaymentDetailsError
must be returned.An example
UnnecessaryPaymentDetailsError
is as follows (this is the entire response):Test result below: free-opportunities_opportunity-free-unnecessary-payment-error_OpenBookingSimpleFlow_IndividualFacilityUseSlot.md