Stay organized with collections
Save and categorize content based on your preferences.
Booking failure can happen at the stage of (1) creating a Lease, or (2) creating
or updating a Booking.
//Statusdatathatconveyswhy(1)creatingaleaseor(2)creatingorupdating//abookingfails.//BookingFailureisintendedtoprimarilycapturebusinesslogicerrors.messageBookingFailure{enumCause{//Defaultvalue:Don't use; amounts to an "unknown error"CAUSE_UNSPECIFIED=0;//Thereferencedavailabilityslotisnotavailableanylonger.SLOT_UNAVAILABLE=1;//Theuserhasalreadybookedanappointmentforthereferenced//availabilityslot.SLOT_ALREADY_BOOKED_BY_USER=2;//Thelease(ifprovided)hasexpiredandcannotbeusedanylongerto//completetherequestedbooking.LEASE_EXPIRED=3;//Therequestedcancellationcannotbeperformedatthecurrenttimedue//totimerestrictionsinthemerchant's cancellation policy.OUTSIDE_CANCELLATION_WINDOW=4;//Anerrorwasencounteredwhileprocessingthepaymentbecausethe//providedcreditcardtypewasnotacceptedbythemerchant.Thecredit//cardtypemustbesuppliedinrejected_card_type.PAYMENT_ERROR_CARD_TYPE_REJECTED=5;//Anerrorwasencounteredwhileprocessingthepaymentbecausethe//providedcreditcardwasdeclined.PAYMENT_ERROR_CARD_DECLINED=6;//Anerrorwasencounteredwiththepack/membershipusedtopayforthe//booking.Therecouldbenovalidusesleft,itcouldhaveexpired,etc.PAYMENT_OPTION_NOT_VALID=7;//Anerrorwasencounteredwhileprocessingthepaymentforthisbooking.//Usethisvaluetoindicateageneralpaymentrelatederror,onlyifthe//errordoesnotmatchtoaspecificpaymenterrorabove.PAYMENT_ERROR=8;//Usercannotusethegivenpaymentoption(e.g.usertryingtousea//firsttimepriceforthesecondtime).USER_CANNOT_USE_PAYMENT_OPTION=9;//Abookingthattheusertriedtocancelhasalreadybeencancelled.BOOKING_ALREADY_CANCELLED=10;//Abookingthattheusertriedtocancelisnotcancellable.BOOKING_NOT_CANCELLABLE=11;//Userhasanexistingreservationtooclosetothistime.OVERLAPPING_RESERVATION=12;//Bookingfailedduetotheuserbeingovertheaggregator's per-user//bookingslimit.USER_OVER_BOOKING_LIMIT=13;//Offer(previously"Deal")isunavailablefortheprovidedslot.Ifthe//slotitselfisunavailable,useSLOT_UNAVAILABLEinstead.OFFER_UNAVAILABLE=16;DEAL_UNAVAILABLE=14[deprecated=true];//Setwhenpaymentisrejectedbecauseyouarerequestingthatthe//transactionbetriedagain,butthistimeafterundergoing3DS1//challenge/response.Notethatthecurrenttransaction's failure state//willstayfailed.Theretrywillbecompletelyseparate.////Whenthisisthefailurereason,payment_failure.3DS1_parameters//MUSTbeset.Ifitisnot,thenthecurrentcausewillbetreatedas//ifitwerePAYMENT_ERROR.PAYMENT_REQUIRES_3DS1=15;}//Thereasonwhythebookingfailed.(required)Causecause=1;//SetifcauseisPAYMENT_ERROR_CARD_TYPE_REJECTEDtoindicatethetypeof//creditcardthatwasrejected.enumCreditCardType{//Defaultvalue.Usedifcreditcardtypedoesnotmatchtoonebelow.CREDIT_CARD_TYPE_UNSPECIFIED=0;VISA=1;MASTERCARD=2;AMERICAN_EXPRESS=3;DISCOVER=4;JCB=5;}//(requiredonlyifcauseisPAYMENT_ERROR_CARD_TYPE_REJECTED)CreditCardTyperejected_card_type=2;//Thisoptionalfieldisusedforthepartnertoincludeadditional//informationfordebuggingpurposeonly.(optional)stringdescription=3;//Informationaboutpaymentfailures.messagePaymentFailureInformation{//ParametersrequestingthatRwGperforma3DS1challenge.////TheparametersaresetbyEMVCo's description of the 3DS1 protocol.//Seehttps://www.emvco.com/emv-technologies/3d-secure/messageThreeDS1Parameters{//TheURLfromwhichtoloadaformtopresenttotheUserfor//authentication(required).stringacs_url=1;//APaymentAuthenticationRequest.TobepostedtotheACSUrlformif//supplied.//(optional).stringpa_req=2;//AnidentifierusedbytheACSprovider.TobepostedtotheACSUrl//formifsupplied(optional).stringtransaction_id=3;//MerchantdatausedbytheACSprovider.TobepostedtotheACSUrl//forifsupplied(optional).stringmd_merchant_data=4;}//ParametersusedbyaRwGpartnertoinitiatea3DS1authentication//protocolwiththeuser.WillbeignoredunlessBookingFailure.cause//issettoPAYMENT_REQUIRES_3DS1.ThreeDS1Parametersthreeds1_parameters=5;}//Informationaboutpaymentfailures.PaymentFailureInformationpayment_failure=4;}
//Informationaboutpaymentfailures.messagePaymentFailureInformation{//ParametersrequestingthatRwGperforma3DS1challenge.////TheparametersaresetbyEMVCo's description of the 3DS1 protocol.//Seehttps://www.emvco.com/emv-technologies/3d-secure/messageThreeDS1Parameters{//TheURLfromwhichtoloadaformtopresenttotheUserfor//authentication(required).stringacs_url=1;//APaymentAuthenticationRequest.TobepostedtotheACSUrlformif//supplied.//(optional).stringpa_req=2;//AnidentifierusedbytheACSprovider.TobepostedtotheACSUrl//formifsupplied(optional).stringtransaction_id=3;//MerchantdatausedbytheACSprovider.TobepostedtotheACSUrl//forifsupplied(optional).stringmd_merchant_data=4;}//ParametersusedbyaRwGpartnertoinitiatea3DS1authentication//protocolwiththeuser.WillbeignoredunlessBookingFailure.cause//issettoPAYMENT_REQUIRES_3DS1.ThreeDS1Parametersthreeds1_parameters=5;}
//TheparametersaresetbyEMVCo's description of the 3DS1 protocol.//Seehttps://www.emvco.com/emv-technologies/3d-secure/messageThreeDS1Parameters{//TheURLfromwhichtoloadaformtopresenttotheUserfor//authentication(required).stringacs_url=1;//APaymentAuthenticationRequest.TobepostedtotheACSUrlformif//supplied.//(optional).stringpa_req=2;//AnidentifierusedbytheACSprovider.TobepostedtotheACSUrl//formifsupplied(optional).stringtransaction_id=3;//MerchantdatausedbytheACSprovider.TobepostedtotheACSUrl//forifsupplied(optional).stringmd_merchant_data=4;}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eBookingFailure\u003c/code\u003e is a message type that conveys reasons for booking or lease creation failures, primarily focusing on business logic errors.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecause\u003c/code\u003e field within \u003ccode\u003eBookingFailure\u003c/code\u003e indicates the specific reason for the failure, like slot unavailability, payment issues, or exceeding booking limits.\u003c/p\u003e\n"],["\u003cp\u003eWhen payment requires 3DS1 authentication, \u003ccode\u003eBookingFailure\u003c/code\u003e includes \u003ccode\u003eThreeDS1Parameters\u003c/code\u003e for the partner to initiate the authentication process.\u003c/p\u003e\n"],["\u003cp\u003eIf the failure cause is related to credit card rejection, \u003ccode\u003erejected_card_type\u003c/code\u003e specifies the card type.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBookingFailure\u003c/code\u003e can optionally include a \u003ccode\u003edescription\u003c/code\u003e field for debugging purposes, providing additional context about the failure.\u003c/p\u003e\n"]]],["Booking failures occur when creating a lease or during booking creation/update. Failures are categorized by a `Cause`, such as `SLOT_UNAVAILABLE`, `PAYMENT_ERROR`, or `LEASE_EXPIRED`. Payment failures can specify `rejected_card_type`. For 3DS1 authentication, `PAYMENT_REQUIRES_3DS1` is used, with details in `ThreeDS1Parameters`, including `acs_url`, `pa_req`, `transaction_id`, and `md_merchant_data`. Additionally, the partner can add a `description` for debugging.\n"],null,["# Booking failure specification\n\nBooking failure can happen at the stage of (1) creating a Lease, or (2) creating\nor updating a Booking. \n\n```gdscript\n// Status data that conveys why (1) creating a lease or (2) creating or updating\n// a booking fails.\n// BookingFailure is intended to primarily capture business logic errors.\nmessage BookingFailure {\n enum Cause {\n // Default value: Don't use; amounts to an \"unknown error\"\n CAUSE_UNSPECIFIED = 0;\n\n // The referenced availability slot is not available any longer.\n SLOT_UNAVAILABLE = 1;\n\n // The user has already booked an appointment for the referenced\n // availability slot.\n SLOT_ALREADY_BOOKED_BY_USER = 2;\n\n // The lease (if provided) has expired and cannot be used any longer to\n // complete the requested booking.\n LEASE_EXPIRED = 3;\n\n // The requested cancellation cannot be performed at the current time due\n // to time restrictions in the merchant's cancellation policy.\n OUTSIDE_CANCELLATION_WINDOW = 4;\n\n // An error was encountered while processing the payment because the\n // provided credit card type was not accepted by the merchant. The credit\n // card type must be supplied in rejected_card_type.\n PAYMENT_ERROR_CARD_TYPE_REJECTED = 5;\n\n // An error was encountered while processing the payment because the\n // provided credit card was declined.\n PAYMENT_ERROR_CARD_DECLINED = 6;\n\n // An error was encountered with the pack/membership used to pay for the\n // booking. There could be no valid uses left, it could have expired, etc.\n PAYMENT_OPTION_NOT_VALID = 7;\n\n // An error was encountered while processing the payment for this booking.\n // Use this value to indicate a general payment related error, only if the\n // error does not match to a specific payment error above.\n PAYMENT_ERROR = 8;\n\n // User cannot use the given payment option (e.g. user trying to use a\n // first time price for the second time).\n USER_CANNOT_USE_PAYMENT_OPTION = 9;\n\n // A booking that the user tried to cancel has already been cancelled.\n BOOKING_ALREADY_CANCELLED = 10;\n\n // A booking that the user tried to cancel is not cancellable.\n BOOKING_NOT_CANCELLABLE = 11;\n\n // User has an existing reservation too close to this time.\n OVERLAPPING_RESERVATION = 12;\n\n // Booking failed due to the user being over the aggregator's per-user\n // bookings limit.\n USER_OVER_BOOKING_LIMIT = 13;\n\n // Offer (previously \"Deal\") is unavailable for the provided slot. If the\n // slot itself is unavailable, use SLOT_UNAVAILABLE instead.\n OFFER_UNAVAILABLE = 16;\n DEAL_UNAVAILABLE = 14 [deprecated = true];\n\n // Set when payment is rejected because you are requesting that the\n // transaction be tried again, but this time after undergoing 3DS1\n // challenge/response. Note that the current transaction's failure state\n // will stay failed. The retry will be completely separate.\n //\n // When this is the failure reason, payment_failure.3DS1_parameters\n // MUST be set. If it is not, then the current cause will be treated as\n // if it were PAYMENT_ERROR.\n PAYMENT_REQUIRES_3DS1 = 15;\n }\n\n // The reason why the booking failed. (required)\n Cause cause = 1;\n\n // Set if cause is PAYMENT_ERROR_CARD_TYPE_REJECTED to indicate the type of\n // credit card that was rejected.\n enum CreditCardType {\n // Default value. Used if credit card type does not match to one below.\n CREDIT_CARD_TYPE_UNSPECIFIED = 0;\n VISA = 1;\n MASTERCARD = 2;\n AMERICAN_EXPRESS = 3;\n DISCOVER = 4;\n JCB = 5;\n }\n\n // (required only if cause is PAYMENT_ERROR_CARD_TYPE_REJECTED)\n CreditCardType rejected_card_type = 2;\n\n // This optional field is used for the partner to include additional\n // information for debugging purpose only. (optional)\n string description = 3;\n\n // Information about payment failures.\n message PaymentFailureInformation {\n // Parameters requesting that RwG perform a 3DS1 challenge.\n //\n // The parameters are set by EMVCo's description of the 3DS1 protocol.\n // See https://www.emvco.com/emv-technologies/3d-secure/\n message ThreeDS1Parameters {\n // The URL from which to load a form to present to the User for\n // authentication (required).\n string acs_url = 1;\n\n // A PaymentAuthentication Request. To be posted to the ACSUrl form if\n // supplied.\n // (optional).\n string pa_req = 2;\n\n // An identifier used by the ACS provider. To be posted to the ACSUrl\n // form if supplied (optional).\n string transaction_id = 3;\n\n // Merchant data used by the ACS provider. To be posted to the ACSUrl\n // for if supplied (optional).\n string md_merchant_data = 4;\n }\n\n\n // Parameters used by a RwG partner to initiate a 3DS1 authentication\n // protocol with the user. Will be ignored unless BookingFailure.cause\n // is set to PAYMENT_REQUIRES_3DS1.\n ThreeDS1Parameters threeds1_parameters = 5;\n }\n\n\n // Information about payment failures.\n PaymentFailureInformation payment_failure = 4;\n}\n``` \n\n```gdscript\n // Information about payment failures.\n message PaymentFailureInformation {\n // Parameters requesting that RwG perform a 3DS1 challenge.\n //\n // The parameters are set by EMVCo's description of the 3DS1 protocol.\n // See https://www.emvco.com/emv-technologies/3d-secure/\n message ThreeDS1Parameters {\n // The URL from which to load a form to present to the User for\n // authentication (required).\n string acs_url = 1;\n\n // A PaymentAuthentication Request. To be posted to the ACSUrl form if\n // supplied.\n // (optional).\n string pa_req = 2;\n\n // An identifier used by the ACS provider. To be posted to the ACSUrl\n // form if supplied (optional).\n string transaction_id = 3;\n\n // Merchant data used by the ACS provider. To be posted to the ACSUrl\n // for if supplied (optional).\n string md_merchant_data = 4;\n }\n\n\n // Parameters used by a RwG partner to initiate a 3DS1 authentication\n // protocol with the user. Will be ignored unless BookingFailure.cause\n // is set to PAYMENT_REQUIRES_3DS1.\n ThreeDS1Parameters threeds1_parameters = 5;\n }\n``` \n\n```gdscript\n // The parameters are set by EMVCo's description of the 3DS1 protocol.\n // See https://www.emvco.com/emv-technologies/3d-secure/\n message ThreeDS1Parameters {\n // The URL from which to load a form to present to the User for\n // authentication (required).\n string acs_url = 1;\n\n // A PaymentAuthentication Request. To be posted to the ACSUrl form if\n // supplied.\n // (optional).\n string pa_req = 2;\n\n // An identifier used by the ACS provider. To be posted to the ACSUrl\n // form if supplied (optional).\n string transaction_id = 3;\n\n // Merchant data used by the ACS provider. To be posted to the ACSUrl\n // for if supplied (optional).\n string md_merchant_data = 4;\n }\n```"]]