...
Retrieve plaintext credit card data
Scopes | api.profilesondemand.read api.profilesondemand.ccaccess |
---|---|
Endpoints | {midoco_proxy_url}/traveller/<uuid>/creditcard/{ccUuid} {midoco_proxy_url}/company/<uuid>/creditcard/{ccUuid} |
Request method | GET |
Fetch plaintext credit card data from a company or traveler profile.
Parameters
Name | Description | Validation |
---|---|---|
uuid | Owning (company / traveler) profile UUID | Required parameter |
ccUuid | Specific credit card UUID as obtained from the CREDIT_CARDS section of the profile. See: Company profile sections overview, Traveler profile sections overview | Required parameter |
Code Block | ||||
---|---|---|---|---|
| ||||
curl -v TODO-H "Authorization: Bearer <token>" \ {midoco_proxy_url}/traveller/ceb545fd-5000-4f44-93dd-47a272f6f25a/creditcard/eff37a66-4217-4762-a3be-2a9177fba9fc |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "uuid": "bd380903-2e49-4920-9823-45626357c367", "type": "VI", "maskedNumber": "4444XXXXXXXX1111", "number": "4444333322221111", "expiration": "12/25", "publishAsFop": false } |
Store credit card number
Scopes | api.profilesondemand.write api.profilesondemand.ccaccess |
---|---|
Endpoints | {midoco_proxy_url}/creditcard/store |
Request method | POST |
Send a new or updated credit card number and retrieve a transaction number to be used for company or traveller profile update via separate API call.
Code Block | ||||
---|---|---|---|---|
| ||||
curl -v -X POST \ TODO -H "Authorization: Bearer <token>" \ --data '{ "type": "VI", "number": "444433$SOkp71111" }' {midoco_proxy_url}/creditcard/store |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "transactionId": "ccTok-75cb0e1c-6640-4622-82bd-fed07fd1ca59", "validUntil": "10.09.2021T13:37:69Z" } |
Example: Add previously stored credit card number to traveler profile
After sending a credit card number to Faces and receiving a transactionId in return, the transactionId may be used exactly once (up until the time indicated by the "validUntil" field) in a request to add or update a credit card on a company or traveler profile.
Code Block | ||||
---|---|---|---|---|
| ||||
curl -v -X PATCH \
-H "Authorization: Bearer <token>" \
--data '{
"data": {
"creditCardInfo": {
"creditCards": [{
"updatedNumberReference": "ccTok-75cb0e1c-6640-4622-82bd-fed07fd1ca59",
"expiration": "12/25",
"publishAsFop": true
}],
"webCard": {
"@type": "own-card",
"uuid": "6e6259b9-4fa9-41c7-8a7b-f5d68df8f38b"
},
"hotelGuarantee": {
"@type": "own-card",
"uuid": "ccTok-75cb0e1c-6640-4622-82bd-fed07fd1ca59"
},
"carGuarantee": {
"@type": "company-card"
}
}
}
}' https://hurricane.umbrellanet.ch/uf-test/api/v1/profiles/traveller/ceb545fd-5000-4f44-93dd-47a272f6f25a |