### Install SDK Dependencies Source: https://docs.stitch.money/payment-products/payins/wallets/once-off/web-integration-process-legacy Commands to install the necessary SDK packages for different frameworks. ```bash npm install @stitch-money/client @stitch-money/react ``` ```bash npm install @stitch-money/client @stitch-money/web ``` -------------------------------- ### Install Stitch Money SDK for React Source: https://docs.stitch.money/payment-products/payins/wallets/once-off/web-integration-process Use this command to install the client and React-specific components. ```bash npm install @stitch-money/client @stitch-money/react ``` -------------------------------- ### Install Stitch SDK Source: https://docs.stitch.money/payment-products/payins/card/secure-fields Install the appropriate package based on your client-side framework. ```bash npm install @stitch-money/react ``` ```bash npm install @stitch-money/web ``` -------------------------------- ### Initialize ChargeIntent Source: https://docs.stitch.money/payment-products/payins/inperson/driver/SDK/dotnet-framework Examples for creating charge intents with or without cashback. ```csharp var intent = new ChargeIntent(30.00m, "ZAR"); ``` ```csharp var intent = new ChargeIntent( 30.00m, "ZAR", new Money(5.00m, "ZAR")); ``` -------------------------------- ### Example Authorization URLs Source: https://docs.stitch.money/authentication/user-tokens Plausible examples of fully formed authorization URLs, provided in both URL-encoded and raw formats. ```text https://secure.stitch.money/connect/authorize?client_id=test-18fbd892-3b73-43c3-a854-c6f78c681349 & scope=openid%20offline_access%20transactions%20accounts & response_type=code & redirect_uri=https%3A%2F%2Flocalhost%3A9000%2Freturn & state=J_Ug3dCQJG61Tt2Sejt3TY5ExgqemTXpEFhyFGapXwA & nonce=fim8Mwz0yHE85NOfgMD_sk3MdKzq2vQ_QnC0KUxIGT4 & code_challenge=FVF6VCwYJ_XljGdLXVjxs6g-_QRh4_CDutLOf_oIzPw & code_challenge_method=S256 ``` ```text https://secure.stitch.money/connect/authorize?client_id=test-18fbd892-3b73-43c3-a854-c6f78c681349 & scope=openid offline_access transactions accounts & response_type=code & redirect_uri=https://localhost:9000/return & state=J_Ug3dCQJG61Tt2Sejt3TY5ExgqemTXpEFhyFGapXwA & nonce=fim8Mwz0yHE85NOfgMD_sk3MdKzq2vQ_QnC0KUxIGT4 & code_challenge=FVF6VCwYJ_XljGdLXVjxs6g-_QRh4_CDutLOf_oIzPw & code_challenge_method=S256 ``` -------------------------------- ### Initialize Charge Intents Source: https://docs.stitch.money/payment-products/payins/inperson/driver/SDK/dotnet Examples for creating charge intents with or without cashback. ```csharp var intent = new ChargeIntent(Amount: 30.00m, Currency: "ZAR"); ``` ```csharp var intent = new ChargeIntent( Amount: 30.00m, Currency: "ZAR", Cashback: new Money(5.00m, "ZAR")); ``` -------------------------------- ### Full Payment Request URL Example Source: https://docs.stitch.money/payment-products/payins/bnpl/integration-process Example of a complete URL with an appended redirect_uri query parameter. ```text https://secure.stitch.money/connect/payment-request/2b068bd5-6a5a-42e1-8a45-673cb3ede612?redirect_uri=https%3A%2F%2Fexample.com%2Fpayment ``` -------------------------------- ### Install Stitch Money SDK for Angular and JS Source: https://docs.stitch.money/payment-products/payins/wallets/once-off/web-integration-process Use this command to install the client and web-compatible components for non-React frameworks. ```bash npm install @stitch-money/client @stitch-money/web ``` ```bash npm install @stitch-money/client @stitch-money/web ``` -------------------------------- ### Initialize RefundIntent Source: https://docs.stitch.money/payment-products/payins/inperson/driver/SDK/dotnet-framework Example for creating a refund intent linked to an existing terminal session. ```csharp var intent = new RefundIntent( 30.00m, "ZAR", "ts_abc123", RefundReason.RequestedByUser); ``` -------------------------------- ### Initialize DisbursementIntent Source: https://docs.stitch.money/payment-products/payins/inperson/driver/SDK/dotnet-framework Example for creating a standalone disbursement intent. ```csharp var intent = new DisbursementIntent(50.00m, "ZAR"); ``` -------------------------------- ### REPLY file validation error example Source: https://docs.stitch.money/payment-products/payins/debicheck/debit-order-files Example of a REPLY file structure indicating validation failures for specific collection items. ```text | Record type | CLIENT_ID | PRODUCT | CHANNEL | FILE_TYPE | |---------------|--------------------------------------|--------------------------|-------------------------------|--------------------| | P | bf482d8d-0423-4a77-937b-a5b4d75bd734 | COLLECTIONS | DEBIT ORDER | REPLY | |---------------|--------------------------------------|--------------------------|-------------------------------|--------------------|-----------|-----------------------|----------------------------|-------------| | Record type | LINE | EXTERNAL_BATCH_REFERENCE | EXTERNAL_COLLECTION_REFERENCE | CONTRACT_REFERENCE | STATUS | STATUS_CODE | STATUS_REASON | ACTION_DATE | |---------------|--------------------------------------|--------------------------|-------------------------------|--------------------|-----------|-----------------------|----------------------------|-------------| | D | 6 | Batch_reference_1 | COLLECTION_REF_1 | CONTRACT_REF_1 | FAILED | DATA_VALIDATION_ERROR | INVALID_BRANCH_CODE | | | D | 7 | Batch_reference_1 | COLLECTION_REF_2 | CONTRACT_REF_2 | FAILED | DATA_VALIDATION_ERROR | DUPLICATE_COLLECTION_NONCE | | | D | 8 | Batch_reference_1 | COLLECTION_REF_3 | CONTRACT_REF_3 | PROCESSED | | | 2026-07-14 | |---------------|--------------------------------------|--------------------------|-------------------------------|--------------------|-----------|-----------------------|----------------------------|-------------| | Record type | TOTAL RECORDS | |---------------|--------------------------------------| | T | 3 | ``` -------------------------------- ### Example svix-signature Header Format Source: https://docs.stitch.money/webhooks/using_webhooks Shows the structure of the svix-signature header containing space-delimited signatures and version identifiers. ```text v1,bm9ldHUjKzFob2VudXRob2VodWUzMjRvdWVvdW9ldQo= v2,MzJsNDk4MzI0K2VvdSMjMTEjQEBAQDEyMzMzMzEyMwo= ``` -------------------------------- ### Sample REPLY File Structure Source: https://docs.stitch.money/payment-products/payins/card/tokenization/collections/file-collections An example of a REPLY file showing the status of processed and failed collection records. ```text | RECORD_TYPE | CLIENT_ID | PRODUCT | FILE_TYPE | | | | |-----------------|----------------------------------------|------------------------------------------------------------------|------------------------|-------------|--------------------------|----------------------------------| | P | bf482d8d-0423-4a77-937b-a5b4d75bd734 | REPLY | REPLY | | | | | --------------- | -------------------------------------- | ---------------------------------------------------------------- | ---------------------- | ----------- | ------------------------ | -------------------------------- | | RECORD_TYPE | LINE | TOKEN | AGREEMENT_REFERENCE | STATUS | STATUS_CODE | STATUS_REASON | | --------------- | -------------------------------------- | ---------------------------------------------------------------- | ---------------------- | ----------- | ----------------------- | -------------------------------- | | D | 6 | dG9rZW4vMTQ0NjZlYjAtMjlhMi00ZDM3LWIyYjctNTZkMWFkNWIxZWIw | AGR_001 | FAILED | DATA_VALIDATION_ERROR | INVALID_QUANTITY | | D | 7 | dG9rZW4vMTQ0NjZlYjAtMjlhMi00ZDM3LWIyYjctNTZkMWFkNWIxZWIy | AGR_002 | FAILED | DATA_VALIDATION_ERROR | INVALID_NONCE | | D | 8 | dG9rZW4vMTQ0NjZlYjAtMjlhMi00ZDM3LWIyYjctNTZkMWFkNWIxZWIz | AGR_003 | SUCCESS | | | | --------------- | -------------------------------------- | ---------------------------------------------------------------- | ---------------------- | ----------- | ------------------------ | -------------------------------- | | RECORD_TYPE | TOTAL_RECORDS | | | | | | | --------------- | -------------------------------------- | ---------------------------------------------------------------- | ---------------------- | ----------- | ------------------------ | -------------------------------- | | T | 3 | | | | | | ``` -------------------------------- ### Install Stitch.Terminal Package Source: https://docs.stitch.money/payment-products/payins/inperson/driver/SDK/dotnet Commands to add the Stitch.Terminal package to your .NET project. ```bash dotnet add package Stitch.Terminal ``` ```xml ``` -------------------------------- ### PaymentInitiationRequest Response Example Source: https://docs.stitch.money/safe-link/frontend-integration The JSON response received after creating a payment initiation request, containing the unique ID and secure URL. ```json { "id": "cGF5cmVxL2JlMTNhMzE1LTBjZDUtNGY5Mi04NDk4LTU4YmU0M2Y3YjAyNg==", "url": "https://secure.stitch.money/connect/payment-request/be13a315-0cd5-4f92-8498-58be43f7b026" } ``` -------------------------------- ### Forward Pagination Source: https://docs.stitch.money/graphql/pagination Example of fetching a specific number of records using the 'first' argument and navigating using 'endCursor'. ```APIDOC ## GraphQL Query: Forward Pagination ### Description Fetch a subset of records using forward pagination. Use the 'first' argument to define the page size and the 'after' argument with the 'endCursor' from the previous response to fetch subsequent pages. ### Parameters - **first** (integer) - Required - Number of results to return per page. - **after** (string) - Optional - Cursor to retrieve nodes after, typically the 'endCursor' of the previous page. ### Query Example { client { paymentInitiationRequests(first: 10) { pageInfo { endCursor hasNextPage } edges { node { amount beneficiaryReference externalReference id created updated } } } } } ``` -------------------------------- ### Start a Terminal Session in .NET Source: https://docs.stitch.money/payment-products/payins/inperson/driver/SDK/dotnet Initiates a payment session by building a charge intent and request, then awaiting the terminal result. ```csharp // Build the intent (what to charge) var intent = new ChargeIntent( Amount: 25.00m, Currency: "ZAR"); // Build the request var request = new TerminalSessionCreateRequest { Intent = intent, ExternalReference = "order-456", Customer = new Customer { Name = "Jane Doe", Email = "jane@example.com" }, Metadata = new Dictionary { ["orderId"] = "12345" }, }; // Await the session result TerminalSession session = await terminal.StartSessionAsync(request); switch (session.Status) { case SessionStatus.Success when session.Outcome is ChargeOutcome { Charge: var charge }: Console.WriteLine($"Success! Charge ID: {charge.Id}"); break; case SessionStatus.Failure: Console.WriteLine($"Failed: {session.FailureReason}"); break; case SessionStatus.Pending: // Outcome is unknown // Resolve via Terminal.GetSessionAsync(session.Id) or the Stitch HTTP API. Console.WriteLine($"Pending: resolve session {session.Id}"); break; } ``` -------------------------------- ### Backward Pagination Source: https://docs.stitch.money/graphql/pagination Example of fetching records in reverse using the 'last' argument and navigating using 'startCursor'. ```APIDOC ## GraphQL Query: Backward Pagination ### Description Fetch a subset of records using backward pagination. Use the 'last' argument to define the page size and the 'before' argument with the 'startCursor' from the previous response to fetch previous pages. ### Parameters - **last** (integer) - Required - Number of results to return per page. - **before** (string) - Optional - Cursor to retrieve nodes before, typically the 'startCursor' of the previous page. ### Query Example { client { paymentInitiations(last: 100) { edges { node { amount date id beneficiaryReference payerReference } } pageInfo { startCursor hasPreviousPage } } } } ``` -------------------------------- ### Merchant Creation Response Examples Source: https://docs.stitch.money/payment-products/payins/inperson/weave/merchants Successful merchant creation responses for various business types and statuses. ```json { "id": "bWVyY2hhbnQvNmM3OWVlZGEtY2E3Zi00ZDIwLThhNTgtN2JhYWI3MGY1ZTBk", "status": "pending", "externalReference": "demo-merchant-002", "businessType": "company", "mid": "991234567890123456", "name": "Stitch Demo Retail Ltd", "categoryCode": "7372", "phone": "+27123456789", "email": "demo@stitchdemo.co.za", "address": { "street": "123 Main Street", "city": "Cape Town", "postalCode": "8001", "regionCode": "WC", "countryCode": "ZA" }, "bankAccount": { "number": "1234567890", "bank": "fnb", "accountHolderName": "Stitch Demo Retail Ltd" }, "documents": [ { "id": "ZmlsZS83ZDRiMGNmYi0xMDBhLTRkMjUtYWViYy0zN2YyOWEwZDA3NTM=" } ], "pins": { "login": "111111", "supervisor": "123456" } } ``` ```json { "id": "bWVyY2hhbnQvNmM3OWVlZGEtY2E3Zi00ZDIwLThhNTgtN2JhYWI3MGY1ZTBk", "status": "active", "externalReference": "demo-merchant-003", "businessType": "individual", "mid": "991112223334445556", "name": "Stitch Demo Retail Ltd", "categoryCode": "5945", "phone": "+27123456789", "email": "demo@stitchdemo.co.za", "address": { "street": "123 Main Street", "city": "Cape Town", "postalCode": "8001", "regionCode": "WC", "countryCode": "ZA" }, "bankAccount": { "number": "1234567890", "bank": "fnb", "accountHolderName": "John Smith" }, "documents": [ { "id": "ZmlsZS83ZDRiMGNmYi0xMDBhLTRkMjUtYWViYy0zN2YyOWEwZDA3NTM=" } ], "pins": { "login": "111111", "supervisor": "123456" } } ``` ```json { "id": "bWVyY2hhbnQvNmM3OWVlZGEtY2E3Zi00ZDIwLThhNTgtN2JhYWI3MGY1ZTBk", "status": "pending", "externalReference": "demo-merchant-004", "businessType": "individual", "mid": "991998877665544332", "name": "Stitch Demo Retail Ltd", "categoryCode": "7995", "phone": "+27123456789", "email": "demo@stitchdemo.co.za", "address": { "street": "123 Main Street", "city": "Cape Town", "postalCode": "8001", "regionCode": "WC", "countryCode": "ZA" }, "bankAccount": { "number": "1234567890", "bank": "fnb", "accountHolderName": "John Smith" }, "documents": [ { "id": "ZmlsZS83ZDRiMGNmYi0xMDBhLTRkMjUtYWViYy0zN2YyOWEwZDA3NTM=" } ], "pins": { "login": "111111", "supervisor": "123456" } } ``` -------------------------------- ### Rendering the Payment Iframe Source: https://docs.stitch.money/safe-link/frontend-integration Examples for embedding the payment gateway using standard HTML or React components. ```html ``` ```jsx