Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment has write access while Booking Payment has not #277

Open
challet opened this issue Jan 26, 2018 · 3 comments
Open

Payment has write access while Booking Payment has not #277

challet opened this issue Jan 26, 2018 · 3 comments

Comments

@challet
Copy link

challet commented Jan 26, 2018

A Payment is being made outside BooskingSync, and as such I'd like to push it through the API for the booking status to be updated.

Following the documentation, I'm firstly using the Payment endpoint : http://developers.bookingsync.com/reference/endpoints/payments/

Then, in order to link it to a booking, I'm finding the Booking Payment endpoint has no write access, only read : http://developers.bookingsync.com/reference/endpoints/bookings_payments/

Can such payments be linked to a booking ?

@Azdaroth
Copy link
Member

hi @challet

BookingsPayment entity is actually an internal detail for linking payments with bookings if it happens that one payment is for multiple bookings.

The payments are always linked to the booking when creating a payment via API, to create the payment, you need to send POST request to: POST /bookings/:booking_id/payments, so the booking ID has to be specified in the URL.

@challet
Copy link
Author

challet commented Jan 29, 2018

hi @Azdaroth, thanks for the clarification. So if I understand well :

  • Payments with multiple bookings are not available to create via API
  • POSTing on /bookings/:booking_id/payments will create both a Payment and a BookingPayment, which then have each their own url /payments/:payment_id and /bookings_payments/:bookings_payment_id

@Azdaroth
Copy link
Member

@challet Exactly, true for both points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants