| POST | /mobile/payments/getAvailablePaymentMethods | Validates the payment data and returns all available payment methods from integrated payment provider. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ServiceId | query | string | Yes | Service Id (GUID). |
| ProductData | body | Dictionary<Guid, Guid> | Yes | List of product Ids along with access template Ids |
| AddonIds | body | List<Guid> | No | List of selected addon Ids |
| TotalPrice | query | integer | Yes | Total price of the service. |
| SelectedOptions | body | SelectedOptionsDto | Yes | Selected options of the reservation/request service |
| ClientType | query | ClientType | Yes | Type of client initiating the payment methods request.Allowable Values
|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Timeslot | form | TimeslotDto | No | |
| Person | form | PersonOptionDto | No | |
| CurrencyCode | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| From | form | DateTime? | No | |
| To | form | DateTime? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| NumberOfAdults | form | int | No | |
| NumberOfChildren | form | int? | No |
| Name | Value |
|---|---|
| IOS | 1 |
| Android | 2 |
| Web | 3 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | PaymentMethodsView | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| PaymentMethods | form | string | No | |
| PaymentId | form | Guid | No | |
| Price | form | long | No | |
| Currency | form | CurrencyDto | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| Code | form | string | No | |
| Symbol | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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/csv
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"}}}