|
| 1 | +--- |
| 2 | +title: Detokenizer v5 |
| 3 | +layout: reference |
| 4 | +--- |
| 5 | + |
| 6 | +{% include prerelease.html %} |
| 7 | + |
| 8 | +# Detokenizer v5 |
| 9 | + |
| 10 | +The Detokenizer service allows clients to retrieve the user's credit card number from Concur Expense in a secure way. The Detokenizer service returns the user's credit card number encrypted with a symmetric key that the client provides in the request. The client will be able to decrypt the user's credit card number using their symmetric key. V5 version of detokenizer service is FIPS compliant so that customers with IBCP card programs, can benefit with credit card detokenizer functionality in CCPS environment. The Detokenizer API ensures secure transmission of sensitive data (card number) to customers as part of the remittance file creation process running at caller applications like ICS and CWS, in which the full, unmasked credit card number is required for the correct application of payments. |
| 11 | + |
| 12 | +## <a name="authentication"></a>Authentication |
| 13 | + Authentication is done via company JWT with required scope creditcardaccount.read. The company JWT refers to the token belonging to the company whose data is being accessed. </br></br> If a company is accessing data on behalf of another company, then the calling company should invoke the detokenizer API using the JWT of the company that owns the card data. <br><br> Ex: If a company XYZ wants to call detokenizer api on behalf of another company ABC, then the company XYZ should access the api using ABC's company jwt. |
| 14 | + |
| 15 | +## <a name="overview"></a>Overview |
| 16 | + |
| 17 | +The detokenizer v5 API exposes the following resources and these have to be called sequentially: |
| 18 | + |
| 19 | +Resource|Description |
| 20 | +---|--- |
| 21 | +RSAPublicKey|Retrieve RSA public Key via publickey API. |
| 22 | +Credit Card Account Details|Retrieve credit card number via Detokenizer API. |
| 23 | + |
| 24 | +## <a name="limitations"></a>Limitations |
| 25 | + |
| 26 | +This API is only for public use to support various SAP integration features or to the SAP Concur customer that has established corporate credit card accounts involved in the data (the “Customer Corporate Card Holder”). Such use must be in compliance with regulations and other industry standards, including but not limited to Payment Card Industry Data Security Standards (PCI DSS). Access to this documentation does not provide access to the API.</br></br> |
| 27 | +These APIs are available only in CCPS environment currently. Later, it will be available for other commercial environments also. |
| 28 | +## <a name="process-flow"></a>Process Flow |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## <a name="products-editions"></a>Products and Editions |
| 34 | + |
| 35 | +* Concur Expense Professional Edition |
| 36 | +* Concur Expense Standard Edition |
| 37 | + |
| 38 | + |
| 39 | +## Scope Usage <a name="scope-usage"></a> |
| 40 | + |
| 41 | +Name|Description|Endpoint |
| 42 | +---|---|--- |
| 43 | +`creditcardaccount.read`|Reads credit card data from Concur Expense.|POST |
| 44 | + |
| 45 | +## Dependencies <a name="dependencies"></a> |
| 46 | + |
| 47 | +SAP Concur clients must purchase Concur Expense in order to use this API. |
| 48 | + |
| 49 | +## Access Token Usage <a name="access-token-usage"></a> |
| 50 | + |
| 51 | +This API supports company level access tokens. A Company access token (JWT) is required for these endpoints like mentioned in [Authentication](#authentication). |
| 52 | + |
| 53 | + |
| 54 | +## <a name="RSAPublicKeyDetail-get"></a>Get RSA Public Key Detail |
| 55 | + |
| 56 | +Endpoint to retrieve RSA public Key. Returns RSA Public key for caller to consume the other V5 api i.e. Get Credit Card Account Details. This key would be used by caller to wrap their own symmetric key which would be passed to Get Credit Card Account Details api. |
| 57 | + |
| 58 | +### Scopes |
| 59 | + |
| 60 | +`creditcardaccount.read` - Refer to [Scope Usage](#scope-usage) for full details. |
| 61 | + |
| 62 | +### Request |
| 63 | + |
| 64 | +```shell |
| 65 | +GET https://{region}.api.concursolutions.com/detokenizer/v5/publickey |
| 66 | +``` |
| 67 | + |
| 68 | +#### Parameters |
| 69 | + |
| 70 | +* None |
| 71 | + |
| 72 | +#### Headers |
| 73 | + |
| 74 | +* [RFC 7235 Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) : Header used for authorization. Should be specified in the format 'Bearer JWT_Token'. This is a Company JWT token. |
| 75 | +* `concur-correlationid` is a specific custom header used for technical support in the form of a [RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace](https://tools.ietf.org/html/rfc4122) |
| 76 | + |
| 77 | +#### Payload |
| 78 | + |
| 79 | +* None. |
| 80 | + |
| 81 | +### Response |
| 82 | + |
| 83 | +#### <a name="http-status-codes"></a>Status Codes |
| 84 | + |
| 85 | +In case of success, HTTP status code `200 (OK) - RSA Public Key` is returned. |
| 86 | + |
| 87 | +* [401 Unauthorized](https://datatracker.ietf.org/doc/html/rfc7235#section-3.1) |
| 88 | +* [403 Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) |
| 89 | +* [500 Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) |
| 90 | + |
| 91 | +#### Headers |
| 92 | + |
| 93 | +* [RFC 7231 Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) |
| 94 | +* [RFC 7230 Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) |
| 95 | + |
| 96 | +#### Payload |
| 97 | + |
| 98 | +* [RSA Public Key Response](#rsa-public-key-response) |
| 99 | + |
| 100 | +### Example |
| 101 | + |
| 102 | +#### Request |
| 103 | + |
| 104 | +```shell |
| 105 | +GET https://usg.api.concursolutions.com/detokenizer/v5/publickey |
| 106 | +concur-correlationid: 87de8598-dbd5-4aea-af9d-988efb61c468 |
| 107 | +Authorization: Bearer JWT_TOKEN |
| 108 | +Accept: application/json |
| 109 | +``` |
| 110 | + |
| 111 | +#### Success Response |
| 112 | + |
| 113 | +```shell |
| 114 | +HTTP/1.1 200 OK |
| 115 | +concur-correlationid: 87de8598-dbd5-4aea-af9d-988efb61c468 |
| 116 | +Content-Type: application/json |
| 117 | +Content-Length: 1270 |
| 118 | +``` |
| 119 | + |
| 120 | +```json |
| 121 | +{ |
| 122 | + "pubKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuPXJGJKBYiqRsPUrrxs7726KUQa+xiyaZ38CfvgPCUo6KV4WQRSAdudoY7Ut1VKA7tqjcFAV/OWVdqKYG32I4oyfGYGfacCXSSF+HQY6D8WrZg87mtNiZq0SrzQNESfd80ZpbKMEKSN23q7Pjub35YKfHWLn6JZXo+Y+YXW040ghCqNULFvG0EyY6WPalYCfQqV9231kJkyu5L0RLzjfqOLCfu4m+YHgo3FAEhFUrhYTDLMm7nnoGwQQA5Mf+Hcd84FMKIow0t7iv8fPox5uZS7o/RTCZfbGpCkyka5pF0NnkGXvLI5J8JCobO/IAm9DoElSClJznHZwZOtHcQb/gwIDAQAB", |
| 123 | + "version": 5 |
| 124 | +} |
| 125 | +``` |
| 126 | + |
| 127 | +#### Error Response |
| 128 | +```shell |
| 129 | +401 Unauthorized |
| 130 | +Content-Type: application/json |
| 131 | +``` |
| 132 | + |
| 133 | +```json |
| 134 | +{ |
| 135 | + "timestamp": "2025-05-12T13:24:18.149+00:00", |
| 136 | + "httpStatus": "401 - Unauthorized", |
| 137 | + "errorMessage": "", |
| 138 | + "errorId": "UNAUTHORIZED", |
| 139 | + "path": "/detokenizer/v5/publickey" |
| 140 | +} |
| 141 | +``` |
| 142 | + |
| 143 | +## Get Credit Card Account Details <a name="get-credit-card-account-details"></a> |
| 144 | + |
| 145 | +Returns the credit card number associated with the credit card token by adhering to FIPS standards, with the credit card number encrypted with caller's symmetric key. Caller has to decrypt this Encrypted Credit Card Number using their symmetric key. |
| 146 | + |
| 147 | +### Prerequisite |
| 148 | + |
| 149 | +* Publickey endpoint needs to be called and symmetricKey needs to be wrapped using same before making request to this api. |
| 150 | + |
| 151 | + |
| 152 | +### Scopes |
| 153 | + |
| 154 | +`creditcardaccount.read` - Refer to [Scope Usage](#scope-usage) for full details. |
| 155 | + |
| 156 | +### Request |
| 157 | + |
| 158 | +```shell |
| 159 | +POST https://{region}.api.concursolutions.com/detokenizer/v5/creditcards/{creditCardGuid} |
| 160 | +``` |
| 161 | + |
| 162 | +#### Parameters |
| 163 | + |
| 164 | +Name|Type|Format|Description |
| 165 | +---|---|---|--- |
| 166 | +`creditCardGuid`|`string`|-|Credit card GUID - Its a token which represent credit card number in concur expense. |
| 167 | + |
| 168 | +#### Headers |
| 169 | + |
| 170 | +* [RFC 7235 Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) : Header used for authorization. Should be specified in the format 'Bearer JWT_Token'. This is a Company JWT token. |
| 171 | +* `concur-correlationid` is a specific custom header used for technical support in the form of a [RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace](https://tools.ietf.org/html/rfc4122) |
| 172 | +* [RFC 7231 Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) |
| 173 | + |
| 174 | +#### Payload |
| 175 | + |
| 176 | +* [Credit Card Detokenizer Request](#credit-card-detokenizer-request) |
| 177 | + |
| 178 | +### Response |
| 179 | + |
| 180 | +#### <a name="http-status-codes"></a>Status Codes |
| 181 | + |
| 182 | +In case of success, HTTP status code `200 (OK) - Encrypted Credit Card Data` is returned. |
| 183 | + |
| 184 | +* [400 Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) |
| 185 | +* [401 Unauthorized](https://datatracker.ietf.org/doc/html/rfc7235#section-3.1) |
| 186 | +* [403 Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) |
| 187 | +* [404 Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) |
| 188 | +* [500 Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) |
| 189 | + |
| 190 | +#### Headers |
| 191 | + |
| 192 | +* [RFC 7231 Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) |
| 193 | +* [RFC 7230 Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) |
| 194 | + |
| 195 | +#### Payload |
| 196 | +* [Credit Card Number Response](#credit-card-number-response) |
| 197 | + |
| 198 | +### Example |
| 199 | + |
| 200 | +#### Request |
| 201 | + |
| 202 | +```shell |
| 203 | +POST https://usg.api.concursolutions.com/detokenizer/v5/creditcards/9D118EDC278B844DB7814072110AC4D9 |
| 204 | +concur-correlationid: 87de8598-dbd5-4aea-af9d-988efb61c468 |
| 205 | +Authorization: Bearer JWT_TOKEN |
| 206 | +Accept: application/json |
| 207 | +Content-Type: application/json |
| 208 | +``` |
| 209 | + |
| 210 | +```json |
| 211 | +{ |
| 212 | + "symmetricKey": "R7zgrcT6rpJjtGPXIBSODGDblzPnhQgQ+CKCcwyn7rE8j7FImmNhtETqihB0WQhm1+6v70tKzJsaAMLeucVBEEDcz2sOXgED9WmG6BzhiKgiIJgGcSRTR0QZvdY5LgyI67mhLUT87xsGtUv2ZNkKTR9xkWn3cPrD3tB4bDE296gIRXDLpSadcQAK8gNUfLsuv5c3dfRUdc+B4QdWw8E+hxXR682DIfnpJFSWwoGp9uIao7nJeunXuvkvKfGz0SU1DDu8T4FVlpHJpwuf4a/Kgi+rI/JY0UBOYaW7B5Ne+F7ohcu3Np7SOr2FsSzTAX1X4GH63EstBPtPQr1sTd2yYA==", |
| 213 | + "keyVersion": 5 |
| 214 | +} |
| 215 | +``` |
| 216 | + |
| 217 | +#### Response |
| 218 | + |
| 219 | +```shell |
| 220 | +HTTP/1.1 200 OK |
| 221 | +concur-correlationid: 87de8598-dbd5-4aea-af9d-988efb61c468 |
| 222 | +Content-Type: application/json |
| 223 | +Content-Length: 1270 |
| 224 | +``` |
| 225 | + |
| 226 | +```json |
| 227 | +{ |
| 228 | + "accountNumber": "dPp0l3xtLvucH+md:EUjJp2eIWgIpjdHjTg0EhJjawdEek5M8gSrJBKHCOtY=" |
| 229 | +} |
| 230 | +``` |
| 231 | + |
| 232 | +#### Error Response |
| 233 | + |
| 234 | +```shell |
| 235 | +400 Bad Request |
| 236 | +Content-Type: application/json |
| 237 | +``` |
| 238 | + |
| 239 | +```json |
| 240 | +{ |
| 241 | + "timestamp": "2025-05-12T13:24:18.149+00:00", |
| 242 | + "httpStatus": "400 - Bad Request", |
| 243 | + "errorMessage": "Bad request [keyVersion] received.", |
| 244 | + "errorId": "BAD_REQUEST", |
| 245 | + "path": "/detokenizer/v5/creditcards/059fee21-a340-5043-8b72-583f5c2d10b0" |
| 246 | +} |
| 247 | +``` |
| 248 | + |
| 249 | + |
| 250 | +## Schemas <a name="schemas"></a> |
| 251 | + |
| 252 | +### <a name="rsa-public-key-response"></a>RSA Public Key Response |
| 253 | + |
| 254 | +Name|Type|Format|Description |
| 255 | +---|---|---|--- |
| 256 | +`pubKey`|`string`|-|Base64 Encoded RSA public key of 2048 bits length. |
| 257 | +`version`|`long`|-|Version of RSA public key. |
| 258 | + |
| 259 | +### Credit Card Detokenizer Request <a name="credit-card-detokenizer-request"></a> |
| 260 | + |
| 261 | +Name|Type|Format|Description |
| 262 | +---|---|---|--- |
| 263 | +`symmetricKey`|`string`|-|AES Symmetric Key (256 length with transformation: AES/GCM/NoPadding) which is wrapped with RSA public key (transformation: RSA/ECB/OAEPWithSHA-256AndMGF1Padding). Note: Symmetric key has to be refreshed frequently in the caller side. |
| 264 | +`keyVersion`|`long`|-|Version of RSA public key used for wrapping symmetric key. |
| 265 | + |
| 266 | +### Credit Card Number Response<a name="credit-card-number-response"></a> |
| 267 | + |
| 268 | +Name|Type|Format|Description |
| 269 | +---|---|---|--- |
| 270 | +`accountNumber`|`string`|-|This field would consists of 2 parts with colon as delimiter. First Part is Base64 Encoded IV value and Second Part is Based64 Encoded Encrypted credit card number. |
| 271 | + |
| 272 | +### <a name="error-response"></a>Error Response |
| 273 | + |
| 274 | +Name|Type|Format|Description|Example |
| 275 | +---|---|---|---|--- |
| 276 | +`timestamp`|`string`|-|The time when the error was captured.|- |
| 277 | +`httpStatus`|`string`|-|The http response code and phrase for the response.|400 - Bad Request; 401 - Unauthorized; 403 - Forbidden; 404 - Not Found; 500 - Internal Server Error |
| 278 | +`errorMessage`|`string`|-|The detailed error message. | Bad request [creditCardGUID] received, Bad request [keyVersion] received, Bad request [symmetricKey] received; Unauthorized request; Forbidden request; Not Found; Internal server error. Please contact system administrator. |
| 279 | +`errorId`|`string`|-|The unique identifier of the error associated with the response.|BAD_REQUEST; UNAUTHORIZED; FORBIDDEN; NOT_FOUND; INTERNAL_SERVER_ERROR |
| 280 | +`path`|`string`|-|The URI of the attempted request.|- |
0 commit comments