Action Confirmation Signatures

Exchange a wallet-signed sentence for the action token that unlocks sensitive card data.

Before You Start

Read the following guides before proceeding:

GuideWhy
Wallet SignaturesWho signs, and how each wallet type encodes the signature
Card DetailsWhere the action token is used
3DS AuthenticationReading card data during a challenge

Overview

An action token proves that the employee holding the corporation token also controls the wallet behind
it. It is required to read a card's PAN and expiry, CVV and PIN. To get one, the employee signs a fixed
sentence and exchanges the signature for the token.

MethodPathPermissions
POST/api/v1/confirmation/signature/verifyCardSu or CardViewDetails
POST/api/v1/confirmation/signature (obsolete — use /verify)CardSu or CardViewDetails

Both accept the corporation token only and behave identically.


The Sentence

By signing this I confirm that I am executing action <action_type> at <nonce>
PlaceholderValue
<action_type>GetCardDetails or 3dsChallenge, spelled exactly like this whatever case the request uses
<nonce>The same integer as the request's nonce

The signer and the encoding are described in Wallet Signatures. XRPL
wallets cannot sign this sentence.

Sign GetCardDetails to read card data — see Card Details for where the
token is used.


Exchange the Signature

POST /api/v1/confirmation/signature/verify

Request body:

{
  "action_type": "GetCardDetails",
  "message_signature": "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac81f0c5b0e4a7c1d2e3f405162738495a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c1b",
  "nonce": 1761480000
}

Signed sentence for this request:

By signing this I confirm that I am executing action GetCardDetails at 1761480000
FieldTypeRequiredDescription
action_typestringYesGetCardDetails or 3dsChallenge. Matched case-insensitively
message_signaturestringYesSignature over the sentence
nonceinteger (int64)YesUnix time in seconds used in the sentence. Rejected when more than 120 seconds old

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
FieldDescription
tokenAction token. Pass it as action_token to the card-data endpoints in Card Details

Sign and exchange in one interaction. The nonce is accepted for 120 seconds, so a signature cannot
be prepared in advance.

Code

const nonce = Math.floor(Date.now() / 1000);
const sentence = `By signing this I confirm that I am executing action GetCardDetails at ${nonce}`;
const signature = await account.signMessage({ message: sentence }); // employee_address wallet

const response = await fetch(`${baseUrl}/api/v1/confirmation/signature/verify`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${corporationToken}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ action_type: 'GetCardDetails', message_signature: signature, nonce })
});
const { token: actionToken } = await response.json();
nonce = int(time.time())
sentence = f"By signing this I confirm that I am executing action GetCardDetails at {nonce}"
signature = sign_message(sentence)  # employee_address wallet, see Wallet Signatures

response = requests.post(
    f"{base_url}/api/v1/confirmation/signature/verify",
    headers={"Authorization": f"Bearer {corporation_token}"},
    json={"action_type": "GetCardDetails", "message_signature": signature, "nonce": nonce},
)
action_token = response.json()["token"]
nonce := time.Now().Unix()
sentence := fmt.Sprintf("By signing this I confirm that I am executing action GetCardDetails at %d", nonce)
signature := signMessage(sentence) // employee_address wallet, see Wallet Signatures

body, _ := json.Marshal(map[string]any{
    "action_type":       "GetCardDetails",
    "message_signature": signature,
    "nonce":             nonce,
})

req, _ := http.NewRequest("POST", baseURL+"/api/v1/confirmation/signature/verify", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer "+corporationToken)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()

var tokenResp struct {
    Token string `json:"token"`
}
json.NewDecoder(resp.Body).Decode(&tokenResp)

Error Handling

{
  "error_reason": "ErrorInvalidField",
  "error_description": "Invalid signature",
  "error_category": {
    "category": "CategoryValidationFailure",
    "http_status_code": 400
  },
  "error_details": [
    { "key": "field", "details": "signature" },
    { "key": "issue", "details": "invalid_signature" },
    { "key": "signature", "details": "Invalid signature" }
  ]
}

Validation Errors (400)

Error ReasonError DetailsDescriptionResolution
ErrorMissingFieldfield: action_type, issue: missingaction type is requiredaction_type is not in the body. Send GetCardDetails or 3dsChallenge
ErrorInvalidFieldfield: action_type, issue: invalid_valueInvalid value for action typeaction_type is an empty string or another value. Send GetCardDetails or 3dsChallenge
ErrorMissingFieldfield: message_signature, issue: missingmessage signature is requiredSend the signature
ErrorMissingFieldfield: nonce, issue: missingnonce is requirednonce is missing or 0. Send the unix time used in the sentence
ErrorInvalidFieldfield: nonce, issue: expiredInvalid noncenonce is more than 120 seconds old. Sign again with a new nonce
ErrorInvalidFieldfield: signature, issue: invalid_formatInvalid format for signatureEVM signature is not hex, or is shorter than 65 bytes and the wallet does not accept it over ERC-1271. Stellar signature is not base64. Fix the encoding
ErrorInvalidFieldfield: signature, issue: invalid_signatureInvalid signatureThe signature is not employee_address's signature over this exact sentence: another wallet, action_type or nonce, or a smart-contract wallet that declines it or cannot be reached. Sign again with a new nonce

Server Errors (500)

Error ReasonError DetailsDescriptionResolution
ErrorGeneral—Unsupported chain typeemployee_address is an XRPL address. XRPL wallets cannot confirm actions
ErrorGeneral—Failed to issue action tokenThe signature is valid, but the token could not be issued. Retry with a new nonce

Did this page help you?