Stablecoin Payments / CoinGate

USDC payment system with CoinGate and managed settlement

An NDA-protected B2B implementation combining stablecoin checkout, payment orchestration, webhooks, an internal ledger, reconciliation and settlement without moving product logic into the payment provider.

NDA / Confidential clientClient implementationFinTech / B2B Payments / Digital AssetsNDA
Crypto & Stablecoin Payment SystemsPayment architectureCoinGate API integrationBackend and webhooksLedger and reconciliationOperational tooling
Architecture of a USDC payment system with CoinGate, payment intent, ledger and settlement
Project overview

Softech designed and implemented a stablecoin payment layer for an NDA-protected B2B client. Instead of moving product logic into an external gateway, the architecture separates responsibilities: the application remains the source of truth for amount, order and business status, CoinGate provides checkout and the payment rail, while an internal ledger, idempotent webhooks and reconciliation create an auditable path from payment intent to settlement. The model uses managed crypto infrastructure without making a single provider the source of truth for the core product.

01 / Context

Business context and the situation before implementation

The client operated a B2B product with conventional order and invoice settlement, while a segment of customers expected stablecoin payments. The priority was to add USDC without rebuilding the entire payment domain or creating a proprietary custody or exchange layer.

  • USDC was introduced as an alternative rail for existing obligations rather than a separate commerce system.
  • The invoice or order had to remain the authoritative business document regardless of payment method.
  • Finance operations needed a clear relationship between provider order, transaction and settlement.
  • The product could not treat a single webhook delivery as sufficient authority for payment state.

Before state

Before implementation, the product had no payment-intent model prepared for blockchain payments. Adding a gateway link alone would leave gaps in state handling, errors, refunds and reconciliation, especially because provider events are asynchronous and can be delivered repeatedly.

  • No unified state between the business document and external payment.
  • No deterministic protection against crediting a repeated callback twice.
  • No shared audit trail across order, payment and settlement.
  • Exceptions would require manual comparison across several systems.
02 / Strategy

Goals, success criteria and constraints

Discovery started from the obligation lifecycle rather than the provider API. We mapped when the amount due is created, who owns state, when payment can be considered complete, and what evidence operations and finance need to see.

Product goals

  • Add USDC as a controlled payment method inside the existing product.
  • Keep price and business obligation outside the blockchain rail.
  • Design idempotent processing for callbacks and status changes.
  • Create an internal payment ledger independent of provider balance.
  • Provide reconciliation from invoice or order through settlement.

Success criteria

  • Every CoinGate order maps unambiguously to an internal payment intent.
  • A repeated callback cannot apply payment business effects twice.
  • Product state can be reconstructed from stored events and authoritative provider data.
  • Refunds preserve history by creating auditable follow-up events.
  • An operator can trace the full payment chain without accessing application code.

NDA and disclosure minimisation

Client identity, volumes, commercial terms and internal system names are not published.

External payment rail

Checkout, conversion and part of settlement remain provider responsibilities, so the product must correctly handle asynchronous status changes.

Existing invoice and order domain

The new rail cannot change how the product identifies an obligation and its owner.

Operational recoverability

The system must recover correct state after callback interruption, network failure or manual intervention.

Analysis and product decisions

  • We separated the business amount from the crypto amount presented at checkout.
  • We defined the payment intent as the contract between the business domain and payment rail.
  • We introduced internal statuses independent of provider naming.
  • We defined idempotency, retry and manual reconciliation rules.
  • We designed an audit trail for payment, refund and settlement events.
03 / System

Solution architecture

The architecture combines the product domain, payment orchestration service, CoinGate integration, internal ledger, reconciliation and operational audit processes. Each layer has an explicitly separated responsibility.

Architecture diagram
Product layers and responsibilities
Logical view
  1. 01
    Layer 01

    Product and business document

    Invoice, order or account defines who pays, what is being paid for and which value remains the source of truth.

    Orders / invoicesBusiness domain
  2. 02
    Layer 02

    Payment intent

    A stable identifier connects the business document with a payment attempt, source currency, expiry and state.

    Payment state machineIdempotency keys
  3. 03
    Layer 03

    CoinGate integration

    The adapter creates provider orders, redirects customers to checkout, receives callbacks and can re-fetch authoritative provider state.

    CoinGate APIHosted checkoutCallbacks
  4. 04
    Layer 04

    Internal ledger

    The ledger records accepted payment events, business effects and state history without overwriting the past.

    Event historyRelational ledger
  5. 05
    Layer 05

    Reconciliation and operations

    The operations layer compares payment intent, provider order, settlement and any refund, surfacing discrepancies for review.

    ReconciliationAudit loggingOperations UI
Key flows
Invoice / orderPayment intentamount and obligation
Payment intentCoinGate ordercheckout creation
CoinGate callbackInternal ledgerverified event
Internal ledgerProductsingle business effect
Provider settlementReconciliationsettlement matching
04 / Product

Problems, decisions and implemented capabilities

Decision 1Confirmed in the product
Problem

A callback could be delivered more than once.

Decision

Every event received an idempotency key and guarded state transition.

Capability

Idempotent webhook processing

Outcome

Repeated delivery does not credit the payment or trigger the business workflow twice.

Decision 2Confirmed in the product
Problem

Provider statuses did not map one-to-one to product domain states.

Decision

We defined an internal state machine and explicit provider-to-product mapping.

Capability

Provider-independent payment state

Outcome

Changing provider does not require rewriting every downstream business workflow.

Decision 3Confirmed in the product
Problem

Finance needed traceability from invoice to settlement.

Decision

We connected document, payment intent, provider order and settlement identifiers in one audit trail.

Capability

End-to-end reconciliation

Outcome

Discrepancies can be investigated per obligation without manually guessing relationships.

Decision 4Confirmed in the product
Problem

A refund could obscure the history of the original payment.

Decision

A refund is treated as a follow-up event linked to the original payment.

Capability

Auditable refunds

Outcome

History remains complete and preserves both the original credit and later value reversal.

Decision 5Confirmed in the product
Problem

A callback outage cannot leave payment permanently stuck in an intermediate state.

Decision

We added authoritative state re-fetch and manual reconciliation capability.

Capability

Recoverable payment processing

Outcome

State can be repaired without manually editing business-domain data.

Technology decisions

TechnologyRoleRationaleTrade-off
CoinGate APIExternal payment railIt delegates crypto checkout and payment processing to a dedicated provider while keeping product orchestration inside the client application.The integration depends on the external provider API contract and status lifecycle.
Hosted checkoutPayer interfaceIt reduces the product scope for address, network and payment-screen handling while allowing the provider to present currently supported options.Part of the user experience is hosted outside the main application.
Payment state machineDomain stateIt separates transient provider state from product business effects and controls allowed transitions.It requires explicit mapping between provider and internal statuses.
Internal ledgerAudit and financial effectsIt preserves operational history and independence from the external provider dashboard and balance.It adds a dedicated data layer that must be reconciled.
Reconciliation jobsConsistency controlThey detect missed callbacks, status divergence and settlement discrepancies without relying only on the online path.Repair jobs must be safe to run repeatedly.

Integrations and data flows

CoinGate Orders API

Product → CoinGate

Create a provider order linked to the internal payment intent and business document.

Every order uses a stable internal identifier and can be re-fetched.

CoinGate callbacks

CoinGate → backend

Asynchronous payment status notification triggers validation and a controlled state transition.

The callback is treated as a verification trigger rather than the only source of truth.

Settlement / finance export

Ledger → finance

Expose reconciled payment, refund and settlement data to finance operations.

Exports are based on accepted ledger state and surface unresolved exceptions.

05 / Control

AI, security and reliability

Idempotency

Callbacks, retries and reconciliation must remain safe when the same operation is executed more than once.

Provider data verification

The system does not trust the user redirect alone; backend verifies identifier, amount and current provider state.

Audit trail

Every material state change records its reason, source and relationship to the business document.

Recoverability

A missed callback or temporary integration outage can be recovered through reconciliation without manual data edits.

Separation of concerns

Provider credentials, domain logic and settlement information have separated responsibilities and access scope.

06 / Delivery

Implementation, testing and release

  1. 1
    Phase 1 / Discovery

    Map the obligation lifecycle and responsibility boundaries between product and provider.

    • Payment intent and state ownership model
    • Provider-to-product status mapping
    • Exception and refund scenarios

    Result: A domain contract was established independently of checkout implementation details.

  2. 2
    Phase 2 / Provider integration

    Connect order creation, hosted checkout and callback processing to the payment orchestration service.

    • CoinGate API adapter
    • Callback verification and idempotency
    • Order-to-payment-intent identifier mapping

    Result: Stablecoin payment became part of the existing order lifecycle.

  3. 3
    Phase 3 / Ledger and reconciliation

    Build durable event history and payment-to-settlement reconciliation.

    • Internal ledger
    • Reconciliation jobs
    • Operator audit view

    Result: Operations gained one place to inspect state and discrepancies.

  4. 4
    Phase 4 / Release hardening

    Test failure, retry, refund and delayed-status scenarios before production use.

    • Repeated-callback tests
    • Expired and delayed payment tests
    • Manual reconciliation runbook

    Result: The system was prepared for conditions beyond the ideal checkout path.

Repeated callbacks

Tests verify that repeated delivery of the same event does not duplicate business effects.

Intermediate and delayed states

Scenarios cover awaiting, confirming, delayed and later reconciled payment states.

Refund and reversal

Refunds follow their own lifecycle and do not remove the original payment history.

Reconciliation recovery

A controlled test removes or delays an online event and the reconciliation process restores correct state.

07 / Verification

What confirms the project description

Because of the NDA and the absence of approval to publish volumes, we do not present percentage KPIs or transaction values. Outcomes are evaluated through confirmed system properties: lifecycle consistency, recoverability, idempotency, auditability and reconciliation capability.

ScopeBasisReferenceConfirmationInterpretation boundary
The product and payment provider are separated by an internal payment intent and integration adapter.Architecture diagramCG-01 · project material and implementation architectureOperationally confirmedThe diagram is anonymized and does not expose internal client service names.
Business payment state is maintained independently of CoinGate status naming.State modelCG-02 · project material and implementation architectureOperationally confirmedThe public version simplifies the number of internal states and transition guards.
Callbacks are processed idempotently before business effects are applied.State modelCG-02 · project material and implementation architectureOperationally confirmedSpecific idempotency keys and database schema are not published.
Reconciliation links payment intent, provider order and settlement into one operational trace.Reconciliation diagramCG-03 · project material and implementation architectureOperationally confirmedBank details, client identifiers and job frequency remain confidential.
A refund preserves its relationship to the original payment rather than overwriting history.State modelCG-02 · project material and implementation architectureOperationally confirmedThe diagram shows the pattern rather than the client exact status names.
The operations layer supports discrepancy analysis without direct edits to domain data.Reconciliation diagramCG-03 · project material and implementation architectureOperationally confirmedThe operator UI is not published because of the NDA.

How to read this information

  • Payment counts and USDC volume are not published.
  • Settlement values and provider commercial terms are not published.
  • Sales growth is not attributed solely to the addition of a new payment rail.
  • All published outcomes describe system capability and architecture rather than estimated marketing KPIs.
08 / Lessons

Process change, decision consequences and lessons

AreaBeforeAfterBusiness impact
Payment modelExternal payment had no dedicated domain contract.A payment intent connects the business obligation with a specific payment attempt.State is unambiguous and recoverable.
CallbacksA single event could directly mutate order state.Webhook delivery goes through verification, idempotency and guarded state transition.Retries do not create duplicate effects.
LedgerPayment history would be split between the domain and provider dashboard.An internal ledger stores accepted events and relationships.The team owns an auditable payment record.
SettlementSettlement would require manual matching across identifiers.Reconciliation links order, payment, refund and settlement.Discrepancies become visible and operationally manageable.
Provider dependencyBusiness logic could become coupled to one gateway status model.An adapter translates provider events into a provider-neutral product model.Architecture reduces the future cost of changing the payment rail.
Decision trade-off

CoinGate hosted checkout

Alternative
Custom crypto checkout
Trade-off
Less visual control in exchange for a smaller scope around addresses, networks and payment UX.
Rationale
For this model, delivery speed and delegation of the payment rail mattered more than full control of the payment screen.
Decision trade-off

Internal ledger

Alternative
Use provider balance and order history as source of truth
Trade-off
An additional data layer increases implementation scope.
Rationale
It provides independence, auditability and recoverability of business effects.
Decision trade-off

Provider-neutral domain states

Alternative
Propagate CoinGate statuses through the application
Trade-off
Requires mapping and maintaining an internal state machine.
Rationale
It protects the product core from provider changes and semantic differences.
Decision trade-off

Out-of-band reconciliation

Alternative
Rely only on webhooks
Trade-off
Adds periodic processes and operational tooling.
Rationale
It restores state after missed events or integration outages.

Key lessons learned

  • Design the obligation lifecycle before choosing provider endpoints.
  • Hosted checkout does not remove the need for the product to own an auditable payment state.
  • Idempotency is a domain requirement, not merely a webhook implementation detail.
  • Reconciliation should be designed from the first version rather than added as an emergency tool later.
  • The provider should remain a replaceable payment rail when business logic does not require tight coupling to its model.
09 / Relevance

Which organisations this model is relevant for

SaaS with international customers

When some customers want to settle invoices in stablecoins while the company does not want to build its own custody and payment processing.

B2B invoicing

When crypto is an alternative rail for settling an existing business obligation.

Commerce and digital platforms

When checkout needs crypto while orders, fulfilment and accounting remain in the conventional backend.

Products requiring faster launch

When a managed provider reduces implementation scope without giving up ownership of product payment state.

Stablecoin payments / managed provider

Want to add USDC without building your own payment processor?

We can design the payment intent, provider integration, webhooks, ledger, reconciliation and operations so stablecoin becomes another payment rail rather than a separate technology silo.

Design your payment architecture
10 / Scope

Key confirmed facts

The following statements summarise the confirmed product scope and contain no unapproved growth data.

  1. 1

    The client project is protected by an NDA and the organization name is not published.

  2. 2

    The implementation uses CoinGate as the external payment rail.

  3. 3

    USDC is the payment asset described in the published case-study architecture.

  4. 4

    The product owns an internal payment intent linked to the business document.

  5. 5

    Callbacks are handled idempotently before business effects are applied.

  6. 6

    The internal ledger is independent from provider balance and dashboard.

  7. 7

    Reconciliation links payment intent, provider order and settlement.

  8. 8

    Refunds are recorded as events related to the original payment.

  9. 9

    The architecture separates domain states from provider status naming.

  10. 10

    Volumes, settlement values and percentage KPIs are not published.

11 / Editorial responsibility

Prepared and reviewed by

Prepared by

Softech Product & Engineering

Prepared from the anonymized architecture of an NDA-protected implementation and the scope that can be publicly disclosed.

About Softech
Reviewed by

Softech Technical Review

Reviewed for architectural consistency, confidentiality boundaries and absence of unverified KPIs or client-identifying data.

About Softech
Published: 2026-08-10Last updated: 2026-08-10

FAQ

Why did we keep payment logic outside CoinGate?

The provider is the payment rail, while invoice, order, entitlement and business status belong to the product. An internal payment intent and ledger prevent the application from depending on a single callback or provider dashboard.

What happens when a webhook is delivered more than once?

Every event is handled idempotently. Re-delivery of the same callback cannot credit the payment twice or trigger downstream workflows a second time.

Can the provider settle the payment into fiat?

The architecture supports provider-managed settlement. The product layer preserves its own payment state and reconciliation data independently of the settlement currency chosen with the provider.

How are refunds handled?

A refund is a separate workflow linked to the original payment intent. The system does not overwrite payment history; it records a new event and its relationship to the original settlement.

Does the case study disclose client information?

No. The client name, volumes, commercial terms and operational data are excluded. We describe the architecture pattern and technical scope that can be disclosed without breaching the NDA.