Skip to main content
Transactions in rinne-js represent the checkout amount and context used by wallet elements during authorization. Create a new transaction whenever totals change so wallet sheets and backend charge requests stay aligned.

Create a Transaction

Use rinne.transaction.create() before mounting Apple Pay or Google Pay.
amount
number
required
Amount in cents.
currency
string
default:"BRL"
ISO 4217 currency code.
country
string
default:"BR"
ISO 3166 country code.
lineItems
Array<{ label: string; amount: number }>
Optional line item breakdown used by wallet UIs.

Behavior Notes

  • The SDK initializes lazily on first transaction/element call.
  • currency defaults to BRL and country defaults to BR.
  • Returned transactions are intended to be passed into wallet elements.
Create a new transaction whenever checkout totals change. Keep the transaction amount aligned with what you charge on your backend.

Example with Dynamic Cart