Verify accounts using micro-deposits
Verify accounts using micro-deposits
Verify accounts using micro-deposits
When a customer cannot sign in to their account and authenticate instantly, Micro Challenge Deposits (MCD) act as your fallback. MCDs verify account ownership by confirming the customer can access their bank statement and identify specific deposits.
Trustly automatically handles the logic to choose the best available method:
Automatic Fallback: You do not need to implement logic to choose between these methods. If a bank is not eligible for Instant payments, Trustly automatically defaults to legacy MCD to ensure the account can still be verified.
The initial bank authorization does not change. Pass in the same establishData object as was provided during the original authorization.
In the following example, the paymentType is set to 'Retrieval' for Data products. If you are using Trustly Pay, set this to 'Deferred'.
See Securing Requests to learn how to calculate the requestSignature
Do not pass Consumer PII (name, email address, etc) in the description field. You can pass Consumer PII in the customer object.


You can use our Sandbox Merchant Portal to view the test account verification deposit code that was generated for the Bank Authorization.

Click the Transaction ID to bring up the details. Scroll down to the Account Verification Deposits section and then copy the Reference Code value.
For Instant MCD, this value is a three letter code that a customer finds in the penny-drop deposit description. For legacy MCD, this value is a three letter code that a customer finds in the ACH deposit description.

The following examples use the JavaScript SDK. For guidance on building for mobile apps, see Mobile SDKs .
{accessId} with the Access Id provided to you by Trustly):TrustlyOptions object:For details on the Trustly configuration options, refer to the SDK Specification.
establishData object:Ensure you’re securing your call by including the requestSignature parameter.
establish function:The following is a full HTML page using the above example.
You’ll want to replace accessId and merchantId with the values provided to you by Trustly
Using the verification HTML you created, launch the Trustly Lightbox.

After entering the code retrieved from the Sandbox Merchant Portal and clicking Continue, the customer is directed back to your site.
Once you get a successful redirect to your returnUrl, you must check the payment.account.verified status to determine if the customer has been verified instantly or requires further action.
If the customer’s bank supports Instant Payment rails (RTP or FedNow), Trustly attempts a penny drop ($0.01) verification. The user locates a 3-letter code in their banking app and enters it on the Trustly-hosted page before being redirected to you.
Check for the following values:
payment.paymentProvider.type is 2 (Manual Entry)status is 2 (Authorized)payment.account.verified is trueIf payment.account.verified is true, the account is verified. You can proceed immediately; the user has already successfully entered their 3-letter code.
If the bank is not eligible for instant payments, or if the customer did not successfully complete verification, the transaction defaults to legacy MCD. The customer must wait one to three business days for the deposit to settle and return later.
Check for the following values:
payment.paymentProvider.type is 2 (Manual Entry)status is 2 (Authorized)payment.account.verified is falseBecause payment.account.verified is false, you must message the customer to return to your site when they are ready to verify their account with the Establish Data object.
Verification Pending: Check your bank statement for a deposit.
Instant MCD (RTP or FedNow): Look for a $0.01 deposit containing a 3-letter code. This typically appears in seconds.
Trustly sends a webhook notification to your system for every transaction status change. For Instant MCD, you can use this webhook to confirm verification on your backend, which is more reliable than the browser redirect.
The logic for the webhook payload mirrors the redirect logic. Check the payload for:
payment.paymentProvider.type is 2 (Manual Entry)status is 2 (Authorized)payment.account.verified is trueIf these conditions are met, the account is verified. You can safely update the customer’s status in your database to Active or Verified.
Trustly offers a Demo Bank in the Sandbox environment that can be used to trigger a number of testing scenarios. See Testing
Trustly uses conventional HTTP response codes to indicate success or failure of an API request.
Not all errors map cleanly onto HTTP response codes, however. In addition to the HTTP response code, Trustly returns an array of error objects that describes the errors as a JSON string such as the example below.