curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/invoices/payments/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "4d90c3cc-1e55-5c61-9999-9ee36847163b",
"total_amount_cents": 450000,
"currency": "GBP",
"payment_date": "2024-03-20",
"payment_method": "bank_transfer",
"payment_reference": "PAY-2024-0042",
"references": {
"bank_reference": "FPS-20240320-123456"
},
"note": "Payment for INV-0042 - monthly beer supply",
"allocations": [
{
"invoice_id": "5e90c3cc-2f66-6d72-aaaa-aff47958274c",
"amount_cents": 450000
}
]
}
'{
"payment": {
"id": "7a80c3cc-4g88-8f94-cccc-cgg69180496e",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "4d90c3cc-1e55-5c61-9999-9ee36847163b",
"total_amount_cents": 450000,
"applied_amount_cents": 450000,
"allocated_amount_cents": 450000,
"unapplied_amount_cents": 0,
"remaining_amount_cents": 0,
"currency": "GBP",
"status": "completed",
"payment_method": "bank_transfer",
"payment_reference": "PAY-2024-0042",
"external_id": "ext-payment-001",
"note": "Payment for INV-0042 - monthly beer supply",
"bank_reference": "FPS-20240320-123456",
"metadata": {},
"idempotency_key": null,
"created_at": "2024-03-20T09:30:00Z",
"updated_at": "2024-03-20T09:30:00Z",
"applied_invoices": [
{
"id": "5e90c3cc-2f66-6d72-aaaa-aff47958274c",
"invoice_number": "INV-0042",
"applied_amount_cents": 450000,
"status": "paid",
"outstanding_amount_cents": 0
}
]
}
}Payments
Create invoice payment
Record a payment for one or more customer invoices. The payment is recorded and invoices are updated, ready to be matched during reconciliation later. Supports idempotency via Idempotency-Key header.
POST
/
v1
/
platform
/
businesses
/
{business_id}
/
invoices
/
payments
/
curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/invoices/payments/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "4d90c3cc-1e55-5c61-9999-9ee36847163b",
"total_amount_cents": 450000,
"currency": "GBP",
"payment_date": "2024-03-20",
"payment_method": "bank_transfer",
"payment_reference": "PAY-2024-0042",
"references": {
"bank_reference": "FPS-20240320-123456"
},
"note": "Payment for INV-0042 - monthly beer supply",
"allocations": [
{
"invoice_id": "5e90c3cc-2f66-6d72-aaaa-aff47958274c",
"amount_cents": 450000
}
]
}
'{
"payment": {
"id": "7a80c3cc-4g88-8f94-cccc-cgg69180496e",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "4d90c3cc-1e55-5c61-9999-9ee36847163b",
"total_amount_cents": 450000,
"applied_amount_cents": 450000,
"allocated_amount_cents": 450000,
"unapplied_amount_cents": 0,
"remaining_amount_cents": 0,
"currency": "GBP",
"status": "completed",
"payment_method": "bank_transfer",
"payment_reference": "PAY-2024-0042",
"external_id": "ext-payment-001",
"note": "Payment for INV-0042 - monthly beer supply",
"bank_reference": "FPS-20240320-123456",
"metadata": {},
"idempotency_key": null,
"created_at": "2024-03-20T09:30:00Z",
"updated_at": "2024-03-20T09:30:00Z",
"applied_invoices": [
{
"id": "5e90c3cc-2f66-6d72-aaaa-aff47958274c",
"invoice_number": "INV-0042",
"applied_amount_cents": 450000,
"status": "paid",
"outstanding_amount_cents": 0
}
]
}
}Authorizations
PartnerJWTBusinessScopedJWTBasicAuthBearerUnscopedBearerBusinessScoped
Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>
Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Request serializer for recording invoice payments
Method of payment (e.g., bank_transfer, card, cash, cheque, direct_debit)
bank_transfer- bank_transfercredit_card- credit_carddebit_card- debit_cardach- achcheck- checkcash- cashpaypal- paypalstripe- stripeother- other
Available options:
bank_transfer, credit_card, debit_card, ach, check, cash, paypal, stripe, other Was this page helpful?