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": "john@example.com"
},
"createdAt": "2024-01-25T10:00:00Z",
"updatedAt": "2024-01-25T14:30:00Z"
}
}
Payouts
Update Payout
Update a payout’s status, payment method, or payment reference
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": "john@example.com"
},
"createdAt": "2024-01-25T10:00:00Z",
"updatedAt": "2024-01-25T14:30:00Z"
}
}
Path Parameters
string
required
The unique identifier of the payout to update
Body Parameters
string
required
Update the payout status. Valid values:
pending, processing, completed, failed, cancelled. Status transitions are validated:pending→processing,cancelledprocessing→completed,failed,cancelledfailed→pending,cancelledcompleted→ (cannot be changed)cancelled→pending
completed, processedAt is automatically set and all associated commission transactions are marked as paid. Status changes may trigger webhook events (payout.paid, payout.failed).string
Update the payment method used for the payout. Maximum 50 characters.
string
Update the external payment reference (e.g., PayPal transaction ID, bank transfer reference). Maximum 255 characters.
Response
boolean
Always
true for successful responsesobject
The updated payout object.
Show Data Object Properties
Show Data Object Properties
string
Unique identifier for the payout
string
The affiliate ID who will receive this payout
number
Invoice number for this payout
number
Total payout amount
string
Payout status:
pending, processing, completed, failed, cancelledstring | null
Payment method used
string | null
External payment reference
string | null
ISO 8601 timestamp when processed
boolean
Whether this is a managed payout
object | null
Affiliate info with
name and emailstring
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
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": "john@example.com"
},
"createdAt": "2024-01-25T10:00:00Z",
"updatedAt": "2024-01-25T14:30:00Z"
}
}
Was this page helpful?
