Skip to main content
Pay an invoice
curl --request POST \
  --url https://api.salesbricks.com/api/v2/invoices/{invoice_id}/pay \
  --header 'Content-Type: application/json' \
  --header 'X-SALESBRICKS-KEY: <api-key>' \
  --data '
{
  "payment_method_id": "<string>",
  "auto_pay_invoices": true
}
'
{
  "payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoice_number": "<string>",
  "paid_amount": 123,
  "paid_at": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "error": "<string>"
}

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

invoice_id
string
required

Body

payment_method_id
string
required

The Stripe payment method ID to use for this payment

auto_pay_invoices
boolean | null

Whether to enable auto-pay for future invoices

Response

payment_id
string<uuid>
required

Unique identifier for the payment

invoice_number
string | null
required

Short form identifier for the invoice. If the invoice_number is null, this is an estimate

paid_amount
integer | null
required

The amount paid

paid_at
string<date-time> | null
required

the date at which this payment was paid

currency
string
required

The currency in which the payment is denominated (e.g., USD, EUR)

error
string | null
required

Any errors that occured during this payment processing