Walkthough

Here we will walk you through how to get a card from Channex using Channex PCI and then showing the card to the user with an Iframe.

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 Channex PCI

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

For the Channex staging account you should tell Channex PCI to grab cards from https://secure-staging.channex.io domain. You cannot make direct calls to 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 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.channex.io/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.channex.io/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.channex.io/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.channex.io/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.

Last updated