Saltar al contenido principal

Modelo de datos

Ver diagrama ER (resumen)
  • ||--o{ 1 — N
  • ||--|| 1 — 1
  • }o--o{ N — N
11 / 11

Customer customers

End customers (payers) of the tenant. The natural key tenants share with their billing system (CRM, ERP, Salesforce) is typically `email`, `identification_number` or a key inside `metadata`.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique customer public ID.
ej. CSljikas98
emailstringnullableCustomer's email address.
ej. mail@example.com
namestringnullableCustomer's full name or business name.
ej. Jorgelina Castro
gateway_identifierstringnullableCustomer's reference for bank account statements (used in some gateways).
ej. 383473
identification_typestringnullableDocument type (e.g. DNI, CUIT, CUIL, RUT, PASSPORT).
ej. DNI
identification_numberstringnullableDocument number.
ej. 15.555.324
mobile_numberstringnullableE.164 mobile phone number.
ej. +5491123456789
metadatajsonnullableFree-form key/value pairs attached by the tenant via the API.
created_attimestamprequiredWhen the customer was created (RFC3339).
updated_attimestamprequiredTime at which the source record was last updated (RFC3339).
deleted_attimestampnullableTime at which the customer was archived (soft delete), or null if active.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Payment Method payment_methods

Tokenized payment instruments stored against a customer: credit/debit cards, CBU, CVU, SEPA debit or bank transfer accounts. Fields are populated according to `type`.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique payment method public ID.
ej. PMyma6Ql8Wo9
binstringnullableBank Identification Number (first digits of the card) when applicable.
ej. 453248
typestringrequiredType of payment instrument.
cardsepa_debitcbucvutransfer
card_networkstringnullableCard brand when `type = card`.
amexdinersdiscoverfavacardjcbmastercardnaranjaunknownvisa
card_issuerstringnullableCard issuer when `type = card`.
ej. argencard
last_four_digitsstringnullableLast four digits of the card or account.
ej. 9876
bankstringnullableBank name (for bank-backed payment methods).
namestringnullableDisplay name (e.g. `Visa`).
card_fundingstringnullableFunding type when `type = card`.
creditdebitprepaidunknown
card_expiration_monthintegernullableExpiration month when `type = card`.
card_expiration_yearintegernullableExpiration year when `type = card`.
countrystringnullableISO 3166-1 alpha-2 country code.
metadatajsonnullableFree-form key/value pairs.
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
fingerprintstringnullableStable hash that identifies the same underlying instrument across customers (useful for de-duping).
bank_account_data_idstringnullableReference to the bank account record backing CBU/CVU/transfer methods.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Mandate mandates

Authorization linking a customer and a payment method, granting permission to charge it (e.g. for recurring payments). A mandate is required to make payments with CBU/CVU/SEPA.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique mandate public ID.
ej. MAmQ6j9NWxblNv
customer_id🔗stringnullableAuthorizing customer.
payment_method_id🔗stringnullableAuthorized payment instrument.
metadatajsonnullableFree-form key/value pairs.
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
deleted_attimestampnullableTime at which the mandate was archived (soft delete), or null if active.
expires_attimestampnullableWhen the mandate expires (if applicable).
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Relaciones

Subscription subscriptions

Recurring billing plan: amount, currency, interval and customer. Subscriptions generate `payments` on every charge date.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique subscription public ID.
ej. SBmQ6j9NWxblNv
customer_id🔗stringnullableCustomer being charged.
payment_method_id🔗stringnullableDefault payment method for this subscription.
amountdecimalrequiredAmount per charge in major units (e.g. 12.50).
currencystringrequiredISO 4217 currency code.
ej. ARS
countintegernullableTotal number of charges to perform (null = open-ended).
start_datedaterequiredFirst charge date (YYYY-MM-DD).
statusstringrequiredSubscription lifecycle status.
activepausedcancelledfinishedincompleteincomplete_expired
interval_unitstringrequiredBilling interval unit.
weeklymonthlyyearly
intervalintegerrequiredNumber of `interval_unit`s between charges (e.g. `2` + `monthly` = bi-monthly).
day_of_monthintegernullable1–28. Required when `interval_unit = monthly`.
day_of_weekintegernullable0=Sun … 6=Sat. Required when `interval_unit = weekly`.
auto_retries_max_attemptsintegernullableOverride for max automatic retries on failed payments.
descriptionstringnullableShort subscription description.
metadatajsonnullableFree-form key/value pairs.
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Relaciones

Payment payments

Individual charge attempt. Most payments originate from a `subscription`; one-off payments are also possible (via API, link or session). Status transitions are tracked via `payment_logs`.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique payment public ID.
ej. PYa8EJ1DkDnY
customer_id🔗stringnullableCustomer being charged.
gateway_id🔗stringnullableGateway used to process the payment.
payment_method_id🔗stringnullablePayment method used.
subscription_id🔗stringnullableParent subscription, if any.
amountdecimalrequiredCharge amount in major units.
amount_refundeddecimalrequiredAmount refunded so far.
charge_datedatenullableDate the payment should be collected.
estimated_charge_datedatenullableBest estimate of when the bank will actually debit.
estimated_accreditation_datedatenullableWhen the funds are estimated to settle to the merchant.
effective_charged_datedatenullableActual debit date once known.
currencystringrequiredISO 4217 currency code.
descriptionstringnullableFree-text description.
related_tostringnullableReference to a related resource (polymorphic, e.g. import ID).
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
metadatajsonnullableFree-form key/value pairs.
statusstringrequiredCurrent payment status.
pending_submissioncancelledsubmittedfailedwill_retryapprovedrejectedchargebackrefundedpartially_refundedrequires_actionincomplete
response_messagestringnullableFree-text response from the financial institution (e.g. "Falta de fondos").
rejection_codestringnullableNormalized rejection code (Debi taxonomy).
provider_rejection_codestringnullableRaw rejection code from the provider/bank.
rejection_recovery_scoredecimalnullableScore 0–1 used by recovery analytics; higher = more likely to recover on retry.
updated_statustimestampnullableLast time `status` changed.
notifyed_attimestampnullableWhen the customer/merchant was notified.
subscription_payment_numberintegernullableSequence number of this charge within the parent subscription (1, 2, 3, ...).
can_auto_retry_untildatenullableCut-off date for automatic retries.
auto_retries_max_attemptsintegernullableMax automatic retries for this payment.
submissions_countintegerrequiredHow many times the payment was submitted to the bank/processor.
retryable_after_datedatenullableEarliest date the payment may be retried after a rejection.
presentable_attimestampnullableWhen the payment became eligible for presentation to the bank.
confirmable_attimestampnullableWhen the payment became eligible for confirmation.
not_retried_reasonstringnullableWhy a rejected payment wasn't retried.
binary_modebooleannullableTrue if processed in binary mode (synchronous, no retries).
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Relaciones

Payment Log payment_logs

Append-only audit trail of state transitions for a payment (submission, response, rejection, retry, etc.). Use this to reconstruct lifecycle timelines.

pk: (payment_id, processed_at, action)cursor: dw_loaded_at
ColumnaTipoDescripción
payment_id🔗stringrequiredPayment this event belongs to.
gateway_id🔗stringnullableGateway involved in this event (if any).
actionstringrequiredAction taken (e.g. `submitted`, `approved`, `rejected`, `retry_scheduled`).
rejection_codestringnullableNormalized rejection code at this step (if applicable).
provider_rejection_codestringnullableProvider-specific rejection code.
created_attimestamprequiredWhen the log row was created in Debi.
updated_attimestamprequiredTime at which the source record was last updated.
processed_attimestampnullableWhen the underlying action was processed by the bank/provider.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Relaciones

Gateway gateways

A provider/processor configuration owned by the tenant (e.g. Fiserv, Prisma, Mercado Pago, CBU-Galicia). Connects Debi to a specific bank or PSP credentials.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique gateway public ID.
ej. GWBZqKYEK7Y2
providerstringrequiredProvider name.
amexbacbanamexbanistmobanortecabalcbu-bindcbu-galiciacbu-patagoniafavacardfiserv-argentinafiserv-mexicomercado-pagonaranjapaywayprisma-visaprisma-visa-debitprisma-mastercardwompi
numberstringrequiredMerchant identifier with the provider (e.g. comercio number).
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
approved_attimestampnullableWhen the gateway was approved/activated.
last_connected_attimestampnullableLast successful connection.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Session sessions

Hosted-checkout or link-driven session. Each session represents a single attempt by a customer to complete a payment, subscription or mandate flow. Generated by a `link` or directly by the API.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique session public ID.
ej. SSmQ6j9NWxblNv
link_idintegernullableParent link.
resource_idintegernullablePolymorphic reference to the created resource (payment / subscription / mandate).
customer_idintegernullableCustomer that opened the session.
kindstringrequiredWhat the session is meant to create.
paymentsubscriptionmandate
descriptionstringnullableSession description.
metadatajsonnullableFree-form key/value pairs.
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
opened_attimestampnullableWhen the customer opened the hosted page.
completed_attimestampnullableWhen the customer completed the flow.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Relaciones

Event events

Immutable log of every API event emitted by the tenant's account (the same events fired to webhook endpoints). One row per event delivery.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique event public ID.
ej. EVm3RnKn3knw
resource_idstringnullablePublic ID of the resource the event refers to (extracted from `data.object.id`).
ej. PYa8EJ1DkDnY
typestringrequiredEvent type. See webhooks docs for the full list (e.g. `payment.created`, `subscription.cancelled`).
resourcestringrequiredType of resource the event refers to.
customergatewayimportmandatepaymentpayment_methodsubscription
datajsonrequiredFull snapshot of the resource at the time of the event (mirrors webhook payload).
request_idstringnullableAPI request that produced the event (if any).
ipstringnullableIP address of the request.
created_attimestamprequiredWhen the event was created.
updated_attimestamprequiredTime at which the source record was last updated.
delivered_attimestampnullableWhen all webhook endpoints were successfully notified (null if pending or undeliverable).
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.

Relaciones

  • resource_id customers.id | payments.id | payment_methods.id | subscriptions.id | mandates.id | gateways.idN — 1· polymorphic on `resource`

Webhook webhooks

Webhook endpoints configured by the tenant. Each row is an endpoint registration.

pk: idcursor: dw_loaded_at
ColumnaTipoDescripción
id🔑stringrequiredUnique webhook public ID.
ej. WHA8EJ1DkDnY
urlstringrequiredEndpoint URL receiving events.
enabled_eventsjsonrequiredArray of event types this endpoint subscribes to (`['*']` for all).
enabledbooleanrequiredWhether the endpoint is currently active.
created_attimestamprequiredCreation time.
updated_attimestamprequiredTime at which the source record was last updated.
dw_loaded_attimestamprequiredWarehouse load timestamp. Use this column as the incremental cursor when ingesting changes: it advances every time a row is published to the warehouse, so polling on it will not skip late-arriving updates.