> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SubscriptionProductChargeAttempt

> A paid hiring attempt: the stored context, gateway outcome and resolution of one plan purchase (subscription/hiring-confirmation, ADR 0154).

## Primary key

[Navigate to header](#param-commercial-activity)

document\_id

uuid

default:"Random UUID"

public

required

Unique identifier of the subscription product charge attempt.

## Specific attributes

[Navigate to header](#param-commercial-activity)

charge\_amount

numeric

public

required

Amount charged for the hiring, in the currency of the sales order.

**Rules**: Precision: 18, Scale: 2

[Navigate to header](#param-commercial-activity)

client\_kind

varchar

public

required

`modern` when the client sent an `Idempotency-Key` and accepts the 202 pending answer; `legacy` otherwise.

**Rules**: Possible values: legacy, modern. Max length: 10 characters

[Navigate to header](#param-commercial-activity)

context

jsonb

public

required

Versioned snapshot of the request and its pricing (price version, cycle, licenses, coupon, proration), used to activate the plan when the payment is confirmed later.

[Navigate to header](#param-commercial-activity)

decline\_reason

varchar

public

Normalised reason when the gateway declined the charge or the attempt expired.

**Rules**: Possible values: card\_declined, insufficient\_funds, other. Max length: 40 characters

[Navigate to header](#param-commercial-activity)

expires\_at

timestamp

public

required

Time after which a pending attempt is voided at the gateway (30 minutes after it is created).

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

gateway

varchar

public

required

Gateway that ran the initial charge; `none` for a \$0 hiring.

**Rules**: Possible values: fintoc, none, oneclick. Max length: 30 characters

[Navigate to header](#param-commercial-activity)

gateway\_reference

varchar

public

Gateway identifier of the charge (Fintoc invoice or OneClick buy order).

**Rules**: Max length: 100 characters

[Navigate to header](#param-commercial-activity)

idempotency\_key

varchar

public

required

Client key of the attempt, unique per account.

**Rules**: Max length: 100 characters

[Navigate to header](#param-commercial-activity)

resolution\_source

varchar

public

What resolved the attempt: the request itself, the gateway webhook, the reconciler or the void at expiry.

**Rules**: Possible values: reconcile, request, void, webhook. Max length: 20 characters

[Navigate to header](#param-commercial-activity)

resolved\_at

timestamp

public

Timestamp when the subscription product charge attempt was resolved.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

status

varchar

default:"pending"

public

required

`pending` until the outcome is known; `confirmed` activates the plan, `declined` and `expired` leave no charge. A late payment moves `expired` or `declined` to `confirmed`.

**Rules**: Possible values: confirmed, declined, expired, pending. Max length: 20 characters

## Foreign keys

[Navigate to header](#param-commercial-activity)

account

uuid

public

required

Reference to the Account this subscription product charge attempt belongs to. [Ref: Account Schema](https://docs.bbrands.io/schemas/account/account.md)

[Navigate to header](#param-commercial-activity)

code\_coupon\_account

uuid

public

Optional reference to the Code Coupon Account associated with the subscription product charge attempt. [Ref: Code Coupon Account Schema](https://docs.bbrands.io/schemas/code/code-coupon-account.md)

[Navigate to header](#param-commercial-activity)

debt

uuid

public

Optional reference to the Debt associated with the subscription product charge attempt. [Ref: Debt Schema](https://docs.bbrands.io/schemas/payment/debt.md)

[Navigate to header](#param-commercial-activity)

payment\_method

uuid

public

Optional reference to the Payment Method associated with the subscription product charge attempt. [Ref: Payment Method Schema](https://docs.bbrands.io/schemas/payment/payment-method.md)

[Navigate to header](#param-commercial-activity)

sales\_order

uuid

public

Optional reference to the Sales Order associated with the subscription product charge attempt. [Ref: Sales Order Schema](https://docs.bbrands.io/schemas/sales/sales-order.md)

[Navigate to header](#param-commercial-activity)

subscription

uuid

public

required

Reference to the Subscription this subscription product charge attempt belongs to. [Ref: Subscription Schema](https://docs.bbrands.io/schemas/subscription/subscription.md)

[Navigate to header](#param-commercial-activity)

subscription\_product

uuid

public

Optional reference to the Subscription Product associated with the subscription product charge attempt. [Ref: Subscription Product Schema](https://docs.bbrands.io/schemas/subscription/subscription-product.md)

## Tracking attributes

[Navigate to header](#param-commercial-activity)

created\_at

timestamp

public

required

Timestamp when the record was created.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

deleted\_at

timestamp

public

Timestamp when the record was soft-deleted, when applicable.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

is\_actived

boolean

default:"true"

public

required

Indicates whether the record is currently active.

[Navigate to header](#param-commercial-activity)

is\_deleted

boolean

default:"false"

public

required

Indicates whether the record has been soft-deleted.

[Navigate to header](#param-commercial-activity)

updated\_at

timestamp

public

Timestamp when the record was last updated.

**Rules**: Precision: 6, with timezone


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.