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 ChannelID = `chn_${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";
channel_id: ChannelID | null;
channel: string | null;
metadata: Record<string, string>;
tracking: Record<string, string>;
checkout_id: CheckoutID | null;
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.
checkout_id
is the checkout the donor gave in, and is
null
when the receivable has no checkout.
payer.checkout_id
is the checkout that created the payer, so it can differ for a returning donor.
A bonus gift is the extra one-time gift that a donor can give right after signing a
subscription in the same checkout. Its receivable has
type: "onetime"
and the subscription_id
of that subscription. So does the first payment of an annual Autogiro subscription with a
fixed start date. The monthly charges of the subscription are separate receivables with type: "recurring".
Read type, not subscription_id, to tell a monthly
donor from a one-time gift.
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.
Map gifts to your own records with reference, which is a code.
reference_title
is free text.
channel_id
is the id of the channel the gift came through, for example "chn_…", and
channel
is the channel's name, for example "Webb", "Face-2-face",
"Telemarketing"
or a channel the organisation created under Settings → Channels. A gift from a
telemarketing order has Telemarketing. Otherwise it has the channel of the checkout
link the donor came through, or else the channel of the checkout. A gift charged on a
subscription has the subscription's channel, and a receivable created without a
checkout, for example by an import, has Webb. The organisation can rename its own
channels, so match on
channel_id
when you need a stable key. Both are
null
for a receivable created before channels existed that has not been given one yet.
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.