Skip to main content

Documentation

Update Wallet

Change or modify a Rapyd Wallet.

Note

This endpoint replaces the deprecated endpoint - PUT /v1/user

  • HTTP method updated.

  • ewallet body parameter updated to path parameter.

Rapyd will continue to support the deprecated endpoint until December 31, 2024.

    • ewallet

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

    • first_name

    • First name of the Rapyd Wallet owner.

    • last_name

    • Family name of the Rapyd Wallet owner.

    • .NET

      • using System;
        using System.Text.Json;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        var metadata = new
                        {
                            merchant_defined = "updated"
                        };
        
                        var requestObj = new
                        {
                            ewallet = "ewallet_72b4ff39ca50dccc73c0ee65d85e124e",
                            ewallet_reference_id = "4-star-pro-02212021",
                            metadata,
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("PUT", "/v1/user", 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_72b4ff39ca50dccc73c0ee65d85e124e',
              ewallet_reference_id: '4-star-pro-02212021',
              metadata: {
                merchant_defined: 'updated'
              }
            };
            const result = await makeRequest('PUT', '/v1/user', 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_72b4ff39ca50dccc73c0ee65d85e124e',
            'ewallet_reference_id' => '4-star-pro-02212021',
            'metadata' => [
                'merchant_defined' => "updated"
            ]
          ];
        
        try {
            $object = make_request('put', '/v1/user', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        body = {
            "ewallet": "ewallet_72b4ff39ca50dccc73c0ee65d85e124e",
            "ewallet_reference_id": "4-star-pro-02212021",
            "metadata": {
                "merchant_defined": "updated"
            }
        }
        
        results = make_request(method='put', path='/v1/user', body=body)
        pprint(results)
  • /v1/ewallets/:ewallet

  • Update Wallet - Reference ID

  • curl -X post
    https://sandboxapi.rapyd.net/v1/ewallets/ewallet_ebad83012c3ffbb980d894cffc229f32
    -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_reference_id": "4-star-pro-02212021",
        "metadata": {
            "merchant_defined": "updated"
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "ac196637-187a-4138-9387-abf0d0ce61dc"
        },
        "data": {
            "phone_number": null,
            "email": null,
            "first_name": null,
            "last_name": null,
            "id": "ewallet_ebad83012c3ffbb980d894cffc229f32",
            "status": "ACT",
            "accounts": [],
            "verification_status": "not verified",
            "type": "person",
            "metadata": {
                "merchant_defined": "updated"
            },
            "ewallet_reference_id": "4-star-pro-02212021",
            "category": null,
            "contacts": {
                "data": [
                    {
                        "id": "cont_7ec26354caf45779d466adcded88ae67",
                        "first_name": "",
                        "last_name": "",
                        "middle_name": "",
                        "second_last_name": "",
                        "gender": "not_applicable",
                        "marital_status": "not_applicable",
                        "house_type": "",
                        "contact_type": "personal",
                        "phone_number": "",
                        "email": "",
                        "identification_type": "",
                        "identification_number": "",
                        "issued_card_data": {
                            "preferred_name": "",
                            "transaction_permissions": "",
                            "role_in_company": ""
                        },
                        "date_of_birth": null,
                        "country": "",
                        "nationality": null,
                        "address": null,
                        "ewallet": "ewallet_ebad83012c3ffbb980d894cffc229f32",
                        "created_at": 1625580563,
                        "metadata": {},
                        "business_details": null,
                        "compliance_profile": 0,
                        "verification_status": "not verified",
                        "send_notifications": false,
                        "mothers_name": ""
                    }
                ],
                "has_more": false,
                "total_count": 1,
                "url": "/v1/ewallets/ewallet_ebad83012c3ffbb980d894cffc229f32/contacts"
            }
        }
    }
  • Update Wallet Metadata

  • curl -X post
    https://sandboxapi.rapyd.net/v1/ewallets/ewallet_49765d975b781eb6ef86af4b7259e6e4
    -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 '{
        "metadata": {
            "merchant_defined": "updated data"
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "2beecaf9-ca59-46ea-8169-9e4f04920840"
        },
        "data": {
            "phone_number": null,
            "email": null,
            "first_name": null,
            "last_name": null,
            "id": "ewallet_49765d975b781eb6ef86af4b7259e6e4",
            "status": "ACT",
            "accounts": [],
            "verification_status": "not verified",
            "type": "person",
            "metadata": {
                "merchant_defined": "updated data"
            },
            "ewallet_reference_id": null,
            "category": null,
            "contacts": {
                "data": [
                    {
                        "id": "cont_22a4a185f9933224895ab734c0d2735c",
                        "first_name": "",
                        "last_name": "",
                        "middle_name": "",
                        "second_last_name": "",
                        "gender": "not_applicable",
                        "marital_status": "not_applicable",
                        "house_type": "",
                        "contact_type": "personal",
                        "phone_number": "",
                        "email": "",
                        "identification_type": "",
                        "identification_number": "",
                        "issued_card_data": {
                            "preferred_name": "",
                            "transaction_permissions": "",
                            "role_in_company": ""
                        },
                        "date_of_birth": null,
                        "country": "",
                        "nationality": null,
                        "address": null,
                        "ewallet": "ewallet_49765d975b781eb6ef86af4b7259e6e4",
                        "created_at": 1669799087,
                        "metadata": {},
                        "business_details": null,
                        "compliance_profile": 0,
                        "verification_status": "not verified",
                        "send_notifications": false,
                        "mothers_name": ""
                    }
                ],
                "has_more": false,
                "total_count": 1,
                "url": "/v1/ewallets/ewallet_49765d975b781eb6ef86af4b7259e6e4/contacts"
            }
        }
    }
  • Update Wallet First & Last Name

  • curl -X post
    https://sandboxapi.rapyd.net/v1/ewallets/ewallet_49765d975b781eb6ef86af4b7259e6e4
    -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 '{
        "last_name": "Doe",
        "first_name": "John"
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "e726349f-1ee8-418a-8944-668ccaeda12b"
        },
        "data": {
            "phone_number": null,
            "email": null,
            "first_name": "John",
            "last_name": "Doe",
            "id": "ewallet_49765d975b781eb6ef86af4b7259e6e4",
            "status": "ACT",
            "accounts": [],
            "verification_status": "not verified",
            "type": "person",
            "metadata": {
                "merchant_defined": "updated data"
            },
            "ewallet_reference_id": null,
            "category": null,
            "contacts": {
                "data": [
                    {
                        "id": "cont_22a4a185f9933224895ab734c0d2735c",
                        "first_name": "",
                        "last_name": "",
                        "middle_name": "",
                        "second_last_name": "",
                        "gender": "not_applicable",
                        "marital_status": "not_applicable",
                        "house_type": "",
                        "contact_type": "personal",
                        "phone_number": "",
                        "email": "",
                        "identification_type": "",
                        "identification_number": "",
                        "issued_card_data": {
                            "preferred_name": "",
                            "transaction_permissions": "",
                            "role_in_company": ""
                        },
                        "date_of_birth": null,
                        "country": "",
                        "nationality": null,
                        "address": null,
                        "ewallet": "ewallet_49765d975b781eb6ef86af4b7259e6e4",
                        "created_at": 1669799087,
                        "metadata": {},
                        "business_details": null,
                        "compliance_profile": 0,
                        "verification_status": "not verified",
                        "send_notifications": false,
                        "mothers_name": ""
                    }
                ],
                "has_more": false,
                "total_count": 1,
                "url": "/v1/ewallets/ewallet_49765d975b781eb6ef86af4b7259e6e4/contacts"
            }
        }
    }