Skip to main content
POST
Create vendor refund payment with allocations

Authorizations

Authorization
string
header
required

Business-scoped JWT token. Token payload includes business_id to automatically scope requests. Format: Bearer <your-jwt-token>

Use this for: Business-specific operations where the business context is embedded in the token.

Headers

Idempotency-Key
string

Unique key for idempotent request processing

Path Parameters

business_id
string<uuid>
required

Business UUID

Body

Serializer for creating vendor refund payments with embedded allocations.

This serializer handles the unified creation of vendor refunds, payments, and allocations in a single atomic operation.

vendor_id
string<uuid>
required

UUID of the vendor issuing the refund

total_amount_cents
integer
required

Total refund amount in cents (e.g., 100000 for £1000.00)

Required range: x >= 1
allocations
object[]

List of allocations for the refund

external_id
string

External system ID for idempotency

Maximum string length: 255
refund_type
enum<string>
default:overpayment

Type of refund

  • overpayment - Overpayment
  • billing_error - Billing Error
  • goods_return - Goods Return
  • credit_balance - Credit Balance
  • duplicate_payment - Duplicate Payment
  • other - Other
Available options:
overpayment,
billing_error,
goods_return,
credit_balance,
duplicate_payment,
other
refund_date
string<date>

Date of the refund (defaults to today)

currency
string

Currency code (defaults to vendor's currency)

Required string length: 1 - 3
description
string

Refund description

memo
string

Internal memo

reason
string

Reason for the refund

Maximum string length: 500
metadata
any | null

Additional structured data

payment_method
enum<string>
default:bank_transfer

Payment method used for the refund

  • bank_transfer - Bank Transfer
  • ach - ACH Transfer
  • wire - Wire Transfer
  • check - Check
  • credit_card - Credit Card Reversal
  • cash - Cash
  • other - Other
Available options:
bank_transfer,
ach,
wire,
check,
credit_card,
cash,
other
processor
enum<string>
default:bank_transfer

Payment processor used

  • stripe - Stripe
  • wise - Wise (TransferWise)
  • paypal - PayPal
  • bank_transfer - Direct Bank Transfer
  • internal - Internal Processing
Available options:
stripe,
wise,
paypal,
bank_transfer,
internal
payment_reference
string

External payment reference number

Maximum string length: 100
processing_fee_cents
integer
default:0

Processing fee in cents

Required range: x >= 0

Response

Serializer for vendor refund payment create/update responses.

This serializer formats the response data for successful refund payment creation operations. Renamed from VendorRefundPaymentResponseSerializer to avoid naming conflict with vendor_refund_serializers.py.

refund
object
required

Complete refund information

payment
object | null
required

Payment information

allocations
object[]
required

List of allocations created