Beam logo

Transactions

A transaction is immutable and contains information about a charge or refund that has been successfully processed. This also include information about the fees associated with that charge or refund. Beam stores these transactions for you for every successful charge or refund processed. These transactions can then be viewed using Lighthouse dashboard or through API calls.

There are 3 types of transactions:

  • PAYMENT: A transaction that is created for a successful charge.
  • VOID: A transaction that is created for a charge that has been successfully voided.
  • REFUND: A transaction that is created for a charge that has been successfully refunded.

You can see more details about the API endpoints in the API Reference.

Example lifecycle of a transaction object.

transactions

  1. Shopper wants to pay the merchant for a product or service.

  2. Merchant sends a request to create a payment link via POST /api/v1/payment-links.

  3. Beam returns a new created payment link object to merchant with the id of the payment link, and the URL of the link.

  4. Merchant sends the payment link to shopper by extracting the URL field from the payment link object.

  5. Shopper is directed to the Beam-hosted checkout page by the link, pays by filling in information in the checkout page.

  6. On a successful payment, Beam creates and stores a transaction object of PAYMENT type.

  7. If configured, Beam sends a webhook of charge.succeeded event type of the to the merchant.

  8. Merchant processes the webhook and returns an acknowledgment to Beam.

  9. Beam then redirect shopper to payment completion page.

  10. Shopper wishes to make a refund of the purchase.

  11. Merchant sends a refund request via the Lighthouse dashboard or the refund API via POST /api/v1/refunds.

  12. On a successful refund, Beam creates and stores a transaction object of either VOID or REFUND type based on the available refund options.

  13. Beam returns a refund object to the merchant with the id of the refund object.

  14. Merchant notifies shopper that the refund is successfully processed.

  15. Afterward, if the merchant wishes to know the details of the transactions, they can send a request to retrieve information about the transaction via GET /api/v1/transactions/{transactionId} this transactionId can be either the ID of the charge or refund.

  16. Beam returns a transaction object with the provided ID. The transaction object will have information about the charge or refund such as the amount, fees, and status.

TIP

You can read more details about the webhook in the Webhook guide.