Skip to main content

C2A-03 Checkout

Hands a fully resolved order to Azotte. Submission returns immediately with 202 Accepted and a trackingNumber — actual payment authorization, 3DS, capture, and entitlement delivery happen asynchronously through Kafka workers.

You then poll the status endpoint until the order reaches a terminal state.

Concepts

  • Async — HTTP request enqueues the order on Kafka. The response is not a payment confirmation.
  • Tracking — every checkout returns a trackingNumber — the only identifier needed to poll status.
  • Webhook-first — a payment is Captured only after PSP webhook confirmation. The status endpoint surfaces this.
  • 3DS-aware — when the PSP requires a 3DS challenge, the status response carries redirectInstructions (HTML or URL) to forward to the end-user.

Base Route

/api/c2a/offer

The Checkout controller shares the /c2a/offer route prefix with the Offer controller. Separate controllers, separate endpoints. Standard C2A headers (x-api-key, x-tn, Content-Type: application/json) apply.

Endpoints

#MethodPathPurpose
C2A-03-01POST/api/c2a/offer/checkoutSubmit Checkout
C2A-03-02GET/api/c2a/offer/checkout/{trackingId}/statusGet Checkout Status

Behaviour & Guarantees

  • Idempotency — submit the same correlationId twice and Azotte will not double-charge. Use a stable correlationId per business order.
  • Webhook-first captureCHECK_OUT_DONE is published only once the PSP webhook is verified and the payment is captured. Don't deliver entitlements on the client side; Azotte's subscription provider has already done it before this status is reported.
  • Amounts — all amounts in offer / response are in milpieces (1/1000 minor-unit). Display values are milpieces / 100.
  • Tenant isolation — a trackingNumber is scoped to the tenant in x-tn. Cross-tenant lookup returns 404.

Error Statuses

messageCodeMeaning
CHECK_OUT_PROCESSINGAsync worker still running.
CHECK_OUT_3DS_REQUIRED3DS challenge required.
CHECK_OUT_DONETerminal success.
CHECK_OUT_FAILEDTerminal failure.
OFFER_EXPIREDOffer past expiresAt.
OFFER_NOT_PURCHASABLEShowcase offer submitted to checkout.
ORDERED_ITEM_NOT_FOUNDtrackingId unknown for this tenant.

Source

  • Controller: Azotte.Api.Gateway.Controllers.C2A.C2A_03_CheckoutController
  • Service: Azotte.Business.Checkout.CheckOutService
  • DTOs: Azotte.Business.Checkout.Dto/*
  • Background processing: Azotte.Services.CheckOutCenter (worker), OrderHandler, OrderItemProcessorFactory
  • Postman: documents/PostmanSamples/C2A API.postman_collection.json