How to use checkout page correctly in iframe for gift certs?


i'm implementing the checkout process right now. The booking is created via API which gives me the CFX and the booking_id which i then use to show the final checkout page in an iframe. Depending on the payment method the user decided to use i'm showing different parts of the checkout page. If he chooses the gift cert option i'm showing this part right now: 

When the user then inserts his gift cert code and clicks on submit ('Anwenden' on this screenshot), the iframe is not redirecting to another page. The response is a json object which appears on the screen:

The url i'm using right now for the iframe has the following format: 

As you can see the query parameter action is empty but i've seen this kind of url when i tried the checkout page in the browser. Maybe i can add a value there to not get JSON as a response but HTML?

Or is it possible to pay the booking with a gift cert via the API? I tried to make the same request as the submit button manually but since this is happening on the outside of the iframe the host is different and i'm getting CORS related errors. And it's not in the official API so i'm assuming it's bad practice too.

Any advice or recommendation?

Thanks in advance


Sign In or Register to comment.