Skip to content

/transaction/confirm

Request

Confirms a previously created transaction and finalizes it for processing.

Purpose

Confirms a transaction that was created with a funding type that requires explicit confirmation (e.g., cash, debit card).

When to use

Use this endpoint after a transaction has been created and the payment has been collected or authorized:

  • Cash transactions: after the cash has been received at the branch
  • Debit card transactions: after the card payment has been approved (requires last4CardNumber and approvalCode)

What happens next

  1. Validates the transaction exists and belongs to the branch
  2. Releases any compliance holds (Hold 87)
  3. For debit card funding, registers the card payment details
  4. Updates transaction status to CONFIRMED in DynamoDB
  5. Generates and returns the transaction receipt

Authentication

Requires x-client-id and x-secret-key headers.

Notes

  • If the transaction was already confirmed, returns the existing receipt without re-processing.
  • Transactions with funding type U (undefined) or H (hold/remote) cannot be confirmed through this endpoint.

Common errors

  • 400 Validation errors, invalid branchId, missing debit card fields
  • 401 Invalid credentials
  • 404 Transaction not found
  • 422 Transaction not eligible for confirmation
  • 500 Internal error
Headers
x-client-idstring, [ 16 .. 64 ] charactersrequired

Unique identifier assigned to the integrating client. It determines the validation rules, allowed values, compliance policies, and operational limits applied to the request.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

Example:string
x-secret-keystring, [ 32 .. 128 ] charactersrequired

Secret authentication key associated with the client. It is used to authorize the request and must be kept strictly confidential.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

Example:string
Bodyapplication/jsonrequired
uuidstring, [ 32 .. 60 ] charactersrequired

Unique identifier of the transaction.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

transactionContextobject

Context of the transaction.

Error codes: type=400002

receiptFormatstring, [ 3 .. 4 ] characters

Output format for the receipt generated after confirmation. Supported values: html (default) or pdf.

Error codes: type=400002, minLength=400003, maxLength=400004, allowedValues=400010

Enum:"html""pdf"
transactionInformationobject

Represents the financial, operational, and processing configuration of the transaction.

Contains all parameters required to calculate, validate, route, and execute the transfer, including amounts, currencies, delivery method, funding source, fees, and payout instructions.

All fields are validated against business rules, compliance policies, and operational constraints before the transaction is accepted for processing.

Error codes: type=400002

POST
/transaction/confirm
curl -i -X POST \
  https://sandbox-viablocks.viamericas.io/transaction/confirm \
  -H 'Content-Type: application/json' \
  -H 'x-client-id: string' \
  -H 'x-secret-key: string' \
  -d '{
    "uuid": "eddcf7fb-d2ab-4f4b-9d04-3799304f773c",
    "transactionContext": {
      "branchId": "A00765",
      "cashierId": "TEST.T"
    },
    "receiptFormat": "html"
  }'

Responses

Response success

Bodyapplication/json
statusstring

Request status (success, error, etc.).

messagestring

Descriptive message about the operation result.

foliostring

Money transfer tracking number (optional)

transaction_idstring

Unique identifier of the generated transaction.

receipt_urlstring

Publicly accessible URL where the generated receipt file (HTML or PDF) is hosted.

receipt_htmlstring

Full POS-formatted HTML content of the receipt, ready for rendering or thermal printing.

Response
{ "status": "success", "message": "The transaction has been confirmed.", "folio": "123456789", "transaction_id": "A00765-8", "receipt_url": "https://s3.viamericas.io/receipts/eddcf7fb-d2ab-4f4b.html", "receipt_html": "<div style=\"font-family:monospace\">VIAMERICAS CORP...</div>" }