Charging & Collecting Payment
Charge an invoice using the customer's saved Stripe payment method.
How Payment Collection Works
ABAXUS collects payment by creating a charge through your configured payment provider (Stripe or Adyen). ABAXUS does not store payment card data — all sensitive payment information lives in Stripe or Adyen. ABAXUS holds a reference to the customer’s payment method ID in your provider and uses that reference when creating a charge.
When you call POST /v1/invoices/:id/charge, ABAXUS:
- Looks up the customer’s default payment method from their ABAXUS record
- Creates a PaymentIntent (Stripe) or initiates a payment (Adyen) for the invoice’s
total_amount - Waits for the payment provider’s synchronous confirmation
- Transitions the invoice to
paidon success - Records the payment event in the invoice audit trail
POST /v1/invoices/:id/charge
| |
Response on success:
| |
Response on payment failure:
| |
A failed charge does not change the invoice status — it remains issued and can be retried. ABAXUS does not perform automatic retries. If you need dunning (automated retry sequences), implement it in your billing operations code by scheduling retry calls against this endpoint.
Audit Trail
Every significant event in an invoice’s lifecycle is recorded and retrievable:
| |
Response:
| |
The audit trail is append-only and immutable. It records the actor (which API key triggered the action), the timestamp, and structured data about what happened. This is your compliance record for every billing action.
Sending Invoice Emails
To trigger an invoice email notification:
| |
ABAXUS generates the invoice content and triggers the email via your configured email provider. The actual delivery is handled by the email integration you’ve set up in Settings → Integrations.
Archiving Invoices
To close an invoice without charging (write-off, dispute resolution, zero-amount cleanup):
| |
Archiving is recorded in the audit trail with the provided reason and note. Archived invoices remain visible in the invoice list and can be exported, but cannot be charged.
Invoice State Machine Summary
created
│
issued ──── charge_attempted (failure) ──── issued (retry)
│
├──── paid (charge succeeded)
│
└──── archived (manual close)
All transitions are logged in the invoice events trail. Once in paid or archived, an invoice is terminal and cannot transition to any other state.