Test before switching to live keys
Usepk_test_ and, for Payframes, a matching sk_test_ key. Test and live mode
use the same public SDK, checkout, and API URLs. Use the test payment details
provided for your account’s processor. A familiar test card from another
processor is not guaranteed to work with your configuration.
Verify the paths you offer:
Check WeGive’s recorded donation details: organization, test mode, currency,
amount, brand, designation, campaign, and recurring schedule. Check receipts and
the reporting fields your integration relies on. Browser callbacks alone do not
replace checking the recorded result.
Once your test cases pass and your account is enabled for live processing, change
to your live credentials. For Payframes, switch browser and server credentials
together. Keep the same pinned SDK URL.
SDK fails to load
- Confirm the exact versioned file URL, including
/v0.1.0/and the filename. - If using
integrity, verify that its hash belongs to that exact file and version. - Load the SDK before calling
WeGive.Pay.init(); do not race anasyncscript. - Check your site’s content security policy and the browser’s Network panel.
- For a vendored ESM build, include the manifest’s companion JavaScript files.
- Initialize in browser code, not during server rendering.
Button appears, but checkout does not work
A rendered button does not prove credentials or account configuration are valid. Confirm the organization is enabled, the publishable key is active, and the exact embedding origin is allowed. Include the correct scheme and development port. Check thatamount is an integer, label is present, and any explicit currency
matches your organization’s processing currency.
Call pay.open() directly from a user interaction. Browser popup blockers can
reject a call after an awaited network request. Do not launch checkout through
your own iframe, window-message implementation, or hand-built checkout URL.
If checkout opens but the result never reaches your page, examine browser policies
that isolate windows or remove the opener relationship, and test in a regular
browser outside an application’s embedded webview.
Payframes are blank or invalid
Mount into existing, separate containers with visible height. Wait for mounting to finish, then callready(). Check for blocked secure-field or verification
resources in the Network panel and confirm the publishable key’s origin settings.
ready() does not mean the card is valid. Check isValid() after the donor fills
all three fields and still handle a rejected tokenize() call. Host-page CSS
cannot style inside the fields; use the SDK’s style option.
For a fraud-session error before first submission, confirm your browser and
server keys belong to the same organization and mode, use a fresh session, and
preserve the initiating browser context on the server request. Do not bypass
verification if it fails. After submission, follow retry rules rather than
changing the original request’s fraud-session value.
The API returned success, but the donation is pending or failed
HTTP success means the request received a response. Checkdata.status for a
transaction. For recurring creation, check data.cancelled and
initialTransaction.status when an initial transaction is present. A null
initial transaction represents a plan without an initial payment, not a failed
attempt to return a transaction ID.
Handle unknown or non-success states conservatively and reconcile them using the
WeGive record. Do not display a completed donation based solely on HTTP 200.