Skip to main content

Documentation

Sandbox Funds

In the sandbox, you can change the amount of funds in your Rapyd Wallet. These methods work with any amount and any currency.

Add Funds to Wallet Account

Transfer virtual currency to a Rapyd Wallet account.

If the account does not already exist for the indicated currency, it is created.

Use this method in the sandbox for testing purposes.

This method triggers the Funds Added Webhook.

    • amount

    • Amount of the transaction. Decimal.

    • currency

    • Three-letter ISO 4217 code for the currency used in the amount field.

    • ewallet

    • ID of the Rapyd Wallet. String starting with ewallet_.

Code Samples
    • .NET

      • using System;
        using System.Text.Json;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        var metadata = new
                        {
                            merchant_defined = true
                        };
        
                        var requestObj = new
                        {
                            ewallet = "ewallet_554f0be25b653e4a578db9b7df058e31",
                            amount = "5000",
                            currency = "PHP",
                            metadata,
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/account/deposit", request);
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const body = {
              ewallet: 'ewallet_554f0be25b653e4a578db9b7df058e31',
              amount: '5000',
              currency: 'PHP',
              metadata: {
                merchant_defined: true
              }
            };
            const result = await makeRequest('POST', '/v1/account/deposit', body);
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        $body = [
            'ewallet' => 'ewallet_554f0be25b653e4a578db9b7df058e31',
            'amount' => '5000',
            'currency' => 'PHP',
            'metadata' => [
                'merchant_defined' => true
            ],
          ];
        
        try {
            $object = make_request('post', '/v1/account/deposit', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        wallet = 'ewallet_554f0be25b653e4a578db9b7df058e31'
        body = {
            "ewallet": wallet,
            "amount": "5000",
            "currency": "PHP",
            "metadata": {
                "merchant_defined": True
            }
        }
        results = make_request(method='post', path='/v1/account/deposit', body=body)
        pprint(results)
        
  • /v1/account/deposit

  • Add Funds to Wallet Account

  • curl -X post
    https://sandboxapi.rapyd.net/v1/account/deposit
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '{
        "amount": 1000,
        "currency": "USD",
        "ewallet": "ewallet_755b0fd11fd22b33328fff7d30f3ce30",
        "metadata": {
            "merchant_defined": true
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "2f166dcf-19a5-4393-aa47-bf6e3434b3b6"
        },
        "data": {
            "id": "c10e06e8-c93a-46ea-a16c-3a45639663ba",
            "account_id": "ef17c6f3-fcdc-11ea-bbd7-02c4887b9dab",
            "phone_number": "+14155551934",
            "amount": 5000,
            "currency": "PHP",
            "balance_type": "available_balance",
            "metadata": {
                "merchant_defined": true
            }
        }
    }
Get Details of Add Funds Request

Retrieve details of a specific Add Funds to Wallet Account request.

Use this method in the sandbox for testing purposes.

Code Samples
    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string id = "04c5e3f6-bd50-473d-8722-869a7e5c97bb";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/account/deposit/{id}");
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const result = await makeRequest(
              'GET',
              '/v1/account/deposit/04c5e3f6-bd50-473d-8722-869a7e5c97bb'
            );
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('get', '/v1/account/deposit/04c5e3f6-bd50-473d-8722-869a7e5c97bb');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        id = '04c5e3f6-bd50-473d-8722-869a7e5c97bb'
        
        results = make_request(method='get', path=f'/v1/account/deposit/{id}')
        pprint(results)
  • /v1/account/deposit/:id

  • Get Details of Add Funds Request

  • curl -X get
    https://sandboxapi.rapyd.net/v1/account/deposit/04c5e3f6-bd50-473d-8722-869a7e5c97bb
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "8032d3d3-d5cf-4de1-a41a-8b3a5ea6f8a2"
        },
        "data": {
            "id": "04c5e3f6-bd50-473d-8722-869a7e5c97bb",
            "account_id": "0a6bff42-48f7-11ea-833c-02e199f7f6f5",
            "phone_number": "+14155539886",
            "amount": 5000,
            "currency": "MXN",
            "balance_type": "available_balance",
            "metadata": {
                "merchant_defined": true
            }
        }
    }
Remove Funds From Wallet Account

Remove virtual currency from a Rapyd Wallet account.

If the account does not have sufficient funds in the indicated currency, the funds transfer fails.

Use this method in the sandbox for testing purposes.

This method triggers the Funds Removed Webhook.

    • amount

    • The amount of the transaction. Decimal.

    • currency

    • Three-letter ISO 4217 code for the currency used in the amount field.

    • ewallet

    • ID of the Rapyd Wallet. String starting with ewallet_.

Code Samples
    • .NET

      • using System;
        using System.Text.Json;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        var metadata = new
                        {
                            merchant_defined = true
                        };
        
                        var requestObj = new
                        {
                            ewallet = "ewallet_090e1ef18c3aa754fd43cce9ee454858",
                            amount = "100",
                            currency = "USD",
                            metadata,
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/account/withdraw", request);
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const body = {
              ewallet: 'ewallet_090e1ef18c3aa754fd43cce9ee454858',
              amount: '100',
              currency: 'USD',
              metadata: {
                merchant_defined: true
              }
            };
            const result = await makeRequest('POST', '/v1/account/withdraw', body);
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        $body = [
            'ewallet' => 'ewallet_090e1ef18c3aa754fd43cce9ee454858',
            'amount' => '100',
            'currency' => 'USD',
            'metadata' => [
                'merchant_defined' => true
            ],
          ];
        
        try {
            $object = make_request('post', '/v1/account/withdraw', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        wallet = 'ewallet_090e1ef18c3aa754fd43cce9ee454858'
        body = {
            "ewallet": wallet,
            "amount": "100",
            "currency": "USD",
            "metadata": {
                "merchant_defined": True
            }
        }
        results = make_request(method='post', path='/v1/account/withdraw', body=body)
        pprint(results)
  • /v1/account/withdraw

  • Remove Funds From Wallet Account

  • curl -X post
    https://sandboxapi.rapyd.net/v1/account/withdraw
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '{
        "ewallet": "ewallet_090e1ef18c3aa754fd43cce9ee454858",
        "amount": "100",
        "currency": "USD",
        "metadata": {
            "merchant_defined": true
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "23a82f1d-397b-46a7-9077-1335642754e0"
        },
        "data": {
            "id": "8efa7651-ae65-481c-a025-d93f6b902859",
            "account_id": "96dd8958-48cf-11ea-833c-02e199f7f6f5",
            "phone_number": "+14155539886",
            "amount": -100,
            "currency": "USD",
            "balance_type": "available_balance",
            "metadata": {
                "merchant_defined": true
            }
        }
    }
Get Details of Remove Funds Request

Retrieve details of a specific Remove Funds From Wallet Account request.

Use this method in the sandbox for testing purposes.

Code Samples
    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string id = "91ddcad5-5876-4731-8afd-8ddea84e4846";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/account/withdraw/{id}");
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const result = await makeRequest(
              'GET',
              '/v1/account/withdraw/91ddcad5-5876-4731-8afd-8ddea84e4846'
            );
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('get', '/v1/account/withdraw/91ddcad5-5876-4731-8afd-8ddea84e4846');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        id = '91ddcad5-5876-4731-8afd-8ddea84e4846'
        
        results = make_request(method='get', path=f'/v1/account/withdraw/{id}')
        pprint(results)
  • /v1/account/withdraw/:id

  • Get Details of Remove Funds Request

  • curl -X get
    https://sandboxapi.rapyd.net/v1/account/withdraw/bad146c1-95bd-4af4-8e16-01ee4770dca5
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "eb31ac1c-007c-466c-aa7d-9403c28b087b"
        },
        "data": {
            "id": "bad146c1-95bd-4af4-8e16-01ee4770dca5",
            "account_id": "41cfc9c4-349a-11eb-9403-124eb1b705c1",
            "phone_number": "+14155551238",
            "amount": -500,
            "currency": "PHP",
            "balance_type": "available_balance",
            "metadata": {
                "merchant_defined": true
            }
        }
    }