Testing Virtual Account Transactions in Sandbox

External Incoming ACH Transactions

/create_test_virtual_account_ach_transaction

This endpoint, which is only callable in Sandbox, will create a test external incoming virtual account ACH transaction for testing purposes.

  

Requests

Only the authsignature header is required for this request.

  
POST /0.2/create_test_virtual_account_ach_transaction HTTP/1.1
Host: sandbox.silamoney.com
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
Content-Type: application/json

{
  "header": {
    "created": 1234567890, 
    "app_handle": "handle.silamoney.eth", 
    "user_handle":"user.silamoney.eth", 
    "version": "0.2",
    "crypto": "ETH", 
    "reference": "<your unique id>"
  },
    "amount": "amount of sila to fund the virtual account with",
    "virtual_account_number": "vaccount number to transact with",
    "tran_code": "transaction code for the generated file transaction",
    "effective_date": "effective date for the generated file transaction",
    "entity_name": "Name of test entity for transaction",
    "ced": "PAYROLL",
    "ach_name": "ach business name"
}

***

HTTP/1.1 200 OK

{
  "success": true,
  "status": "SUCCESS",
  "response_time_ms": "171",
  "reference": "<your unique id>",
  "message": "Transaction submitted to the processing queue."
}
let vAccountId = 'virtual account id';
let accountNumber = 'virtual account number';

const res = await sila.createTestVirtualAccountAchTransaction(userHandle, userPrivateKey, vAccountId,accountNumber);    

// Success Response Object  
{
  "statusCode": 200,
  "headers": {
    "server": "nginx/1.14.0 (Ubuntu)",
    "date": "Fri, 25 Mar 2022 11:45:18 GMT",
    "content-type": "application/json",
    "content-length": "166",
    "connection": "close",
    "access-control-allow-origin": "*",
    "access-control-allow-headers": "*",
    "allow": "POST, OPTIONS",
    "vary": "Cookie"
  },
  "data": {
    "success": true,
    "status": "SUCCESS",
    "message": "Transaction submitted to processing queue.",
    "reference": "44cfa09b-794a-43ca-bae3-6b796e5dd26b",
    "response_time_ms": "188"
  }
}
payload = {
    "user_handle": user_handle,
    "amount": 50,
    "virtual_account_number": v_no,
    "tran_code": 22,
    "entity_name": "Test transfer",
}

User.testVirtualAaccountAchTransaction(app, payload, eth_private_key)

# Success

{
   "success":true,
   "status":"SUCCESS",
   "message":"Transaction submitted to processing queue.",
   "reference":"c0326578-137c-4a73-8970-151f27478a54",
   "response_time_ms":"194",
   "status_code":200
}
String userHandle = "user.silamoney.eth";
String userPrivateKey = "some private key";
int amount = 50; // amount of sila to fund the virtual account with
String virtualAccountNumber = "vaccount number to transact with";
Date effectiveDate = new LocalDate(2022, 03, 23).toDate(); // Optional. effective date for the generated file transaction
int tranCode= "transaction code for the generated file transaction";
String entityName ="Name of test entity for transaction";
String ced= "PAYROLL"; // Optional
String achName= "ach business name"; // Optional
ApiResponse response = api.createTestVirtualAccountAchTransaction(userHandle,userPrivateKey, amount, virtualAccountNumber, effectiveDate, tranCode,entityName,ced,achName);

// Success Response
System.out.println(response.getStatusCode()); // 200
BaseResponse parsedResponse = (BaseResponse) response.getData();
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getReference()); // Reference number
System.out.println(parsedResponse.getMessage());
//Load your information
$userHandle = 'user.silamoney.eth';
$userPrivateKey = 'some private key';
$virtualAccountNumber = "Virtual Account Number";
$amount = 100;
$tranCode = 22;
$entityName = "entity Name";
$effectiveDate = null;// Optional
$ced = null;// Optional 
$achName = null;// Optional

$response = self::$config->api->createTestVirtualAccountAchTransaction($handle, $privateKey, $virtualAccountNumber, $amount, $tranCode, $entityName, $effectiveDate, $ced, $achName);
//Load your informations
int amount = 100;
string virtualAccountNumber = "9710000000000101";
int tranCode = 22;
string entityName = "Sally Smith";
DateTime? effectiveDate = DateTime.Now;
string ced = "PAYROLL";
string achName = "SILA INC";

var response = api.CreateTestVirtualAccountAchTransaction(userHandle, userPrivateKey, amount, virtualAccountNumber, tranCode, entityName, effectiveDate, ced, achName);
           
// Success Object Response
Console.WriteLine(response.StatusCode); // 200           
Console.WriteLine(((BaseResponse)response.Data).Message); // Message
Console.WriteLine(((BaseResponse)response.Data).Success); // true
Console.WriteLine(((BaseResponse)response.Data).Status); // SUCCESS
Console.WriteLine(((BaseResponse)response.Data).Reference); // ccb35eb8-xxxx-xxxx-xxxx-xxxxx
Console.WriteLine(((BaseResponse)response.Data).ResponseTimeMs); // API responses time
KeyTypeDescription
headerJSON objectRequired. Requires these keys in JSON format: created, app_handle, user_handle.
See the /check_handle endpoint for the complete list of fields in this object.
amountIntegerRequired. Amount of sila to transact with. Example: 100
virtual_account_numberStringRequired. Account number of the virtual account. Example: 971000123456789
effective_dateDateOptional. This is the date that the transaction will settle. Defaults to the current date
tran_codeIntegerRequired. Transaction code to determine operation to be preformed on the virtual account. A list of transaction codes can be found here:
22: Automated deposit (checking credit)
23: Prenote of checking credit
27: Automated payment (checking debit)
28: Prenote of checking debit
32: Automated deposit (savings credit)
33: Prenote of savings credit
37: Automated payment (savings debit)
38: Prenote of savings debit
entity_nameStringRequired. Any string. Will show up as the entity name for the virtual account ACH transaction
cedStringOptional. Defaults to "PAYROLL"
ach_nameStringOptional. ACH business name for the transaction. Defaults to "SILA INC"
  

Responses

Status CodeDescription
200Successfully created a transaction.
400The specified virtual account number does not exist.