[#701] How to implement payment after booking?

Migrated from Redmine #701 | Author: phuong tran
Status: Closed | Priority: High, I’m very impatient | Created: 2021-05-28


Hi. I had booking success with api booking but don’t know get link for direct user to payment gateway (etc paypal).

I used API https://user-api.simplybook.asia/
with request payload
{“jsonrpc”:“2.0”,“id”:1,“method”:“book”,“params”:[1,11,“2021-08-12”,“16:30:00”,{“name":“phuong”,“email”:"aptran17@gmail.com”,“phone”:“+6595558802”,“client_time_offset”:180,“require_confirm”:false},,“1”]}

Result:
{
“result”:{
“require_confirm”:true,
“bookings”:[
{
“id”:“7382”,
“event_id”:1,
“unit_id”:11,
“client_id”:“3632”,
“client_hash”:“a73fc2b62e38894356fa2dd137df4abd”,
“start_date_time”:“2021-08-12 16:30:00”,
“end_date_time”:“2021-08-12 17:30:00”,
“time_offset”:“180”,
“is_confirmed”:“1”,
“require_payment”:true,
“code”:“70b5p1xqi”,
“hash”:“6ecdfb15350f2747936c4a38a70c0d89”
}
],
“invoice”:null
},
“id”:“1”,
“jsonrpc”:“2.0”
}

Redmine Admin wrote:

There is no API for PayPal and other payment processers, you need to develop it yourself on own side if you need to accept payments

phuong tran wrote:

Redmine Admin wrote:

There is no API for PayPal and other payment processers, you need to develop it yourself on own side if you need to accept payments

Thanks your for you support.

I have another question is, had something wrong with my request payload right?
because my invoice is always null.

phuong tran wrote:

phuong tran wrote:

Redmine Admin wrote:

There is no API for PayPal and other payment processers, you need to develop it yourself on own side if you need to accept payments

Thanks your for you support.

I have another question is, had something wrong with my request payload right?
because my invoice is always null.

I had check the response API in my Maison21G | Scheduling and Booking Website return invoice id when i book a event. but when i call API Book it always return null.

Dmytro Bondarev wrote:

Please pass “handle_invoice”: true to $additional param.

{“jsonrpc”:“2.0”,“id”:1,“method”:“book”,“params”:[1,11,“2021-08-12”,“16:30:00”,{“name":“phuong”,“email”:"aptran17@gmail.com”,“phone”:“+6595558802”,“client_time_offset”:180},{“handle_invoice”: true},“1”]}

phuong tran wrote:

Thanks you. it work like a charm

phuong tran wrote:

Hi Dmitry Bondarev.
I had success create book, then call success payment progress now i want to confirm booking to change status not paid to paid.
I had call confirm invoice but it will had status is confirmed by myusername@gmail.com(this account I had login to call
https://user-api-v2.simplybook.me/admin/invoices/${this.props.match.params.idInvoice}) not client.

how can I confirm with confirmed by client?
thanks

Dmytro Bondarev wrote:

Unfortunately it is not possible.

phuong tran wrote:

So what method i can call set confirmed by client.
it confirmBooking right?

phuong tran wrote:

So what method i can call to set confirmed by client.
it confirmBooking right?

Dmytro Bondarev wrote:

Unfortunately it is not possible to confirm payment via client API.

The confirmBooking is different method for different purposes.

phuong tran wrote:

Sorry, so why this still have confirmed by client in booking info. Looks like I made a mistake. It’s not a paid confirmation, right? how can I set the status like that? or how can i confirm this booking is paid. thanks a lot for your support

phuong tran wrote:

phuong tran wrote:

Sorry, so why this still have confirmed by client in booking info. Looks like I made a mistake. It’s not a paid confirmation, right? how can I set the status like that? or how can i confirm this booking is paid. thanks a lot for your support

Hi Dmitry Bondarev, Please help me on this.

Dmytro Bondarev wrote:

Unfortunately i am not able to help you.
It is not possible.