Skip to main content
Docs

Refunds

Refunds follow an agreed basis: a cancellation plan, an agreed dispute outcome, a confirmed outside outcome, or the default rule the parties accepted. There is no free-form refund endpoint. Refunds are whole-payment refunds of funding charges. See Refunds and cancellations.

The base is https://holdyn-fb2e34c7cbae.herokuapp.com/api/v1/b2b. Every endpoint below lists who may call it.

At a glance#

Objects

Refund and RefundPlan

Refund and RefundPlan (example values)
{
  "id": "rfd_6543a1b2c3d4e5f6a7b8ce40",
  "object": "refund",
  "livemode": false,
  "mandate": "man_6543a1b2c3d4e5f6a7b8cc00",
  "collection": "col_6543a1b2c3d4e5f6a7b8cd11",
  "funding_charge": "fch_6543a1b2c3d4e5f6a7b8cd32",
  "stripe_charge_id": "py_1Qcol3",
  "stripe_payment_intent_id": "pi_1Qcol3",
  "stripe_refund_id": "pyr_1Qref",
  "amount": 900000,
  "currency": "usd",
  "method": "ach",
  "whole_charge": true,
  "reason": "cancellation",
  "authority": { "kind": "mutual_agreement", "ref": "mver_6543a1b2c3d4e5f6a7b8cc12" },
  "status": "pending",
  "expected_by": "2026-12-04",
  "waiting_for": null,
  "try_no": 1,
  "failure": null,
  "failed_after_success": false,
  "failure_reason": null,
  "off_stripe_settlement": null,
  "requested_by": { "type": "system", "id": null },
  "succeeded_at": null,
  "created_at": "2026-12-01T10:00:00.000Z",
  "updated_at": "2026-12-01T10:00:02.000Z"
}

Endpoints

GET/refunds

Credential
Member session or API key
Permission
refunds.read
API key scope
mandates:read
Mode
scoped
Pagination
cursor

Request

mandate, collection, status (multi), reason (multi), failed_after_success boolean, waiting_for (multi).

Response

200 ListResponse<Refund>.

GET/refunds/:id

Credential
Member session or API key
Permission
refunds.read
API key scope
mandates:read
Mode
scoped

POST/refunds/:id/retry

Credential
Member session
Permission
refunds.retry (owner, admin, finance; API scope: none)
Mode
scoped
Idempotency
honoured, recommended

Request

note string optional (≤ 500).

Response

200 Refund (failed → planned; executed by the refund executor with a new idempotency key refund:<refundId>:r<n>).

Errors

409 invalid_state_transition (not failed), retry_not_allowed (+ reason: "refund_not_transient": Stripe refunds only go to the original payment method, so a closed account or cancelled card is settled off Stripe instead); money-route errors.

Record and events

refund.planned (data.retryOf) · Events: refund.created / refund.succeeded / refund.failed as it proceeds.

POST/refunds/:id/off-stripe-settlement

Credential
Member session
Permission
refunds.record_off_stripe_settlement (owner, admin, finance; API scope: none)
Mode
scoped
Step-up
live

Request

document string required (evd_ uploaded with POST /mandates/:id/documents, purpose: other: the proof that the payer was paid outside Stripe); note string required (20–1000).

Response

200 Refund (off_stripe_settlement.status: awaiting_confirmation).

Errors

409 invalid_state_transition (only a failed refund whose failure is not transient, typically after success), confirmation_pending (already recorded); 404 (document).

Record and events

refund.off_stripe_settlement_recorded.

POST/refunds/:id/off-stripe-settlement/confirm

Credential
Member session
Permission
refunds.record_off_stripe_settlement (a member other than the recorder; API scope: none)
Mode
scoped
Step-up
live
Idempotency
honoured

Request

note string optional (≤ 1000).

Response

200 Refund (off_stripe_settlement.status: confirmed; the returned amount leaves refund_returned_amount; a closed mandate's post_close item is resolved; the refund_returned break can be resolved).

Errors

409 same_member_not_allowed (the recorder), approver_cooling (+ available_at), invalid_state_transition.

Record and events

refund.off_stripe_settlement_confirmed · Events: —

Refunds · Holdyn Business docs