This endpoint is only relevant to Forage SDK integrations.
If you’re building with the Fully Hosted or Custom Forage Checkout UI instead, then use the
OrderRefund
endpoints.
This endpoint does not return the customer's updated EBT balance.
The
receipt
value isnull
when thePaymentRefund
is first created and until receipt data is available. Pass theref
returned in the response in periodic GET requests to/payments/{payment_ref}/refunds/{refund_ref}/
until thestatus
of thePaymentRefund
issucceeded
. At that point, thereceipt
data, including thebalance
, is up-to-date.
A POST
request to /payments/{payment_ref}/refunds/
tells Forage’s servers to refund an existing Payment
object. Funds are refunded to the originally charged PaymentMethod
.
On success, Forage automatically begins processing the refund, so this request has immediate financial side effects.
The API responds with a Forage PaymentRefund
object that represents the transaction and an HTTP 201
status code.
HTTP 201
201
HTTP 201
is returned even if the refund attempt fails because Forage creates a PaymentRefund
object to preserve a record of the refund regardless of the transaction outcome. To confirm that the outcome is a success, check that the status
of the PaymentRefund
is succeeded
. If the status is failed
, then send a GET to /payments/{payment_ref}/refunds/
. Find the ref
for the PaymentRefund
and inspect its associated receipt.message
field for a description of the error.