Payments
Cancel or Refund a Payment with Transaction
Cancels or refunds a payment based on the status of a specific transaction ID.
POST
This service allows you to cancel or refund an existing payment. Our system will identify if a cancellation or a refund is necessary based on the transaction status related to the
Note that this request requires an
transaction_id provided on the request. This is for certain scenarios where you want to be more specific about the actions taken on the payments lifecycle. This service performs the following functions based on the status of the transaction:
- Cancels the payment if it has not been captured.
- Refunds the payment if it has been captured.
RefundsIf you fill out the amount field, the refund will be partial. Otherwise, it will create a complete refund. The funds will be refunded to the payment method that was originally charged.The response returns a
REFUND transaction with its own status: SUCCEEDED when the refund is approved, or PENDING while the provider confirms it. REFUNDED is a payment status, not a transaction status. After a complete refund succeeds, the payment status and sub_status are REFUNDED.Payments with a Yuno promotionA refund is counted on what the customer paid,
amount.value minus discount_amount. A complete refund returns that amount, and an amount above what is left to refund is rejected with 400 INVALID_PARAMETERS. Cancelling voids the authorization for that amount. See Promotions.Partially approved paymentsFor a card payment sent with
payment_method.detail.card.partial_approval: true and approved for less than requested, refunds are limited to amount.authorized. A complete refund returns amount.authorized, and an amount above what is left of it is rejected with 400 INVALID_PARAMETERS.X-Idempotency-Key. Check the Authentication page for more information.Authorizations
Path Parameters
Body
application/json
Indicating the reason for the cancellation or refund. If set, possible values are DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER, and REVERSE. Use REVERSE to request an automatic reverse of the recipient funds when a recipient is involved in the transaction.
Available options:
DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER, REVERSE Response
201
- Full Refund
- Partial Refund
- Cancel