# Walkthrough

## Create test booking with credit card

Sign up or login to your Channex Staging account staging.channex.io

Create a property, Room and rate plan

Create a "Open Channel" channel, map at least 1 room and rate and activate it

There may be some content you need to add to the channel to activate, please check readiness tab

Open the link in the channel once it is active and create booking. It should be created with test card inside.

## Channex auth

Use your API key to connect with Channex

## Get bookings from Channex through Vaultera PCI

To get bookings with card tokens for your account you need to take bookings from Channex via Vaultera PCI

For the Channex staging account you should tell Vaultera PCI to grab cards from [https://secure-staging.channex.io](https://secure-staging.channex.io/) domain. You cannot make direct calls to [secure-staging.channex.io](http://secure-staging.channex.io/) because in response there would be plain cards and to perform such action you need to be pci dss certified.

Instead you are making requests to [secure-staging.channex.io](http://secure-staging.channex.io/) through our PCI service which would take plain cards and tokenize them for your account.

```
curl -v -X POST -H "user-api-key: $CHANNEX_API_KEY" "https://pci.vaultera.co/api/v1/capture?api_key=$API_KEY&method=get&profile=channex&url=https%3A%2F%2Fsecure-staging.channex.io%2Fapi%2Fv1%2Fbooking_revisions%2Ffeed"
```

In response in bookings with cards there will be card tokens for your account. When you are looking to token please ensure that there is no "error" or "warning" field near token.

## Create one-off tokens for card show iframe

Create a card info session token

```
curl -v -X POST -H "Content-Type: application/json" -d '{"session_token":{"scope":"show_card"}}' "https://pci.vaultera.co/api/v1/session_tokens?api_key=$API_KEY"
```

Create a CVV session token

```
curl -v -X POST -H "Content-Type: application/json" -d '{"session_token":{"scope":"show_service_code"}}' "https://pci.vaultera.co/api/v1/session_tokens?api_key=$API_KEY"
```

## Embed card show iframe

On your frontend application place the code for the iframe, here is a test curl command to verify that you can receive iframe source

```
curl -v "https://pci.vaultera.co/api/v1/show_card?card_token=$CARD_TOKEN&session_token=$SESSION_TOKEN&service_code_token=$SERVICE_CODE_TOKEN"
```

If you follow this workflow step by step, in the end you should able to receive card show iframe. If some of steps are not clear or you have some concerns about steps, please let us know.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vaultera.co/walkthrough.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
