In response by data.attributes.token path there is an auth token, which will be used in requests to channex through Channex PCI
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.
1
curl -v -X POST -H "Authorization: Bearer $CHANNEX_TOKEN" "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"
Copied!
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
1
curl -v -X POST -H "Content-Type: application/json" -d '{"session_token":{"scope":"card"}}' "https://pci.channex.io/api/v1/session_tokens?api_key=$API_KEY"
Copied!
Create a CVV session token
1
curl -v -X POST -H "Content-Type: application/json" -d '{"session_token":{"scope":"service_code"}}' "https://pci.channex.io/api/v1/session_tokens?api_key=$API_KEY"
Copied!
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
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.