# Save Card without Payment You can save (tokenize) a customer's card without charging them by using xMoney's **verifyCard** transaction mode. This approach validates and tokenizes the card with **amount 0**, providing a seamless user experience without any temporary holds or charges on the customer's account. ## Flow Overview 1. **Create a Card Verification Request** * Set `amount` to **0**. * Include `saveCard: 1` to ensure the card is tokenized. * Set `cardTransactionMode` to **verifyCard** to validate the card without any charges. 2. **Wait for the Transaction to Complete** * Check the status. If **complete-ok**, the token (`cardId`) is generated and tied to the customer. 3. **Token Is Available** * The card is now saved and can be referenced in future payment requests using its `cardId`, without additional card input from the customer. ## Example Card Verification Request Below is a minimal **JSON** request illustrating how to verify and save a card without any charges: ```json { "siteId": 10077, "customer": { "identifier": "cardOnlyFlow" }, "order": { "orderId": "saveCardTest1", "type": "purchase", "amount": 0, "currency": "EUR", "description": "Card verification for tokenization" }, "cardTransactionMode": "verifyCard", "saveCard": 1 } ``` **Notes** * **Amount**: Set to `0` - no charges will be made to the customer's card. * **Order Type**: Typically `purchase`. * **cardTransactionMode**: Setting this to **verifyCard** validates the card without any authorization or capture. * **saveCard**: Setting this to `1` ensures a token (`cardId`) is created. When the customer enters their card details, xMoney will generate a token once the payment status is **complete-ok**. ## Check Transaction Status and Extract cardId After the card verification completes, you receive the final transaction status (e.g., via webhook or direct response). A typical successful response (decrypted if using `opensslResult`) looks like: ```json { "transactionStatus": "complete-ok", "orderId": 1234, "transactionId": 1234, "cardId": 98765, "customerId": 1001, ... } ``` 1. Confirm that `transactionStatus` is **complete-ok**. 2. Store the **cardId** for future use. This is the customer's token. ## Future Payments with the Saved Card After the card verification is complete, the card token is ready for use: ```json { "siteId": 10077, "customer": { "identifier": "cardOnlyFlow" }, "order": { "orderId": "followUpOrder1", "type": "purchase", "amount": 99.99, "currency": "EUR", "description": "Product purchase using saved card" }, "cardTransactionMode": "authAndCapture", "cardId": 98765 } ``` * Replace `cardId` with the token you stored. * The customer no longer needs to enter full card details again. * 3D Secure may still apply based on issuer/regulatory requirements. ## Benefits of Using verifyCard Mode details summary strong No Charges p Unlike micropayment approaches, there are no temporary holds or charges on the customer's account. details summary strong Simplified Integration p No need to void transactions - the process is complete after receiving the code complete-ok status. details summary strong Better User Experience p Customers see no unexpected charges or temporary holds on their statements. details summary strong Instant Tokenization p The card is immediately available for future transactions once verified. ## Best Practices | 🎯 Practice | 📋 Description | | --- | --- | | **Clear Communication** | Inform customers that you're saving their card details for future convenience, but no charges will be made during this process. | | **3D Secure Handling** | If the card requires 3DS authentication, additional steps may be necessary during the challenge or frictionless flow. Future use of the token might also require 3DS. | | **Token Management** | Store the `cardId` securely for future transactions and associate it with the customer's account. | ## Conclusion By using the **verifyCard** transaction mode with **amount 0**, you can safely validate and tokenize a card without any charges or temporary holds. Once you receive a **complete-ok** status and **cardId**, the token is ready for future purchases, providing a streamlined checkout experience for returning customers.