BokaMera.API.Host

<back to all web services

AddPaymentSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/payment/settingsAdd payment settingsAdd payment settings for the logged in company
AddPaymentSettings Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
EnabledbodyboolNoThe payson payment is enabled
InvoiceFeebodyintNoIf there should be any fee added when customer selected invoice payment method
AllowCreditCardPaymentbodyboolNoIf allow credit card payment
AllowInvoicePaymentbodyboolNoIf allow invoice payment
AllowBankPaymentbodyboolNoIf allow bank payment
RefundOnCancelBookingbodyboolNoAutomatically refund customer on canceled booking
DefaultAdminPaymentOptionsIdbodyint?NoThe default option when admin creates a new booking
PaymentProviderIdbodyintNoWhat payment provider to use
PaymentSettingsQueryResponse Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidNoThe company id
EnabledformboolNoThe payment is enabled
InvoiceFeeformintNoIf there should be any fee added when customer selected invoice payment method
AllowCreditCardPaymentformboolNoIf allow credit card payment
AllowInvoicePaymentformboolNoIf allow invoice payment
AllowBankPaymentformboolNoIf allow bank payment
RefundOnCancelBookingformboolNoAutomatically refund customer on canceled booking
DefaultPaymentOptionIdformint?NoThe default option when admin creates a new booking
PaymentProviderIdformintNoWhat payment provider to use
AdminPaymentOptionsquerybooleanNoIf you want to include the admin payment options to select from
PaymentProviderOptionsquerybooleanNoIf you want to include the payment provider options to select from
SendPaymentRequestDirectlyformboolNoSendPaymentRequestDirectly
AdminPaymentOptionsResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe payment options id
NameformstringNoThe payment options name
DescriptionformstringNoThe payment options description
PaymentProviderOptionsResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe payment provider id
NameformstringNoThe payment provider name
DescriptionformstringNoThe payment provider description

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

HTTP + JSON

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

POST /payment/settings HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Enabled":false,"InvoiceFee":0,"AllowCreditCardPayment":false,"AllowInvoicePayment":false,"AllowBankPayment":false,"RefundOnCancelBooking":false,"DefaultAdminPaymentOptionsId":0,"PaymentProviderId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Enabled":false,"InvoiceFee":0,"AllowCreditCardPayment":false,"AllowInvoicePayment":false,"AllowBankPayment":false,"RefundOnCancelBooking":false,"DefaultPaymentOptionId":0,"PaymentProviderId":0,"AdminPaymentOptions":[{"Id":0,"Name":"String","Description":"String"}],"PaymentProviderOptions":[{"Id":0,"Name":"String","Description":"String"}],"SendPaymentRequestDirectly":false}