Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

5. Display the transaction context

Handle ContactlessPaymentSession.Event.transactionCompleted to show the payment status to the end user.

This event includes a TransactionContext that contains key details about the transaction.

Handle the completion event

In your ContactlessPaymentSession.eventStream loop, handle:

  • .transactionCompleted(let transactionContext)

Use transactionContext to update your UI and trigger any follow-up actions.

TransactionContext fields

TransactionContext typically includes:

  • aid: EMV application identifier (AID).

  • amount: Transaction amount (formatted for display in your UI).

  • rawAmount: Raw amount value as received from the terminal.

  • currencyCode: ISO-4217 numeric currency code.

  • transactionDate: Transaction date (YYMMDD, BCD-encoded).

  • transactionType: Transaction type code (for example, purchase vs refund).

  • digitalCardID: Digital card identifier used for the payment.

  • scheme: Payment network (for example, Visa or Mastercard).

  • isTransit: Indicates whether the transaction is a transit transaction.

  • transactionID: Transaction identifier.

Refer to the following example code snippet for implementation instructions:

Last updated

Was this helpful?