Refund a pay-in

Refunds a completed mobile wallet pay-in, in full or in part. merchant_refund_id is the idempotency key: replaying it for the same payment returns the existing refund with its current status. Reusing the key with a different amount or for another operation returns 409. Refund keys must not reuse payment keys. Omit amount to refund the full remaining amount. The final refund status (succeeded/failed) is delivered by webhook.

Body
required
application/json
  • id
    Type: string
    required

    The payment id (data.id from the pay-in response)

  • merchant_refund_id
    Type: string
    max length:  
    100
    required

    Your unique refund id and idempotency key (letters, digits, -, _; up to 100)

  • amount
    Type: string

    Amount to refund (up to 2 decimal places). Omit to refund the full remaining amount

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/sdk-partner/alternative-mobile-pay/refund
curl https://pay-in-api.mrcr.io/sdk-partner/alternative-mobile-pay/refund \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Sdk-Partner-Token: YOUR_SECRET_TOKEN' \
  --header 'X-Signature: YOUR_SECRET_TOKEN' \
  --data '{
  "id": "28a3c125a28075453",
  "merchant_refund_id": "refund-1",
  "amount": "5.00"
}'
{
  "status": 200,
  "data": {
    "id": "c9051779-c818-4edb-8133-2e309f70f484",
    "status": "pending",
    "refund_of": "28a3c125a28075453",
    "amount": "5.00",
    "remaining_refundable": "5.00"
  }
}