BokaMera.API.Host

<back to all web services

UpdatePaymentSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/payment/settings/Update payment settingsUpdate payment settings for the logged in company
UpdatePaymentSettings Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
Enabledbodybool?NoThe payment is enabled
InvoiceFeebodyint?NoIf there should be any fee added when customer selected invoice payment method
AllowCreditCardPaymentbodybool?NoIf allow credit card payment
AllowInvoicePaymentbodybool?NoIf allow invoice payment
AllowBankPaymentbodybool?NoIf allow bank payment
RefundOnCancelBookingbodybool?NoAutomatically refund customer on canceled booking
DefaultPaymentOptionIdbodyint?NoThe default option when admin creates a new booking
PaymentProviderIdbodyint?NoWhat 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 .xml suffix or ?format=xml

HTTP + XML

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

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

<UpdatePaymentSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AllowBankPayment>false</AllowBankPayment>
  <AllowCreditCardPayment>false</AllowCreditCardPayment>
  <AllowInvoicePayment>false</AllowInvoicePayment>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DefaultPaymentOptionId>0</DefaultPaymentOptionId>
  <Enabled>false</Enabled>
  <InvoiceFee>0</InvoiceFee>
  <PaymentProviderId>0</PaymentProviderId>
  <RefundOnCancelBooking>false</RefundOnCancelBooking>
</UpdatePaymentSettings>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PaymentSettingsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AdminPaymentOptions>
    <AdminPaymentOptionsResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </AdminPaymentOptionsResponse>
  </AdminPaymentOptions>
  <AllowBankPayment>false</AllowBankPayment>
  <AllowCreditCardPayment>false</AllowCreditCardPayment>
  <AllowInvoicePayment>false</AllowInvoicePayment>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DefaultPaymentOptionId>0</DefaultPaymentOptionId>
  <Enabled>false</Enabled>
  <InvoiceFee>0</InvoiceFee>
  <PaymentProviderId>0</PaymentProviderId>
  <PaymentProviderOptions>
    <PaymentProviderOptionsResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </PaymentProviderOptionsResponse>
  </PaymentProviderOptions>
  <RefundOnCancelBooking>false</RefundOnCancelBooking>
  <SendPaymentRequestDirectly>false</SendPaymentRequestDirectly>
</PaymentSettingsQueryResponse>