Payments

Refund Payment

Process a full refund for a payment.

Refunds always settle the remaining refundable balance for the selected payment. If that payment is part of a shared Moyasar charge, set allow_refund_multiple_related_payments to true to refund every payment that was tied to the same charge.

post/api/v2/payments/{payment_id}/refund

Path parameters

payment_idstring uuid required

Unique identifier (UUID) of the payment to refund

Unique identifier (UUID) of the payment to refund

Request body

refund_reason'REQUESTED_BY_CUSTOMER' | 'DUPLICATE' | 'FRAUDULENT' | 'OTHER' required
refund_notestring nullable

Optional note explaining the refund reason

allow_refund_multiple_related_paymentsboolean

If true and the customer paid multiple payments at the same time (single transaction), refund all related payments instead of only the requested payment. Use this when the payment was part of a multi-payment transaction.

Response

Successful Response

idstring uuid

Unique identifier (UUID) of the payment

amountstring

Payment amount

currency'SAR' | 'USD' | 'EUR' | 'GBP' | 'AED' | 'BHD' | 'KWD' | 'OMR' | 'QAR'

ISO 4217 currency codes supported by Moyasar.

Includes all currencies supported by Moyasar payment gateway.

scheduled_onstring

Scheduled date and time for the payment

type'INITIAL' | 'INSTALLMENT' | 'SPLIT_PREPAID' | 'SPLIT_REMAINDER'
payment_method'MADA' | 'MASTERCARD' | 'VISA' | 'APPLE_PAY' | 'SAMSUNG_PAY' | 'AMEX' | 'CASH' | 'PGW_CARD_UNSPECIFIED' | 'BANK_TRANSFER' | 'CARD' | 'QURRAH' | 'BNPL'
current_status'PENDING' | 'PROCESSING' | 'FAILED_INITIATION' | 'SUCCEEDED' | 'FAILED' | 'CANCELED' | 'UNDER_REVIEW' | 'EXPIRED' | 'SETTLED' | 'REFUNDED' | 'PARTIALLY_REFUNDED'
payed_atstring date-time nullable

Date and time when the payment was completed

refunded_atstring date-time nullable

Date and time of the most recent refund

refund_reason'REQUESTED_BY_CUSTOMER' | 'DUPLICATE' | 'FRAUDULENT' | 'OTHER'
refund_notestring nullable

Note for the most recent refund if set

amount_refundedstring

Sum of all refund rows for this payment

latest_pgw_messagestring nullable

Latest payment gateway message for this payment

amount_in_smallest_unitinteger

Payment amount in smallest currency unit (e.g. halala for SAR).

Changes

No recorded changes to this endpoint across all 1 revision of this API.