POST
/
invoices
/
{id}
/
pay
curl -X POST https://api.contazen.ro/v1/invoices/inv_9z8y7x6w5v/pay \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json"
{
  "success": true,
  "data": {
    "payment_id": "pay_7x8y9z0a1b",
    "invoice_id": "inv_9z8y7x6w5v",
    "amount": 12495.00,
    "payment_date": "2024-03-20",
    "payment_method": "bank_transfer",
    "is_paid": true,
    "remaining_amount": 0,
    "message": "Payment recorded successfully. Invoice marked as paid."
  },
  "meta": {
    "version": "v1",
    "response_time": "67.89ms"
  }
}

Request

id
string
required
The invoice ID (ID) to mark as paid
amount
number
Payment amount. If not specified, the full invoice amount will be used.
payment_date
string
Payment date in YYYY-MM-DD format. Defaults to today if not specified.
payment_method
string
default:"bank_transfer"
Payment method. Available options:
  • receipt - Receipt
  • bank_transfer - Bank transfer (default)
  • card - Credit/debit card
  • check - Check
  • promissory_note - Promissory note
  • fiscal_receipt - Fiscal receipt
  • other - Other payment method
observations
string
Optional notes or observations about the payment
Recording a payment for the full invoice amount will automatically mark the invoice as paid (is_paid = true).

Response

success
boolean
Indicates if the request was successful
data
object
meta
object
Response metadata including version and response time
curl -X POST https://api.contazen.ro/v1/invoices/inv_9z8y7x6w5v/pay \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json"
{
  "success": true,
  "data": {
    "payment_id": "pay_7x8y9z0a1b",
    "invoice_id": "inv_9z8y7x6w5v",
    "amount": 12495.00,
    "payment_date": "2024-03-20",
    "payment_method": "bank_transfer",
    "is_paid": true,
    "remaining_amount": 0,
    "message": "Payment recorded successfully. Invoice marked as paid."
  },
  "meta": {
    "version": "v1",
    "response_time": "67.89ms"
  }
}