fulfillments

Refund a settled payment (service)

Service-key only (today enforcer-mp-merchant). Raises a refund of the settled payment id: an OPEN request the account that was paid settles from the wallet that received the sale, sent to the wallet that actually paid it.

The body names an amount and nothing else. Destination (receiver_wallet = the original's payer_address), payer (sender_user_id = the original's receiver_user_id), the wallet allowed to settle it (expected_payer_wallet = the original's receiver_wallet), token and chain are all read from the original. A caller that names the wrong payment refunds money to the person who paid THAT payment.

Refuses more than is refundable: what actually arrived (routed settlements) minus refunds already live or confirmed against it, checked under a lock on the original so two refunds cannot each claim the full balance. The refusal carries refundable_uoa.

post/service/fulfillments/{id}/refunds

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/service/fulfillments/{id}/refunds
  • Auth: none declared. Required headers: X-Tenant-ID

Path parameters

idstring required

the settled payment being refunded

Headers

X-Tenant-IDstring required

tenant id

Request body

amount_uoastring

AmountUOA is minor units, at most what is still refundable. Required.

deadline_secondsinteger

DeadlineSeconds is how long the merchant has to pay it. 0 takes the server's default.

idempotency_keystring

IdempotencyKey makes a retry return the ORIGINAL refund instead of raising a second one. Send the proposal id.

Example request

{
  "amount_uoa": "12500000",
  "deadline_seconds": 86400
}

Response

Created

successboolean

Example response

{
  "success": true
}

Changes

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