Skip to main content

Documentation

Update Wallet Contact

Update a contact for a Rapyd Wallet.

Note

The following body parameters can only be updated if they previously had an empty value: country, date_of_birth, first_name, last_name, identification_number, identification_type, and nationality.

    • contact

    • ID of the contact. String starting with cont_.

    • wallet

    • ID of the wallet associated with the contact. String starting with ewallet_.

Note

The following fields can be updated only if they previously had an empty value:

  • country

  • date_of_birth

  • first_name

  • identification_number

  • identification_type

  • last_name

  • nationality

Code Samples
    • .NET

      • using System;
        using System.Text.Json;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string wallet = "ewallet_053d64c44834e1d3057ecb68a34c6b6c";
                        string contact = "cont_f2b7f98b019af17df892dcc92abc3cc2";
        
                        var metadata = new
                        {
                            merchant_defined = "updated"
                        };
        
                        var requestObj = new
                        {
                            phone_number = "+14155551237",
                            metadata,
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", $"/v1/ewallets/{wallet}/contacts/{contact}", 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 = {
              phone_number: '+14155551237',
              metadata: {
                merchant_defined: "updated"
              }
            };
            const result = await makeRequest(
              'POST',
              '/v1/ewallets/ewallet_053d64c44834e1d3057ecb68a34c6b6c/contacts/cont_f2b7f98b019af17df892dcc92abc3cc2',
              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 = [
            'phone_number' => '+14155551237',
            'metadata' => [
                'merchant_defined' => "updated"
            ]
          ];
        
        try {
            $object = make_request('post', '/v1/ewallets/ewallet_053d64c44834e1d3057ecb68a34c6b6c/contacts/cont_f2b7f98b019af17df892dcc92abc3cc2', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        contact_details = {
            "phone_number": "+14155551237",
            "metadata": {
                "merchant_defined": "updated"
            }
        }
        
        results = make_request(method='post',
                               path=f'/v1/ewallets/ewallet_053d64c44834e1d3057ecb68a34c6b6c/contacts/cont_f2b7f98b019af17df892dcc92abc3cc2',
                               body=contact_details)
        pprint(results)
  • /v1/ewallets/:wallet/contacts/:contact

  • Update Personal Contact in Company Wallet

  • curl -X post
    https://sandboxapi.rapyd.net/v1/ewallets/ewallet_8d2d52f431a4d3d9d49aab3df94a2adf/contacts/cont_4bd588fb8a711a4dbd5c1f21989780d2
    -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 '{
        "phone_number": "+14155551997",
        "metadata": {
            "merchant_defined": "updated"
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "0637a29b-766c-4b2f-b2b1-47a7943ff8af"
        },
        "data": {
            "id": "cont_4bd588fb8a711a4dbd5c1f21989780d2",
            "first_name": "Jane",
            "last_name": "Doe",
            "middle_name": "",
            "second_last_name": "",
            "gender": "female",
            "marital_status": "single",
            "house_type": "lease",
            "contact_type": "personal",
            "phone_number": "+14155551997",
            "email": "jane200@rapyd.net",
            "identification_type": "PA",
            "identification_number": "1233242424",
            "issued_card_data": {
                "preferred_name": "",
                "transaction_permissions": "",
                "role_in_company": ""
            },
            "date_of_birth": "2000-11-22",
            "country": "US",
            "nationality": "FR",
            "address": {
                "id": "address_4ea38a3d61d383f03d424cb80189b21a",
                "name": "Jane Doe",
                "line_1": "123 Lake Forest Drive",
                "line_2": "",
                "line_3": "",
                "city": "Anytown",
                "state": "NY",
                "country": "",
                "zip": "12345",
                "phone_number": "+14155551234",
                "metadata": {
                    "merchant_defined": true
                },
                "canton": "",
                "district": "",
                "created_at": 1625581619
            },
            "ewallet": "ewallet_8d2d52f431a4d3d9d49aab3df94a2adf",
            "created_at": 1625581619,
            "metadata": {
                "merchant_defined": "updated"
            },
            "business_details": null,
            "compliance_profile": 0,
            "verification_status": "not verified",
            "send_notifications": false,
            "mothers_name": "Jane Smith"
        }
    }
  • Update Business Contact in Company Wallet

  • curl -X post
    https://sandboxapi.rapyd.net/v1/ewallets/ewallet_8d2d52f431a4d3d9d49aab3df94a2adf/contacts/cont_4bd588fb8a711a4dbd5c1f21989780d2
    -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 '{
        "business_details": {
            "registration_number": "R24032020000"
        },
        "metadata": {
            "merchant_defined": "updated"
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "2da75a4c-f02c-40a5-8817-9cc7a7fc6df5"
        },
        "data": {
            "id": "cont_4bd588fb8a711a4dbd5c1f21989780d2",
            "first_name": "Jane",
            "last_name": "Doe",
            "middle_name": "",
            "second_last_name": "",
            "gender": "female",
            "marital_status": "single",
            "house_type": "lease",
            "contact_type": "personal",
            "phone_number": "+14155551997",
            "email": "jane200@rapyd.net",
            "identification_type": "PA",
            "identification_number": "1233242424",
            "issued_card_data": {
                "preferred_name": "",
                "transaction_permissions": "",
                "role_in_company": ""
            },
            "date_of_birth": "2000-11-22",
            "country": "US",
            "nationality": "FR",
            "address": {
                "id": "address_4ea38a3d61d383f03d424cb80189b21a",
                "name": "Jane Doe",
                "line_1": "123 Lake Forest Drive",
                "line_2": "",
                "line_3": "",
                "city": "Anytown",
                "state": "NY",
                "country": "",
                "zip": "12345",
                "phone_number": "+14155551234",
                "metadata": {
                    "merchant_defined": true
                },
                "canton": "",
                "district": "",
                "created_at": 1625581619
            },
            "ewallet": "ewallet_8d2d52f431a4d3d9d49aab3df94a2adf",
            "created_at": 1625581619,
            "metadata": {
                "merchant_defined": "updated"
            },
            "business_details": null,
            "compliance_profile": 0,
            "verification_status": "not verified",
            "send_notifications": false,
            "mothers_name": "Jane Smith"
        }
    }
  • Update Contact Reference ID

  • curl - X post
    https: //sandboxapi.rapyd.net/v1/ewallets/ewallet_922b4363c9f4c681e7e8d7a07cd65a2e/contacts/cont_8f2e328d4723eafa5d9f301801e02ad9
    -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 '{
    "contact_reference_id": "johndoe08312023"
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "ca0d5e80-3e1f-493b-80af-852c5df358d3"
        },
        "data": {
            "id": "cont_8f2e328d4723eafa5d9f301801e02ad9",
            "first_name": "John",
            "last_name": "Doe",
            "middle_name": "",
            "second_last_name": "",
            "gender": "not_applicable",
            "marital_status": "not_applicable",
            "house_type": "",
            "contact_type": "personal",
            "phone_number": "+3547826570",
            "email": "johndoe123@rapyd.net",
            "identification_type": "DL",
            "identification_number": "1234567890",
            "issued_card_data": {
                "preferred_name": "",
                "transaction_permissions": "",
                "role_in_company": ""
            },
            "date_of_birth": "2000-11-22",
            "country": "IS",
            "nationality": "IS",
            "address": {
                "id": "address_f1a537b8b1077fceea699860bac83b13",
                "name": "John Doe",
                "line_1": "123 Main Street",
                "line_2": "",
                "line_3": "",
                "city": "Anytown",
                "state": "NY",
                "country": "US",
                "zip": "12345",
                "phone_number": "+14155551611",
                "metadata": {},
                "canton": "",
                "district": "",
                "created_at": 1693462165
            },
            "ewallet": "ewallet_922b4363c9f4c681e7e8d7a07cd65a2e",
            "created_at": 1693462165,
            "metadata": {
                "merchant_defined": true
            },
            "business_details": null,
            "compliance_profile": -1,
            "verification_status": "not verified",
            "send_notifications": false,
            "mothers_name": "Jane Smith",
            "contact_reference_id": "johndoe08312023"
        }
    }