Skip to content

Events ​

A full list of events Bahn may send to your webhook endpoint.

Each section below lists the events for a given resource type and documents the fields in the data object of the notification. For the delivery format, envelope fields, and signature verification, see Introduction and Signatures.


PaymentIntent ​

Events triggered by lifecycle changes on a PaymentIntent.

Event NameDescription
payment_intent.status.requires_payment_methodThe payment intent is waiting for a payment method to be attached.
payment_intent.status.requires_actionAdditional action is required from the customer (e.g. 3DS challenge).
payment_intent.status.processingThe payment is currently being processed.
payment_intent.status.succeededThe payment was completed successfully.
payment_intent.status.canceledThe payment intent was canceled.
payment_intent.status.requires_captureThe payment has been authorized and is awaiting capture.
payment_intent.status.requires_confirmationThe payment intent is ready to be confirmed.
payment_intent.payment_failedThe payment attempt failed. Check last_payment_error in the data for the reason.

Data Fields ​

data_type is payment_intent.

FieldTypeDescription
idstringUnique identifier of the PaymentIntent.
statusstringCurrent status. One of: requires_payment_method, requires_confirmation, requires_action, requires_capture, processing, succeeded, canceled.
amountinteger (int64)The payment amount in the smallest currency unit (e.g. cents; whole đồng for VND).
currencystringISO 4217 numeric currency code (e.g. "704" for VND).
payment_method_idstringID of the PaymentMethod attached to this PaymentIntent.
payment_methodobjectExpanded PaymentMethod object — convenience copy of the payment_method_id resource. See PaymentMethod below.
latest_charge_idstringID of the most recent Charge created for this PaymentIntent.
last_payment_errorobject|nullDetails of the last error, if the payment failed. See LastPaymentError below.
metadataobject|nullSet of key-value pairs for storing additional information. null if none.
created_atstringISO 8601 timestamp of when the PaymentIntent was created.
updated_atstringISO 8601 timestamp of the last update.
canceled_atstring|nullISO 8601 timestamp of when the PaymentIntent was canceled. null if not canceled.

PaymentMethod ​

Describes how the customer is paying. The shape of the type-specific sub-object depends on type — only the sub-object matching type is present.

FieldTypeDescription
idstringUnique identifier of the PaymentMethod. Matches payment_method_id on the parent PaymentIntent.
typestringPayment method type. One of: napas_qr, card.
napas_qrobjectPresent when type is napas_qr. Currently an empty object ({}); reserved for future Napas-specific fields.
cardobjectPresent when type is card. See Card below.
Napas QR example ​
json
{
  "id": "5LYq5DYyyrzP8z99ShSM3Z",
  "type": "napas_qr",
  "napas_qr": {}
}
Card ​

Card metadata captured at the time the PaymentMethod was created. Only the non-sensitive subset is returned — full PAN and CVV never appear in webhooks.

FieldTypeDescription
brandstringCard network. e.g. visa, mastercard, amex, jcb.
last4stringThe last four digits of the card number.
exp_monthintegerTwo-digit expiration month (1–12).
exp_yearintegerFour-digit expiration year.
fingerprintstringStable, opaque identifier for this card. Useful for detecting that the same physical card was used across multiple PaymentMethods without storing the PAN.
Card example ​
json
{
  "id": "DoSLcGdpuXrE7DZtgsTQ4m",
  "type": "card",
  "card": {
    "brand": "visa",
    "last4": "1116",
    "exp_month": 12,
    "exp_year": 2031,
    "fingerprint": "PH1So8jjwTRm46G/cnJxEcIxNiNLHMWSe2BLvIPiR9U="
  }
}

LastPaymentError ​

FieldTypeDescription
charge_idstringID of the Charge that failed.
payment_method_idstringID of the PaymentMethod used in the failed attempt.
codestringMachine-readable error code.
messagestringHuman-readable description of the error.
json
{
  "merchant_id": "c_ticket",
  "event_id": "a58ab5b3-ffd2-404e-9774-974d74899a26",
  "event_name": "payment_intent.status.succeeded",
  "data_type": "payment_intent",
  "data": {
    "id": "8Eg7sndPybDGj8sz2TBhte",
    "status": "succeeded",
    "amount": 123888,
    "currency": "704",
    "payment_method_id": "5LYq5DYyyrzP8z99ShSM3Z",
    "payment_method": {
      "id": "5LYq5DYyyrzP8z99ShSM3Z",
      "type": "napas_qr",
      "napas_qr": {}
    },
    "latest_charge_id": "ACG12NOCPB8HFS",
    "metadata": null,
    "created_at": "2026-05-19T07:20:34.358398567Z",
    "updated_at": "2026-05-19T07:24:20.810341464Z",
    "canceled_at": null
  },
  "published_at": "2026-05-19T14:24:21.612679167+07:00"
}

Charge ​

Events triggered by status changes and actions on a Charge.

Event NameDescription
charge.status.pendingThe charge has been created and is pending processing.
charge.status.succeededThe charge was successfully processed.
charge.status.failedThe charge failed.
charge.capturedThe charge was captured after a prior authorization.
charge.paidThe charge has been marked as paid.
charge.refundedA refund has been issued against the charge.

Data Fields ​

data_type is charge.

FieldTypeDescription
idstringUnique identifier of the Charge.
statusstringCurrent status. One of: pending, succeeded, failed.
payment_intent_idstringID of the PaymentIntent associated with this Charge.
amountstring (int64)The charged amount in the smallest currency unit (e.g. cents).
currencystringThree-letter ISO 4217 currency code.
balance_transaction_idstringID of the balance transaction for a successful charge.
failure_balance_transaction_idstringID of the balance transaction created when the charge failed.
metadataobjectSet of key-value pairs for storing additional information.
created_atstringISO 8601 timestamp of when the Charge was created.
updated_atstringISO 8601 timestamp of the last update.
json
{
  "merchant_id": "mer_123",
  "event_id": "3a7bc210-1234-4abc-def0-1234567890ab",
  "event_name": "charge.status.succeeded",
  "data_type": "charge",
  "data": {
    "id": "ch_abc123",
    "status": "succeeded",
    "payment_intent_id": "pi_xyz789",
    "amount": "10000",
    "currency": "704",
    "balance_transaction_id": "txn_def456",
    "failure_balance_transaction_id": "",
    "metadata": {
      "order_id": "order_001"
    },
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-01-01T00:01:00Z"
  },
  "published_at": "2026-01-01T07:01:00+07:00"
}

Refund ​

Events triggered by lifecycle status changes on a Refund.

Event NameDescription
refund.status.pendingThe refund has been initiated and is pending processing.
refund.status.requires_actionAdditional action is required to complete the refund.
refund.status.succeededThe refund was completed successfully.
refund.status.failedThe refund failed.
refund.status.canceledThe refund was canceled.

Data Fields ​

data_type is refund.

FieldTypeDescription
idstringUnique identifier of the Refund.
statusstringCurrent status. One of: pending, requires_action, succeeded, failed, canceled.
reasonstringReason for the refund. One of: duplicate, fraudulent, requested_by_customer.
charge_idstringID of the Charge being refunded.
payment_intent_idstringID of the PaymentIntent associated with this refund.
amountstring (int64)The refunded amount in the smallest currency unit (e.g. cents).
currencystringThree-letter ISO 4217 currency code.
metadataobjectSet of key-value pairs for storing additional information.
created_atstringISO 8601 timestamp of when the Refund was created.
updated_atstringISO 8601 timestamp of the last update.
json
{
  "merchant_id": "mer_123",
  "event_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "event_name": "refund.status.succeeded",
  "data_type": "refund",
  "data": {
    "id": "re_abc123",
    "status": "succeeded",
    "reason": "requested_by_customer",
    "charge_id": "ch_xyz789",
    "payment_intent_id": "pi_def456",
    "amount": "5000",
    "currency": "704",
    "metadata": {
      "note": "customer request"
    },
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-01-01T00:01:00Z"
  },
  "published_at": "2026-01-01T07:01:00+07:00"
}

SetupIntent ​

Events triggered by lifecycle changes on a SetupIntent (saving a card for future use). Use setup_intent.status.succeeded to learn when a card is verified and read the resulting payment_method_id for later CIT/MIT charges.

Event NameDescription
setup_intent.status.requires_payment_methodInitial state, or reset after a failed verification — the customer can (re)submit a card.
setup_intent.status.requires_confirmationThe setup intent is ready to be confirmed.
setup_intent.status.requires_actionAdditional action is required from the customer (the mandatory 3DS challenge).
setup_intent.status.processing3DS completed; the card-verification authorization is being processed.
setup_intent.status.succeededThe card was verified and saved. payment_method_id is now populated and reusable.
setup_intent.status.canceledThe setup intent was canceled.

Data Fields ​

data_type is setup_intent.

FieldTypeDescription
idstringUnique identifier of the SetupIntent.
statusstringCurrent status. One of: requires_payment_method, requires_confirmation, requires_action, processing, succeeded, canceled.
usagestringHow the saved card will be reused: on_session (CIT) or off_session (MIT).
descriptionstringMerchant-provided description.
payment_method_idstringID of the saved PaymentMethod. Empty until the intent reaches succeeded.
customer_idstringThe customer the card is saved against.
latest_setup_attempt_idstringID of the most recent verification attempt (the card-verification authorization).
metadataobjectArbitrary key-value pairs supplied at creation.
created_atstringISO 8601 timestamp of when the SetupIntent was created.
updated_atstringISO 8601 timestamp of the last update.
json
{
  "merchant_id": "mc_5g3rNHWpoH",
  "event_id": "f7d8cae4-6ad8-439e-899d-eff2c03103f3",
  "event_name": "setup_intent.status.requires_payment_method",
  "data_type": "setup_intent",
  "data": {
    "id": "15rEusGuKrkAXnK4W9p63c",
    "status": "requires_payment_method",
    "usage": "off_session",
    "description": "",
    "payment_method_id": "",
    "customer_id": "BAuufV3pHK8PxYvg7TonJC",
    "latest_setup_attempt_id": "",
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    },
    "created_at": "2026-06-30T10:01:49.688965063Z",
    "updated_at": "2026-06-30T10:01:49.710943Z"
  },
  "published_at": "2026-06-30T17:01:50.459672255+07:00"
}

ReaderAction ​

Events triggered by lifecycle changes on a ReaderAction (a payment action dispatched to a card reader or terminal). Use these to track the state of an in-progress reader action and to react when it succeeds, fails, or is canceled.

Event NameDescription
reader_action.status.in_progressThe reader action has been dispatched to the terminal and is running.
reader_action.status.succeededThe reader action completed successfully.
reader_action.status.failedThe reader action failed. Check failure_code and failure_message for the reason.
reader_action.status.canceledThe reader action was canceled (by the customer, the merchant, or the terminal).

Data Fields ​

data_type is reader_action.

FieldTypeDescription
idstringUnique identifier of the ReaderAction.
reader_idstringID of the device that runs the action. Several readers can share one terminal_id, so use this field to identify the till.
merchant_idstringID of the merchant that owns the reader.
account_idstring|nullID of the account the reader belongs to. null if not applicable.
terminal_idstringID of the terminal bound to the reader.
typestringAction type. One of: process_payment_intent, confirm_payment_intent, collect_payment_method, refund_payment.
statusstringCurrent status. One of: in_progress, succeeded, failed, canceled.
target_idstring|nullID of the target resource the action operates on (e.g. the PaymentIntent for process_payment_intent). null if not applicable.
failure_codestring|nullMachine-readable failure code. Present when status is failed.
failure_messagestring|nullHuman-readable failure description. Present when status is failed.
failure_decline_codestring|nullCard-network decline code when the failure came from an issuer decline. null otherwise.
process_payment_intentobject|nullPresent when type is process_payment_intent. Describes the payment being processed on the reader. See ProcessPaymentIntent below.
created_atstringISO 8601 timestamp of when the ReaderAction was created.
updated_atstringISO 8601 timestamp of the last update.

ProcessPaymentIntent ​

Describes a process_payment_intent action running on the reader.

FieldTypeDescription
process_configobjectRuntime configuration for the action. See ProcessConfig below.
amountinteger (int64)The payment amount in the smallest currency unit (whole đồng for VND). Omitted until the amount is known.
currencystringISO 4217 numeric currency code (e.g. "704" for VND). Omitted until the currency is known.
payment_method_detailsobject|nullPayment method chosen for this action. Omitted until the method is chosen. See PaymentMethodDetailsPreview below.
ProcessConfig ​
FieldTypeDescription
enable_customer_cancellationbooleanWhether the customer can cancel the action from the reader UI.
PaymentMethodDetailsPreview ​

The shape of the type-specific sub-object depends on type. Only the sub-object matching type is present.

FieldTypeDescription
typestringPayment method type. One of: card_present, napas_qr, visa_qr.
card_presentobjectPresent when type is card_present. { "brand": string, "last4": string }.
napas_qrobjectPresent when type is napas_qr. See NapasQr below.
visa_qrobjectPresent when type is visa_qr. { "brand": string, "last4": string }.
NapasQr ​
FieldTypeDescription
servicestringNapas service. One of: local, global.
bank_codestringNapas bank code of the destination account.
account_holder_namestringAccount holder name displayed on the reader. Empty if not provided.

Example ​

json
{
  "merchant_id": "mer_123",
  "event_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "event_name": "reader_action.status.succeeded",
  "data_type": "reader_action",
  "data": {
    "id": "ra_5g3rNHWpoH",
    "reader_id": "rdr_9kLmNpQrSt",
    "merchant_id": "mer_123",
    "terminal_id": "tm_7aBcDeFgHi",
    "type": "process_payment_intent",
    "status": "succeeded",
    "target_id": "8Eg7sndPybDGj8sz2TBhte",
    "failure_code": null,
    "failure_message": null,
    "failure_decline_code": null,
    "process_payment_intent": {
      "process_config": {
        "enable_customer_cancellation": true
      },
      "amount": 123888,
      "currency": "704",
      "payment_method_details": {
        "type": "napas_qr",
        "napas_qr": {
          "service": "local",
          "bank_code": "970416",
          "account_holder_name": "NGUYEN VAN A"
        }
      }
    },
    "created_at": "2026-05-19T07:20:34.358398567Z",
    "updated_at": "2026-05-19T07:24:20.810341464Z"
  },
  "published_at": "2026-05-19T14:24:21.612679167+07:00"
}

Developers