How to use payment provider via API?

Hey guys,

i'm doing right now a custom website for one of my clients. the website is connected to checkfront via API. but i'm stuck right now in the booking process right before the payment and need a hint on how to continue.

i'm using the booking/create with the previous created booking session and getting a succesful response but i don't see any information in the JSON that leads me to the payment process.

is it maybe possible to use the given url under RESPONSE.request.data.url as an iframe for the user, so that he can pay the booking ?

or do i have to use the booking/[booking_id]/checkin /checkout endpoints?

or is it maybe necessary to implement the ui for the payment provider (stripe, paypal) on my own? will checkfront find these transactions on its own and synchronize or has this to be set manually via the API? 

Comments

  • Hi finn,

    Thank you for the question!

    If you want to send the customer to the Checkfront receipt page, then there are two options I can think of:

    1. Create the booking as a 'customer'. When acting as a customer and creating the booking, the API response will contain the 'customer_payment_url'. Acting as a customer means that the booking will initially be put into the 'pre-booking' status, which expires after 15/30-minutes. If the customer does not complete payment in this time, the pre-booking expires and the customer would need to restart their booking.

    You can find more information on acting as a customer here:
    http://api.checkfront.com/overview/requests.html#request-formatting

    2. Generate the payment URL yourself. If you make the booking acting as a staff account, the payment URL will not be in the API response. However, you will have all of the information you need to create. The URL takes this format:
    https://your-company.checkfront.com/reserve/booking/{booking_id}?CFX={token}&view=pay

    I hope this helps. If you have more questions about making your own custom integration with a payment gateway, could you please reach out to us at support@checkfront.com? I will be happy to go over the requirements to do so, and how it can work.

    All the best,

    Chase
    Technical Support Analyst
    Checkfront | www.checkfront.com/contact | Email: support@checkfront.com
Sign In or Register to comment.