Vendor Refunds

Create vendor refund

    Create a new vendor refund record (parent transaction).

    **Idempotency**: Uses `external_id` field - duplicate requests with the same
    `external_id` will return HTTP 200 with the existing refund instead of creating
    a duplicate.

    **Required Fields:**
    - `vendor_id`: UUID of the vendor issuing the refund
    - `total_refunded_amount_cents`: Total amount being refunded in cents (e.g., 10050 for £100.50)
    - `currency`: ISO 4217 currency code (EUR, GBP, USD)

    **Optional Fields:**
    - `external_id`: Your system's unique identifier (for idempotency)
    - `reference_number`: External reference number
    - `refund_type`: Type of refund (overpayment, billing_error, goods_return, etc.)
    - `refund_date`: Date of refund (defaults to today)
    - `description`: Detailed description
    - `memo`: Internal memo/notes
    - `reason`: Reason for the refund
    - `metadata`: Additional structured data (JSON object)
    - `allocations`: Array of allocations to create with the refund
    - `payments`: Array of payments to create with the refund
    - `document`: Optional document upload (multipart field `file` with optional document_type, upload_source, metadata, tags)

    **Common Scenarios:**
    1. **Overpayment refund** - Vendor returns excess payment
       ```json
       {
         "vendor_id": "uuid",
         "total_refunded_amount_cents": 15000,
         "currency": "GBP",
         "refund_type": "overpayment",
         "description": "Refund of overpayment"
       }
       ```

    2. **Billing error** - Vendor refunds due to billing mistake
       ```json
       {
         "vendor_id": "uuid",
         "total_refunded_amount_cents": 50000,
         "currency": "GBP",
         "refund_type": "billing_error",
         "reference_number": "REF-12345",
         "allocations": [{
           "allocation_type": "bill",
           "bill_id": "bill-uuid",
           "amount_cents": 50000
         }]
       }
       ```

    3. **Complete refund with payment** - Create refund with allocation and payment in one request
       ```json
       {
         "vendor_id": "uuid",
         "total_refunded_amount_cents": 100000,
         "currency": "GBP",
         "external_id": "my-refund-123",
         "allocations": [{
           "allocation_type": "bill",
           "bill_id": "bill-uuid",
           "amount_cents": 100000
         }],
         "payments": [{
           "refunded_amount_cents": 100000,
           "payment_method": "bank_transfer",
           "processor": "wise"
         }]
       }
       ```

    **Returns:**
    - HTTP 201: Refund created successfully
    - HTTP 200: Existing refund (idempotent - same external_id)
    - HTTP 400: Validation error
    
post/v1/platform/businesses/{business_id}/vendor-refunds/

Request

  • Base URL
    https://docs.thredfi.com (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP basic
    • or HTTP bearer
    • or HTTP bearer

Path parameters

business_idstring required

Request body

vendor_idstring uuid required

Vendor UUID

external_idstring

External/partner refund ID for idempotency

refund_type'overpayment' | 'credit_balance' | 'duplicate_payment' | 'billing_error' | 'goods_return' | 'service_cancellation' | 'other'

Type/reason for the refund

  • overpayment - overpayment
  • credit_balance - credit_balance
  • duplicate_payment - duplicate_payment
  • billing_error - billing_error
  • goods_return - goods_return
  • service_cancellation - service_cancellation
  • other - other
reference_numberstring

External reference number

total_refunded_amount_centsinteger required

Total refunded amount in cents (e.g., 10050 for €100.50)

currency'EUR' | 'GBP' | 'USD'

ISO 4217 currency code

  • EUR - EUR
  • GBP - GBP
  • USD - USD
refund_datestring date

Date when refund was issued (ISO date: YYYY-MM-DD)

descriptionstring

Description of the refund reason or context

memostring

Internal memo or notes about this refund

reasonstring

Detailed explanation for the refund (max 500 characters)

metadataunknown

Response

idstring uuid required

Unique vendor refund identifier

vendor_idstring uuid required

UUID of the vendor who issued the refund

vendor_namestring required

Vendor company name

external_idstring

Your external system identifier for idempotency

refund_type'overpayment' | 'credit_balance' | 'duplicate_payment' | 'billing_error' | 'goods_return' | 'service_cancellation' | 'other'

Refund type: overpayment, credit_balance, billing_error, goods_return, duplicate_payment, service_cancellation, other

  • overpayment - Overpayment Refund
  • credit_balance - Credit Balance Refund
  • duplicate_payment - Duplicate Payment
  • billing_error - Billing Error
  • goods_return - Goods Return
  • service_cancellation - Service Cancellation
  • other - Other
reference_numberstring

External reference number for this refund

refund_datestring date

Date when refund was issued

expected_completion_datestring date nullable

Expected date for refund completion

total_refunded_amountinteger required

Total refunded amount in cents

allocated_amountinteger required

Total allocated amount in cents

unallocated_amountinteger required

Remaining unallocated amount in cents

currency'EUR' | 'GBP' | 'USD' | 'SEK' | 'NOK' | 'DKK' | 'ISK' | 'MYR' | 'SGD'

Refund currency (EUR, GBP, USD)

  • EUR - Euro
  • GBP - British Pound
  • USD - US Dollar
  • SEK - Swedish Krona
  • NOK - Norwegian Krone
  • DKK - Danish Krone
  • ISK - Icelandic Króna
  • MYR - Malaysian Ringgit
  • SGD - Singapore Dollar
status'pending' | 'partially_allocated' | 'allocated' | 'completed' | 'cancelled'

Refund status: pending, partially_allocated, allocated, completed, cancelled (computed from allocations)

  • pending - Pending
  • partially_allocated - Partially Allocated
  • allocated - Allocated
  • completed - Completed
  • cancelled - Cancelled
descriptionstring

Description of the refund reason or context

memostring

Internal memo or notes

reasonstring

Detailed explanation for the refund

metadataunknown
created_atstring date-time required

Refund creation timestamp

updated_atstring date-time required

Last update timestamp

Changes

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