SDK versions and upgrades
An SDK URL identifies a particular release:latest URL to follow automatically.
Versioned SDK assets use long-lived caching, with
Cache-Control: public, max-age=31536000, immutable. This one-year cache lifetime
controls how browsers and caches reuse a file. It is not the SDK’s expiration
date, a payment-session lifetime, or a promise of an indefinite support period.
An older file remaining available does not mean it supports every newer feature.
To upgrade:
- Review the target release’s integration changes with WeGive. Treat updates
within the initial
0.xseries as changes that need testing. - Update the versioned URL and its integrity hash together, or replace your complete vendored release directory.
- Exercise your payment methods, themes, callbacks, and retry handling with test keys. Run your application’s normal type and build checks.
- Deploy the updated reference. Keep the previous version reference available for rollback if it remains supported for your integration.
The lifetimes are different
Pop-up lifecycle
Initialize the SDK, then callmountButton() or open() from a user interaction.
The pop-up handles the donor flow and returns one terminal SDK result:
success, pending, scheduled, cancel, or error.
A result promise and its corresponding callback describe the same checkout.
Use one primary completion handler to avoid duplicate application side effects.
pending means payment is awaiting confirmation; scheduled means a recurring
plan was created without an initial payment. Neither means a payment settled.
Closing the window or receiving cancel is not proof that an already submitted
payment did not reach WeGive. If the donor closes checkout during processing,
check the recorded result before inviting a replacement donation.
Removing the button only removes that button and its listener. It does not cancel
an open checkout, refund a transaction, or stop a recurring plan. The SDK does not
expose a programmatic payment-cancellation or refund method.
Payframes and fraud-session lifecycle
Mounting Payframes establishes the browser context for tokenization. Callingtokenize() returns card values and, when available, a fraudSessionId. Include a
valid fraud-session handle in your backend processing request.
A form can remain open longer than its fraud session. Tokenizing an already
mounted form does not guarantee the original session was refreshed. For a
long-lived form, obtain a fresh session near the first submission:
Cleanup in a single-page application
Keep the handles returned by SDK methods and release them in your framework’s unmount hook:mountFields()
in your component’s error state. Mounting again requires fresh field entry;
destroy() does not cancel any backend request already sent.