Skip to main content

Transaction Handling

In Wompi there are many ways you can know the state of a transaction once a payment it's initiated by a customer on your business.

Email notifications

Each time a transaction is completed on Wompi, both the user and the business get an email with the result of the transaction. The sent email contains the details of the payment method and the transaction. This is the most simple way for both parties to be notified of a transaction without having to setup anything else.

How to identify a transaction

Once a transaction is created on Wompi, there are several kinds of data available that will allow you to identify it, either to cross-reference it with information from internal systems or simply to have traceability of your sales. The most important attributes that you need to keep in mind when Wompi informs you about a transaction or when you consult the information on our API are the following:

  • id: The unique identifier for a transaction created on Wompi. This will be the text that will allow you to uniquely identify a transaction on our system. A transaction id looks like the following: 01-903100443-27458
  • reference: Is the reference that you as a business previously assigned to the transaction when you created it, or the one that is automatically generated in the case of payment links. This must be unique. It can be any kind of text, we recommend any alfanumeric text, with or without dashes or underscores, for example: 3893893 and wqu3Xshw3aaKgM42S.
  • customer_email: The paying customers's email.
  • amount_in_cents: The transactions amount in cents. For example, for $44.44 it's 4499.
  • created_at: The date and time in UTC at which the transaction was createe (GMT-0), for example 2018-06-12T13:14:01.000Z.
  • finalized_at: The date and time in UTC at which a transaction passed to its final status (GMT-0), for example 2018-06-12T13:14:01.000Z.
  • payment_method_type: Payment method, which can be CARD, CLAVE.

Transaction Status

The status or state of a transaction represents the point in the payment process that a transaction is currently in. The status allows you to know if the transaction is still pending (PENDING) or if it has reached a final state.

The final state for a transaction can be one of the following:

  • APPROVED: accepted transaction.
  • DECLINED: declined transaction.
  • VOIDED: anuled transaction (only applies in payment with card).
  • ERROR: internal specific error of the payment method.

Obtaining information of a transaction

Aditional to the email notifications Wompi offers you, in the following you'll find ways to obtain complete information about a transaction:

  1. Actively: sending a request to our API. Like the endpoint GET /v1/transactions/{ID_DE_TRANSACCION}.
  2. Passively: through our event transaction.updated. To read more on how events work in Wompi Click here.