{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Unscheduled Merchant-Initiated Transactions | xMoney Documentation","description":"Save a customer's card with consent and initiate unscheduled charges when the final amount becomes known.","llmstxt":{"hide":false,"title":"xMoney Documentation","description":"Guides and API references for integrating xMoney card and crypto payments.","sections":[{"title":"Guides","description":"Integration guides for card payments, crypto, checkout, and dashboard.","includeFiles":["guides/**/*.md"]},{"title":"Card API","description":"REST API reference and concepts for xMoney card payments.","includeFiles":["api/**/*.md","api/**/*.yaml"]},{"title":"Crypto API","description":"REST API reference and concepts for xMoney crypto payments.","includeFiles":["crypto_api/**/*.md","crypto_api/**/*.yaml"]},{"title":"Card Issuing API","description":"Guides and API reference for xMoney whitelabel card issuing partners.","includeFiles":["card_issuing_api/**/*.md","card_issuing_api/**/*.yaml"]}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"unscheduled-merchant-initiated-transactions","__idx":0},"children":["Unscheduled merchant-initiated transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An unscheduled merchant-initiated transaction (MIT) lets you charge a saved card when the customer is not actively completing checkout. Use this flow when the timing or final amount cannot be determined in advance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, you might collect an estimated amount when the customer places an order, perform additional checks, and later charge the difference if the final cost is higher."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Use a managed order"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create the card agreement with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order.type: managed"]},". xMoney then identifies later charges on the saved card as unscheduled merchant-initiated transactions and handles the classification automatically."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-the-flow-works","__idx":1},"children":["How the flow works"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The flow has two stages:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["While the customer is present, create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["managed"]}," order and save their card. You can verify the card without charging it or save it during the first payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After the amount is confirmed, initiate a charge against the active managed order with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api/reference/order/initiate-recurring-order-transaction"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /order-rebill/{orderId}"]}]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The initial customer-present transaction establishes the saved-card agreement. Each later charge uses the card associated with that managed order and does not require the card number or CVV again."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-saving-the-card","__idx":2},"children":["Before saving the card"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tell the customer that their payment method will be saved and may be charged later without their active participation. Present this notice before they submit their card."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your notice should clearly explain:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Why the payment method is being saved."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["What may cause an additional charge."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["How the additional amount will be calculated."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When and how the customer will be informed."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["How the customer can cancel the agreement or contact you about a charge."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example:"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By continuing, you authorize Example Merchant to securely save this payment method with xMoney and charge it for additional amounts identified during the checks described above. We will notify you of the final amount and any additional charge."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saveCard: true"]}," in the server-generated order payload to make the storage requirement explicit."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Customer consent is required"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Do not force card storage without clearly informing the customer. If your checkout hides the optional save-card control, collect the customer's agreement through another clear part of the checkout flow. You are responsible for meeting the card-scheme, regulatory, and contractual requirements that apply to your business."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"option-1-verify-and-save-the-card-without-a-charge","__idx":3},"children":["Option 1: Verify and save the card without a charge"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardTransactionMode: verifyCard"]}," when no initial payment is required. The verification uses an amount of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," and creates the managed order that you will charge later."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"siteId\": 10077,\n  \"customer\": {\n    \"identifier\": \"customer-123\",\n    \"email\": \"customer@example.com\"\n  },\n  \"order\": {\n    \"orderId\": \"inspection-123\",\n    \"type\": \"managed\",\n    \"amount\": 0,\n    \"currency\": \"EUR\",\n    \"description\": \"Payment method verification\"\n  },\n  \"cardTransactionMode\": \"verifyCard\",\n  \"saveCard\": true,\n  \"backUrl\": \"https://merchant.example.com/payment-result\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The customer enters their card and completes any required 3D Secure authentication. Wait for a trusted server-side confirmation with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionStatus: complete-ok"]}," before using the saved card."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"transactionStatus\": \"complete-ok\",\n  \"orderId\": 1234,\n  \"transactionId\": 5678,\n  \"cardId\": 98765,\n  \"customerId\": 1001\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Store the returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]}," against the same customer. The order remains active so that you can initiate later charges."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For general tokenization details, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payments/save-card-without-payment"},"children":["Save card without payment"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"option-2-save-the-card-on-the-first-charge","__idx":4},"children":["Option 2: Save the card on the first charge"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardTransactionMode: authAndCapture"]}," when you collect an initial amount while the customer is present. The order must still use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: managed"]}," so that later merchant-triggered charges are classified correctly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example charges an initial estimate of EUR 50:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"siteId\": 10077,\n  \"customer\": {\n    \"identifier\": \"customer-123\",\n    \"email\": \"customer@example.com\"\n  },\n  \"order\": {\n    \"orderId\": \"inspection-124\",\n    \"type\": \"managed\",\n    \"amount\": 50,\n    \"currency\": \"EUR\",\n    \"description\": \"Initial estimated charge\"\n  },\n  \"cardTransactionMode\": \"authAndCapture\",\n  \"saveCard\": true,\n  \"backUrl\": \"https://merchant.example.com/payment-result\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the initial transaction reaches ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["complete-ok"]},", retain the returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]},". If the checks establish a final cost of EUR 65, charge only the EUR 15 difference in the later MIT."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about tokenization during a payment, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payments/save-card-on-payment"},"children":["Save card on payment"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"charge-the-confirmed-amount-or-difference","__idx":5},"children":["Charge the confirmed amount or difference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initiate the later charge from your backend:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X PATCH \"https://api.xmoney.com/order-rebill/1234\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  --data-urlencode \"customerId=1001\" \\\n  --data-urlencode \"amount=15.00\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The order must:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: managed"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Be active with an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in-progress"]}," status."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Belong to the supplied customer."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have a successfully saved card."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A successful response identifies the managed order and the new transaction:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 200,\n  \"message\": \"Success\",\n  \"data\": {\n    \"id\": 1234,\n    \"transactionId\": 6789,\n    \"cardId\": 98765\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm the final transaction state through the API response and your ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api/webhooks"},"children":["webhook"]}," processing before treating the additional amount as collected."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Avoid duplicate charges"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create an application-level reference for each intended additional charge and record its result. If a request times out, check the order or transaction status before retrying. Do not assume that a missing response means the charge failed."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"charging-through-a-new-managed-order","__idx":6},"children":["Charging through a new managed order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also create a new order with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: managed"]}," and the saved ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]},". This creates a separate order and xMoney processes its saved-card charge as an unscheduled MIT."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /order-rebill/{orderId}"]}," when you want to keep the initial agreement and its later charges on one managed order. Use a new managed order only when each charge must have a separate order lifecycle."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"do-not-use-a-purchase-order-for-an-mit","__idx":7},"children":["Do not use a purchase order for an MIT"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A saved-card ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase"]}," is treated as a customer-initiated transaction. It does not become an MIT merely because the card was saved previously."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["managed"]}," for merchant-triggered charges with no fixed schedule."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recurring"]}," for charges that xMoney automatically initiates on a defined schedule."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase"]}," when the customer is actively initiating a one-off payment."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3d-secure-and-failures","__idx":8},"children":["3D Secure and failures"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The initial verification or payment may require 3D Secure. Complete that customer-present flow before relying on the saved card."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A later MIT can still be declined or require action under issuer or regulatory rules. Do not automatically convert a failed MIT into a customer-initiated payment. Notify the customer and ask them to return to checkout when new authentication or a different payment method is required."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"implementation-checklist","__idx":9},"children":["Implementation checklist"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Obtain clear customer agreement to save the card and make later variable charges."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["managed"]}," order with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saveCard: true"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use either ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["verifyCard"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authAndCapture"]}," while the customer is present."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Activate the agreement only after a trusted ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["complete-ok"]}," confirmation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Store the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardId"]},", and customer association securely."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Calculate and record the exact additional amount."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Initiate the charge with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /order-rebill/{orderId}"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Reconcile the response and webhook before retrying or fulfilling the additional amount."]}]}]},"headings":[{"value":"Unscheduled merchant-initiated transactions","id":"unscheduled-merchant-initiated-transactions","depth":1},{"value":"How the flow works","id":"how-the-flow-works","depth":2},{"value":"Before saving the card","id":"before-saving-the-card","depth":2},{"value":"Option 1: Verify and save the card without a charge","id":"option-1-verify-and-save-the-card-without-a-charge","depth":2},{"value":"Option 2: Save the card on the first charge","id":"option-2-save-the-card-on-the-first-charge","depth":2},{"value":"Charge the confirmed amount or difference","id":"charge-the-confirmed-amount-or-difference","depth":2},{"value":"Charging through a new managed order","id":"charging-through-a-new-managed-order","depth":2},{"value":"Do not use a purchase order for an MIT","id":"do-not-use-a-purchase-order-for-an-mit","depth":2},{"value":"3D Secure and failures","id":"3d-secure-and-failures","depth":2},{"value":"Implementation checklist","id":"implementation-checklist","depth":2}],"frontmatter":{"seo":{"title":"Unscheduled Merchant-Initiated Transactions | xMoney Documentation","description":"Save a customer's card with consent and initiate unscheduled charges when the final amount becomes known."}},"lastModified":"2026-10-10T08:11:15.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/payments/unscheduled-merchant-initiated-transactions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}