HSRCPAY Documentation

Request Trace and Observability

Request id, trace id, routing plan, and event correlation.

A payment question like "why did it end this way?" is rarely answered by a single field. Request and trace identifiers let you combine routing plans, charge attempts, and event records on the same payment.

Request and trace

FieldUsage
request_idTags a single API call (for example, one confirm)
trace_idReads steps in the same workflow together

These fields are for correlation; they do not authenticate or carry secrets. They should not be logged alongside PAN or credentials.

What do you correlate after confirm?

Typical questions:

  • Which confirm request started this payment?
  • Which provider candidate was tried nth?
  • Which charge is DECLINED, which is CAPTURED?
  • Which payment ID did the webhook arrive with?

request_id / trace_id fields in routing plans and event records make this matching easier.

Relationship fields in event records

FieldPurpose
payment_idPrimary payment record
charge_idProvider attempt
checkout_session_idHosted checkout source
routing_plan_idWhich plan routed the payment
refund_idRefund flow

Operations and support teams should start with payment_id, then charge_id and the event timeline if needed.

Reading order in the dashboard

  1. Payment status and amount.
  2. Charge list (attempt count, status).
  3. Routing plan (candidate order, current index).
  4. Event list and detail payload (masked).

A redirect result alone is not final proof; close the loop with payment GET or a webhook.

Example correlation (narrative)

Confirm request
  → routing plan is created (request/trace written)
  → charge attempt(s)
  → domain events
  → webhook delivery
  → dashboard shows all of them on the same payment ID

Security

  • Trace ID is not a security token.
  • Event payload is for debug; sensitive fields should be masked.
  • Sandbox trace does not guarantee production behavior; it is for process habit.

On this page