receivable
is the claim Repejo tracks against a payer, either as a one-time payment or as part of a subscription.
It is the main entity for a gift or payment — the amount that should be collected.
A receivable can have many
transactions.
Each transaction is one attempt to satisfy the receivable: if the first attempt fails
(for example insufficient funds or a rejected charge), Repejo creates a new transaction
for the next attempt against the same receivable. The receivable is considered
paid
once one of its transactions succeeds.
Draft: The documented REST endpoints for receivable are planned but not exposed in the router. Webhook events are the integration surface that is active today.
type ReceivableID = `rec_${string}`;
type ReceivablePaymentMethod =
| "swish"
| "autogiro"
| "card"
| "apple_pay"
| "google_pay"
| "stripe_subscription"
| "sepa_direct_debit"
| "invoice"
| "offline"
| "none";
type Receivable = {
id: ReceivableID;
amount: string;
message_from_payer: string | null;
status: "paid" | "unpaid" | "terminated_by_payer" | "rejected";
type: "onetime" | "recurring";
payment_method: ReceivablePaymentMethod | null;
transaction_date: string;
paid_at_date: string | null;
reference: string | null;
reference_title: string | null;
payer_id: PayerID;
subscription_id: SubscriptionID | null;
product_type:
| "donation"
| "membership"
| "gift_card"
| "p2p"
| "physical"
| "lottery"
| "live";
metadata: Record<string, string>;
tracking: Record<string, string>;
external_transaction_id: string | null;
paid_at: string | null; // ISO 8601 UTC, e.g. "2026-04-20T10:00:00Z"
product: {
id: string;
name: string;
reference: string;
} | null;
payer: Payer | null;
};
transaction_date
is the due date for the receivable. It stays the due date when a later charge pays it. The interface shows
paid_at_date
when present, and the due date while the receivable is unpaid.
paid_at
is the moment the receivable was paid, as an ISO 8601 UTC timestamp, and is
null
while the receivable is unpaid. Its precision depends on the payment rail: for
Swish, card, Apple Pay, Google Pay and invoice payments it is the instant the
payment was confirmed (second precision). For Autogiro/Bankgiro, Stripe
subscriptions and offline payments only the settlement date is known, so
paid_at
is 12:00:00 Europe/Stockholm on paid_at_date, expressed in UTC
(10:00:00Z
in summer, 11:00:00Z
in winter). The value is derived when the event is created and frozen into the
delivery; a resent event replays the value from the original send.
The field set above is the complete payload for every receivable webhook; all
fields are always present.
external_transaction_id
holds the external id of the receivable's paid transaction (for example a Stripe
charge, a Swish payment, or Adyen's pspReference) and is
null
when no such transaction exists.
product
is the product the receivable paid for: the package a company bought on a
company-package checkout, or the product bought in a live shop. It is
null
for every other receivable. A company package's
reference
is made from its name and changes if the package is renamed, so match on
id
when you need a stable key. If the organisation deletes the product, later
events for the receivable carry product: null, so keep the
product from the first event you received.
reference_title
is the readable name of reference,
for example "Malmö"
for "malmo". It comes from the
checkout link the gift was given through, or else from the checkout's list of
purposes, and is null
when neither has a title. It is the title at the time the event is sent, so a
renamed purpose shows its new title in later events. If a link's reference is
changed, its title no longer applies to gifts made under the old reference, and
those get null.
receivable
and transaction
are not
the same entity under different names.
receivable.created
and receivable.updated
carry the receivable described above. Each payment attempt against a receivable
is a separate transaction, delivered via
transaction.created
and transaction.updated.
See the Transaction
page for that payload.