Table of contents

Testing

The Revio sandbox environment provides a mock-bank infrastructure for comprehensive testing.

‍

Overview

The sandbox allows you to:

  • Test mandate creation, collections, and payments
  • Simulate bank processing and status changes
  • Test error scenarios and edge cases
  • Verify webhook integrations

‍

Getting Started

Request Test Credentials

Contact Precium at support@precium.com to request sandbox credentials:

  • client_id (username)
  • client_secret (password)

‍

Test Resources

ResourceLocation
Postman CollectionDownload
Swagger Documentationhttps://dev.api.revio.co.za/swagger/index.html
Sandbox APIhttps://dev.api.revio.co.za/
Production APIhttps://api.revio.co.za/ — do not test against this

‍

Test Merchant Profile

Use this pre-configured profile for sandbox testing:

‍

FieldValue
id24
profileCodeTEST1
abbreviatedNameTESTMERCH1
accountNumber12345678
branchCode051001
nameTEST MERCHANT 1
instrumentsEFTONEDAY, EFTTWODAY, EFTSAMEDAY, DEBICHECK
currencyZAR
entryClass21
createdByClient109

‍

Mock Bank Simulation

The mock bank simulates real bank processing, including:

  • Status changes (PENDING → COMPLETED/UNPAID)
  • Business rules enforcement
  • Response file generation

‍

Simulation Scenarios

InstrumentAvailable Tests
EFT Debit OrderCreate mandate, amend mandate, create collection
DebiCheckCreate mandate (TT1/TT2), amend mandate, cancel/suspend, create collection
EFT PaymentsCreate payment, delete payment

‍

EFT Collection Test Scenarios

Use specific account numbers to simulate different outcomes:

‍

Account Number Scenarios

Account NumberScenarioDescription
910000001Full rejectReceive full rejection response
910000002Batch rejectionReceive batch rejection response
210000001DisputeDispute file 40 seconds after response
110000001AcceptedAccepted file 40 seconds after pending
110000002UnpaidUnpaid file 40 seconds after pending
110000003Accepted (3 days)Accepted with settlement 3 days out
110000004Unpaid (3 days)Unpaid with settlement 3 days out
110000005Accepted (5 days)Accepted with settlement 5 days out
110000006Unpaid (5 days)Unpaid with settlement 5 days out
Any otherSuccessAccepted response

‍

Example: Test Unpaid Collection

BASH

curl -X POST https://dev.api.revio.co.za/v2/mandate/eft/ \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "debtor": {
      "accountNumber": "110000002",
      ...
    },
    ...
  }'

‍

DebiCheck Mandate Test Scenarios

Use specific contract references to simulate authentication outcomes:

‍

Contract Reference Scenarios

Contract ReferenceScenarioDescription
NORESPONSENo responseCustomer doesn't respond within 120 seconds
FAILINITInit failureUnexpected bank error during authentication
REJECTRejectedCustomer rejects the mandate
TIMEOUTTimeoutAuthentication times out waiting for bank
Any otherSuccessMandate authenticated successfully

‍

Example: Test Rejected Mandate

BASH

curl -X POST https://dev.api.revio.co.za/v2/mandate/debicheck/ \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contractReference": "REJECT",
    "authenticationType": "REALTIME",
    ...
  }'

‍

Example: Test No Response

BASH

curl -X POST https://dev.api.revio.co.za/v2/mandate/debicheck/ \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contractReference": "NORESPONSE",
    "authenticationType": "REALTIME",
    "fallbackAuthenticationType": "DELAYED_WITHOUT_AUTH",
    ...
  }'

‍

Webhook Testing

Simulate Status Changes

Test callback handling by simulating status changes:

‍

BASH

curl -X POST https://dev.api.revio.co.za/v2/callback/test/collection/eft/{collectionId}/ \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "collectionStatus": "UNPAID",
    "callbackVersion": "V2"
  }

‍

Test with Override URL

Send callbacks to a test endpoint:

‍

BASH

curl -X POST https://dev.api.revio.co.za/v2/callback/test/collection/eft/{collectionId}/ \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "overrideUrl": "https://webhook.site/your-test-id",
    "collectionStatus": "COMPLETED",
    "callbackVersion": "V2"
  }'

‍

Testing Checklist

Mandate Management

  • Create EFT mandate
  • Create DebiCheck mandate (REALTIME)
  • Create DebiCheck mandate (DELAYED)
  • Get mandate status
  • Amend mandate
  • Test authentication failure scenarios

‍

Collections

  • Create EFT collection from the mandate
  • Create a DebiCheck collection from the mandate
  • Get collection status
  • Test unpaid scenarios
  • Test dispute scenarios

‍

Payments

  • Create a same-day EFT payment
  • Create a one-day EFT payment
  • Create a two-day EFT payment
  • Get payment status

‍

Webhooks

  • Register callback URL
  • Receive collection status callback
  • Receive mandate status callback
  • Handle all status types

‍

Error Handling

  • Invalid authentication
  • Missing required fields
  • Invalid account numbers
  • Duplicate references

‍

DebiCheck Implementation Tips

When implementing DebiCheck, consider:

‍

Client References

Ensure each mandate has a unique contract reference (max 14 characters). This appears on customer bank statements alongside your abbreviated name.

‍

Timing

Plan for authentication outside business hours:

  • DebiCheck mandates can only be obtained 06:00-20:00 weekdays
  • Consider switching to TT2 (batch) for after-hours onboarding

‍

Managing Failures

  • Implement retry logic with realtimeAuthRetries
  • Use fallbackAuthenticationType for automatic failover
  • Follow up with customers who ignore authentication requests

‍

Mandate Rules

ConsiderationGuidance
Value TypeChoose FIXED, VARIABLE, or USAGEBASED based on billing model
Amount AdjustmentsUse adjustmentRate OR adjustmentAmountCents, not both
Max AmountSet maxAmountCents to accommodate your maximum expected collection
Collection DayPresent collections for the authenticated day only
TrackingAllocate enough tracking days (max 10) for your retry strategy

‍

Collection Timing

  • Submit collections at least 2 calendar days before the collection day
  • Do not adjust for public holidays or weekends (or use allowDateAdjustment)
  • Only collect on authenticated mandates

‍

Mandate Management

Consider creating new mandates rather than amending existing ones to avoid complexity in re-authentication scenarios.

‍

Test Data

Valid Test ID Numbers

Use a valid South African ID number format:

  • 0001010000006
  • 8501015800089
  • 0001010000089

‍

Test Phone Numbers

Use format +27-XXXXXXXXX:

  • +27-123456789
  • +27-615333440
  • +27-987654321

‍

Test Bank Details

BankBranch Code
ABSA632005, 632500
Standard Bank051001
FNB250655
Nedbank198765
Capitec470010

‍

Moving to Production

Once testing is complete:

  1. Review the Going Live checklist
  2. Contact your Revio account manager for production credentials
  3. Update your application configuration
  4. Perform smoke tests in production

‍

Important: Never use production credentials in sandbox or vice versa.