Skip to main content
PUT
/
v1
/
payouts
/
{id}
curl -X PUT "https://api.affonso.io/v1/payouts/pay_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "paymentMethod": "paypal",
    "paymentReference": "PAYPAL-TXN-123456"
  }'
{
  "success": true,
  "data": {
    "id": "pay_abc123",
    "affiliateId": "aff_456def",
    "invoiceNumber": 1001,
    "amount": 150.00,
    "status": "completed",
    "paymentMethod": "paypal",
    "paymentReference": "PAYPAL-TXN-123456",
    "processedAt": "2024-01-25T14:30:00Z",
    "managedPayout": true,
    "affiliate": {
      "name": "John Doe",
      "email": "[email protected]"
    },
    "createdAt": "2024-01-25T10:00:00Z",
    "updatedAt": "2024-01-25T14:30:00Z"
  }
}

Path Parameters

id
string
required
The unique identifier of the payout to update

Body Parameters

status
string
required
Update the payout status. Valid values: pending, processing, completed, failed, cancelled. Status transitions are validated:
  • pendingprocessing, cancelled
  • processingcompleted, failed, cancelled
  • failedpending, cancelled
  • completed → (cannot be changed)
  • cancelledpending
When status is set to completed, processedAt is automatically set and all associated commission transactions are marked as paid. Status changes may trigger webhook events (payout.paid, payout.failed).
paymentMethod
string
Update the payment method used for the payout. Maximum 50 characters.
paymentReference
string
Update the external payment reference (e.g., PayPal transaction ID, bank transfer reference). Maximum 255 characters.

Response

success
boolean
Always true for successful responses
data
object
The updated payout object.
curl -X PUT "https://api.affonso.io/v1/payouts/pay_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "paymentMethod": "paypal",
    "paymentReference": "PAYPAL-TXN-123456"
  }'
{
  "success": true,
  "data": {
    "id": "pay_abc123",
    "affiliateId": "aff_456def",
    "invoiceNumber": 1001,
    "amount": 150.00,
    "status": "completed",
    "paymentMethod": "paypal",
    "paymentReference": "PAYPAL-TXN-123456",
    "processedAt": "2024-01-25T14:30:00Z",
    "managedPayout": true,
    "affiliate": {
      "name": "John Doe",
      "email": "[email protected]"
    },
    "createdAt": "2024-01-25T10:00:00Z",
    "updatedAt": "2024-01-25T14:30:00Z"
  }
}