Refunds
A refund object is an attempt to refund on a successful charge.
A refund can be in one of the following states:
-
PENDING
: The refund is being processed and the final outcome is not yet known. -
SUCCEEDED
: The refund has been successfully processed. A transaction will be created for this refund. -
FAILED
: The refund is unable to be processed.
You can see an example of the API in the API Reference.
Example lifecycle of an API refund
-
Shopper wishes to make a refund of a purchase previously made.
-
Merchant sends a refund request to Beam via the refund API (
POST /api/v1/refunds
). -
Beam creates and stores a refund object with
PENDING
status. -
Beam returns an id of the refund object created for the merchant to store for later lookup.
-
Merchant stores the refund id and returns a message to the shopper indicating that the refund is being processed.
-
After the refund has been successfully processed, Beam updates the refund object status to
SUCCEEDED
. -
Shopper wishes to know the status of the refund being processed.
-
Merchant sends a request to retrieve a refund object with the id previously stored via the refund API (
GET /api/v1/refunds/{refundId}
). -
Beam returns a refund object with the provided id. The refund object will have a status of
SUCCEEDED
and will contain information about the refund such as the amount. -
Merchant decodes the response and returns information based on the response to the shopper.