Viviot.Api

<back to all web services

PaymentMethodsRequest

Requires Authentication
The following routes are available for this service:
POST/mobile/payments/getAvailablePaymentMethodsValidates the payment data and returns all available payment methods from integrated payment provider.
PaymentMethodsRequest Parameters:
NameParameterData TypeRequiredDescription
ServiceIdquerystringYesService Id (GUID).
ProductDatabodyDictionary<Guid, Guid>YesList of product Ids along with access template Ids
AddonIdsbodyList<Guid>NoList of selected addon Ids
TotalPricequeryintegerYesTotal price of the service.
SelectedOptionsbodySelectedOptionsDtoYesSelected options of the reservation/request service
ClientTypequeryClientTypeYesType of client initiating the payment methods request.

Allowable Values

  • IOS
  • Android
  • Web
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintegerNoApi version
SelectedOptionsDto Parameters:
NameParameterData TypeRequiredDescription
TimeslotformTimeslotDtoNo
PersonformPersonOptionDtoNo
CurrencyCodeformstringNo
TimeslotDto Parameters:
NameParameterData TypeRequiredDescription
FromformDateTime?No
ToformDateTime?No
PersonOptionDto Parameters:
NameParameterData TypeRequiredDescription
NumberOfAdultsformintNo
NumberOfChildrenformint?No
ClientType Enum:
NameValue
IOS1
Android2
Web3
PaymentMethodsResponse Parameters:
NameParameterData TypeRequiredDescription
DataformPaymentMethodsViewNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
PaymentMethodsView Parameters:
NameParameterData TypeRequiredDescription
PaymentMethodsformstringNo
PaymentIdformGuidNo
PriceformlongNo
CurrencyformCurrencyDtoNo
CurrencyDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
CodeformstringNo
SymbolformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /mobile/payments/getAvailablePaymentMethods HTTP/1.1 
Host: api.4spaces.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	serviceId: 00000000000000000000000000000000,
	productData: 
	{
		00000000000000000000000000000000: 00000000000000000000000000000000
	},
	addonIds: 
	[
		00000000000000000000000000000000
	],
	totalPrice: 0,
	selectedOptions: 
	{
		timeslot: 
		{
			from: -62135596800000,
			to: -62135596800000
		},
		person: 
		{
			numberOfAdults: 0,
			numberOfChildren: 0
		},
		currencyCode: String
	},
	clientType: 1,
	version: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	{
		paymentMethods: String,
		paymentId: 00000000000000000000000000000000,
		price: 0,
		currency: 
		{
			id: 00000000000000000000000000000000,
			name: String,
			code: String,
			symbol: String
		}
	},
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}