Testing and Going Live

Testing

The sandbox lets you test your integration end to end without moving money. Payments are simulated with test cards: the card number and CVV you send decide the result.

Set up the sandbox

  1. Ask your account manager to set up a card test terminal under your Live website, with test MID 0000000 or 0000001.
  2. Generate a Gateway API key in the DECTA Portal with these settings:
    • Key environment: Test
    • Key version: v0.6
    • Website: your Live website that holds the card test terminal
    • Default terminal: the card test terminal (0000000 or 0000001)
  3. Send this test key as a Bearer token in your Gateway API requests. Card transactions made with it are simulated.
  4. Optional: set up webhooks to receive test events as they happen.

Test cards

Card numberSchemeUsed for
4111 1111 1111 1111VisaAll scenarios. Default card for successful results where no CVV is sent.
5105 1051 0510 5100MastercardAll scenarios. Default card for failed results where no CVV is sent.
4242 4242 4242 4242VisaAUTH NAME only.

How the result is chosen:

  • Flows with a CVV (purchase, AUTH, wallet): the CVV decides the result. Both main cards behave the same.
  • Flows without a CVV (MOTO, P2P/B2P/A2A/OG, recurring and automatic): the card number decides the result. 4111… succeeds, 5105… fails.
  • One-click: 4111… with CVV 022 succeeds.

In the tables below, any test card means 4111 1111 1111 1111 or 5105 1051 0510 5100.

Purchase (SMS)

SMS is the default payment type. The CVV decides the result. Use CVV 010 for a successful SMS payment. CVV 000 is for DMS only.

CardCVVStatusprocessing_idProcessing codeNotes
Any test card010Paid000000010000 Approved3DS authenticated
Any test card011Failed000000011116 Not sufficient funds—

Purchase (DMS)

The CVV decides the result and the 3-D Secure outcome.

CardCVVStatusprocessing_idProcessing codeNotes
Any test card000Paid000000000000 ApprovedNo 3DS
Any test card300Paid000000300000 Approved3DS authenticated
Any test card301Paid000000301000 Approved3DS attempted
Any test card302Paid000000302000 ApprovedCard not enrolled in 3DS
Any test card001Failed000000001116 Not sufficient funds—
Any test card201Failed000000201—3DS failed

Authorization (AUTH)

The CVV decides the result.

CardCVVStatusprocessing_idProcessing codeNotes
Any test card018Paid000000018000 Approved—
Any test card019Failed000000019120 Transaction not permitted to terminal—

Recurring and one-click

The sandbox supports only cards saved on the DECTA side. Cards saved on your side (saved_by_merchant) cannot be tested in the sandbox.

  1. One-click (CIT): the payer is present. The checkout page shows the saved card details pre-filled, and the payer enters the CVV.
  2. Recurring and automatic (MIT): the payer is not present and no CVV is sent. The card number decides the result.
CardCVVStatusprocessing_idProcessing codeNotes
4111 1111 1111 1111022Paid000000022000 ApprovedOne-click
4111 1111 1111 1111—Paid000000022000 ApprovedRecurring or automatic
5105 1051 0510 5100—Failed000000023116 Not sufficient fundsRecurring or automatic

To test:

  1. Save the card on the DECTA side: make a first payment with the test card and a successful CVV, for example 000. Check that it is Paid.
  2. Create a new order with POST /orders/, passing original_client (or recurring_card) and use_scenario.
  3. For one-click (use_scenario: one-click): open the checkout page. The card details are pre-filled. Enter CVV 022.
  4. For recurring or automatic (use_scenario: recurring or automatic): send POST /orders/{order_id}/charge/ without a request body. No CVV is sent.
  5. Check the result against the table.

Reversal and refund

Full and partial reversals and refunds succeed on any paid order. To test a failure, pay the original order with CVV 028. The CVV column shows the CVV used for the original order.

CardCVVStatusprocessing_idProcessing codeNotes
Any test card—Paid000000000000 ApprovedOriginal order paid via DMS
Any test card—Paid000000010000 ApprovedOriginal order paid via SMS
4111 1111 1111 1111028Failed000000029911 Card issuer timed out—

Wallet funding

The CVV decides the result.

CardCVVStatusprocessing_idProcessing codeNotes
Any test card014Paid000000014000 Approved—
Any test card015Failed000000015116 Not sufficient funds—

Wallet purchase

The CVV decides the result.

CardCVVStatusprocessing_idProcessing codeNotes
Any test card016Paid000000016000 Approved—
Any test card017Failed000000017116 Not sufficient funds—

MOTO

No CVV is sent. The card number decides the result.

CardCVVStatusprocessing_idProcessing codeNotes
4111 1111 1111 1111—Paid000000012000 Approved—
5105 1051 0510 5100—Failed000000012116 Not sufficient funds—

P2P, B2P, A2A and OG

No CVV is sent. The card number decides the result.

CardCVVStatusprocessing_idProcessing codeNotes
4111 1111 1111 1111—Paid000000002——
5105 1051 0510 5100—Failed000000003——

AUTH NAME

No CVV is sent. Both cards return a successful result.

CardCVVStatusprocessing_idProcessing codeNotes
4111 1111 1111 1111—Paid000000004——
4242 4242 4242 4242—Paid000000005——

Processing codes

CodeMeaning
000Approved
116Decline, not sufficient funds
120Decline, transaction not permitted to terminal
911Decline, card issuer timed out

New Sandbox Framework (Interactive Logic)

Sandbox Integration Setup

  1. Request your account manager to set up a sandbox test terminal for the payment method under a Test website.
  2. Generate your Gateway API Key in the DECTA Portal:
    • Key environment: Select Test environment.
    • Key version: Select v0.6.
    • Website: Select your assigned Test website.
    • Default terminal: Select the sandbox terminal created under the Test website.
  3. Use the sandbox API Key as a Bearer token in Gateway API requests.
  4. (Optional) Configure webhooks to receive real-time asynchronous test events.

Interactive Payment Flows & Testing Scenarios

DECTA provides simulated authorization tools within the Sandbox environment to perform end-to-end integration testing safely without moving funds or relying on external third-party production providers.

Redirect Flows (Mockup Page)

For payment methods utilizing a user redirect step:

  1. Create an order by passing the required method parameters via the Gateway API.
  2. Redirect the payer to the mockup URL returned by the Gateway API:
    • Full Page Integration: Redirect to full_page_url.
    • Host2Host Integration: Redirect to redirect_url.
  3. On the interactive Mockup Page, select the desired outcome scenario:
    • AUTHENTICATE: Simulates an approved transaction. The status updates to SUCCESS, and a success callback is sent.
    • REJECT: Simulates a declined transaction. The status updates to FAILED and a decline callback is sent.
  4. Abandonment Sync: If the page is abandoned or closed without a selection, the payment remains IN_PROGRESS until internal synchronization automatically moves the status to FAILED and dispatches the callback.

Testing Sandbox Refunds

For methods supporting refunds within the new sandbox framework, refund requests function identically to production workflows. Simulated outcome triggers are determined by the requested refund amount:

  • Simulate Failed Refund: Submit a refund request with an amount ending in 4 (e.g., 1.54, 200.04).
  • Simulate Successful Refund: Submit any other refund amount.

Going Live

The testing phase ends at your request, after which you will be provided with real terminals with the appropriate settings and permissions.