POST | /checkout/payment | Confirm a booking in HAPI after payment. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | body | GUID | Yes | The WRAPI GUID |
Success | body | bool | Yes | The success result from Computop |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Contents | form | Order | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | string | No | |
Number | form | string | No | |
Currency | form | string | No | |
Language | form | string | No | |
Status | form | string | No | |
ProcessingStatus | form | string | No | |
CustomerId | form | string | No | |
Product | form | Product | No | |
Travellers | form | Traveller[] | No | |
Attributes | form | Attribute[] | No | |
Price | form | Price | No | |
PaymentCondition | form | PaymentCondition | No | |
Customer | form | Customer | No | |
Payment | form | Payment | No | |
CardFullId | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | string | No | |
Reference | form | string | No | |
Number | form | string | No | |
Status | form | string | No | |
BookOptions | form | BookOptions | No | |
Provider | form | Provider | No | |
Travellers | form | List<TravellerSummary> | No | |
Services | form | List<Service> | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Book | form | Book | No | |
Option | form | Option | No | |
Quote | form | Quote | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Allowed | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Allowed | form | bool | No | |
SetTo | form | string | No | |
Validity | form | Validity | No | |
ExtendValidity | form | ExtendValidity | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Date | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Allowed | form | bool | No | |
Date | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Allowed | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Source | form | ProviderType | No | |
Code | form | string | No | |
Catalogue | form | string | No | |
Brand | form | string | No | |
Program | form | string | No | |
Currency | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | string | No | |
Reference | form | int | No | |
Price | form | Price | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Amount | form | decimal | No | |
Currency | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | string | No | |
ParentId | form | string | No | |
Reference | form | string | No | |
Status | form | string | No | |
Travellers | form | List<TravellerSummary> | No | |
Destination | form | Destination | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Location | form | Location | No | |
Country | form | DestinationCountry | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Code | form | string | No | |
Description | form | Long | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Text | form | string[] | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Code | form | string | No | |
Description | form | Long | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Salutation | form | string | No | |
Title | form | string | No | |
WrapiTitle | form | string | No | |
Gender | form | string | No | |
FirstName | form | string | No | |
LastName | form | string | No | |
DateOfBirth | form | string | No | |
TravellerType | form | TravellerType | No | |
CalculatedAge | form | int | No | |
Allocated | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AttributeId | form | string | No | |
AttributeRef | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Sell | form | Sell | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Amount | form | decimal | No | |
Currency | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
OpenAmount | form | ConditionSell | No | |
Immediately | form | Immediately | No | |
Conditions | form | List<Condition> | No | |
AllowedPaymentMethods | form | AllowedPaymentMethods | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
NullableAmount | form | string | No | |
Amount | form | decimal | No | |
Currency | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PaymentAmount | form | ConditionSell | No | |
Percent | form | decimal | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
DueDate | form | DateTime | No | |
PaymentAmount | form | ConditionSell | No | |
Percent | form | decimal | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PaymentMethods | form | PaymentMethod[] | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CreditCard | form | CreditCard | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CardBrand | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | string | No | |
Number | form | string | No | |
Salutation | form | string | No | |
Title | form | string | No | |
WrapiTitle | form | string | No | |
Gender | form | string | No | |
FirstName | form | string | No | |
LastName | form | string | No | |
DateOfBirth | form | string | No | |
Language | form | string | No | |
Address | form | Address | No | |
Phone | form | Phone | No | |
EmergencyContact | form | Phone | No | |
form | No | |||
Insurance | form | bool | No | |
Advertising | form | List<AdvertisingOption> | No | |
Comments | form | string | No | |
AdditionalInformation | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Type | form | string | No | |
AddressId | form | string | No | |
AddressLine1 | form | string | No | |
AddressLine2 | form | string | No | |
PostCode | form | string | No | |
City | form | string | No | |
Country | form | Country | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Code | form | string | No | |
Description | form | Long | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Country | form | string | No | |
Number | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Address | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Type | form | string | No | |
OptOut | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Amount | form | PaymentAmount | No | |
Date | form | DateTime | No | |
Detail | form | PaymentDetail | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Amount | form | decimal? | No | |
currency | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CreditCard | form | PaymentDetailCreditCard | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CardBrand | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /checkout/payment HTTP/1.1
Host: wrapi-api.dev.hotelplan.co.uk
Accept: application/json
Content-Type: application/json
Content-Length: length
{"success":false}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"contents":{"id":"String","number":"String","currency":"String","language":"String","status":"String","processingStatus":"String","customerId":"String","product":{"id":"String","reference":"String","number":"String","status":"String","bookOptions":{"book":{"allowed":false},"option":{"allowed":false,"setTo":"String","validity":{"date":"String"},"extendValidity":{"allowed":false,"date":"String"}},"quote":{"allowed":false}},"provider":{"source":"Hub","code":"String","catalogue":"String","brand":"String","program":"String","currency":"String"},"travellers":[{"id":"String","reference":0,"price":{"amount":0,"currency":"String"}}],"services":[{"id":"String","parentId":"String","reference":"String","status":"String","travellers":[{"id":"String","reference":0,"price":{"amount":0,"currency":"String"}}],"destination":{"location":{"code":"String","description":{"text":["String"]}},"country":{"code":"String","description":{"text":["String"]}}}}]},"travellers":[{"salutation":"String","title":"String","wrapiTitle":"String","gender":"String","firstName":"String","lastName":"String","dateOfBirth":"String","travellerType":"Infant","calculatedAge":0,"id":"String","reference":0,"price":{"amount":0,"currency":"String"}}],"attributes":[{"attributeId":"String","attributeRef":"String"}],"price":{"sell":{"amount":0,"currency":"String"}},"paymentCondition":{"openAmount":{"nullableAmount":"String","amount":0,"currency":"String"},"immediately":{"paymentAmount":{"nullableAmount":"String","amount":0,"currency":"String"},"percent":0},"conditions":[{"dueDate":"0001-01-01T00:00:00.0000000","paymentAmount":{"nullableAmount":"String","amount":0,"currency":"String"},"percent":0}],"allowedPaymentMethods":{"paymentMethods":[{"creditCard":{"cardBrand":"String"}}]}},"customer":{"id":"String","number":"String","salutation":"String","title":"String","wrapiTitle":"String","gender":"String","firstName":"String","lastName":"String","dateOfBirth":"String","language":"String","address":{"type":"String","addressId":"String","addressLine1":"String","addressLine2":"String","postCode":"String","city":"String","country":{"code":"String","description":{"text":["String"]}}},"phone":{"country":"String","number":"String"},"emergencyContact":{"country":"String","number":"String"},"email":{"address":"String"},"insurance":false,"advertising":[{"type":"String","optOut":false}],"comments":"String","additionalInformation":"String"},"payment":{"amount":{"amount":0,"currency":"String"},"date":"0001-01-01T00:00:00.0000000","detail":{"creditCard":{"cardBrand":"String"}}},"cardFullId":"String"}}