Payer

payer is Repejo's entity for a donor. The payload below reflects the fields currently serialized by the codebase.

Draft: The documented REST endpoints for payer currently exist as a planned contract. In the current router, webhooks are the implemented integration surface.

Common response format

type Response<T> = {
data: T;
};

Payload

type PayerID = `pay_${string}`;
type CheckoutID = `chk_${string}`;
type PayerPaymentMethod =
| "swish"
| "autogiro"
| "card"
| "apple_pay"
| "google_pay"
| "stripe_subscription"
| "sepa_direct_debit"
| "none";

type Payer = {
id: PayerID;
name: string | null;
first_name: string | null;
last_name: string | null;
phone_number: string | null;
email: string | null;
status:
| "active"
| "pending"
| "rejected"
| "terminated"
| "aborted"
| "checkout"
| "completed"
| "deleted"
| "archived";
payment_method: PayerPaymentMethod;
contact_consent: boolean;
address_street: string | null;
address_zip: string | null;
address_city: string | null;
address_country: string | null;
personal_identity_number: string | null;
note: string;
external_id: string | null;
reference_value: string | null;
reference_title: string | null;
metadata: Record<string, string>;
preferred_locale: string;
checkout_id: CheckoutID | null;
inserted_at: string;
updated_at: string;
};

Every field above is always present in the payload; absent values are sent as null (not omitted). inserted_at and updated_at are naive timestamps without timezone (for example "2026-05-12T13:46:10").

checkout_id links the payer to the checkout that created it. reference_value and reference_title carry the checkout reference captured for the payer. The internal donor_portal_slug field is not included in webhook payloads.

Planned endpoints

  • GET /api/payers
  • GET /api/payers/:id
  • POST /api/payers
  • PATCH /api/payers/:id

If you build against the draft above, treat it as preliminary. The webhook page describes the part of the integration surface that actually delivers data today.