Skip to main content

Documentation

Create Beneficiary Tokenization Page

Create a customer-facing page for creating a beneficiary token.

This method creates a URL for a page where the customer enters details required for payouts to the beneficiary’s bank account. All available payout methods for the beneficiary’s country are listed.

Note

  • If beneficiary_country is not specified, the customer specifies the country on the beneficiary tokenization page. As a best practice, Rapyd recommends always filling this field in and not leaving it to the customer.

  • For an individual beneficiary, if first_name and last_name are not specified, the customer provides this information on the beneficiary tokenization page.

  • When the customer provides all required information, a beneficiary object is created and Rapyd sends a webhook to the client with the ID of the beneficiary object.

Code Samples
    • .NET

      • using System;
        using System.Text.Json;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        var requestObj = new
                        {
                            category = "bank",
                              beneficiary_entity_type = "individual",
                            merchant_reference_id = "b-100456",
                              cancel_url = "http://example.com/cancel",
                            complete_url = "http://example.com/complete",
                            sender_country = "US",             
                            beneficiary_optional_fields = new
                            {
                                identification_type = "international_passport",
                                identification_value = "123456789"
                            },
                              string payout_method_types_exclude = new string[] { "us_bank" };
                            sender_currency = "USD", 
                            payout_currency = "EUR",                      
                                                sender_entity_type = "company"
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/hosted/disburse/beneficiary", 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 = {
              category: 'bank',
              beneficiary_entity_type: 'individual',
              merchant_reference_id: 'b-100456',
              cancel_url: 'http://example.com/cancel',
              complete_url: 'http://example.com/complete',
              sender_country: 'US',
              beneficiary_optional_fields: {
                identification_type: 'international_passport',
                identification_value: '123456789'
              },
              payout_method_types_exclude: ['us_bank'],
              sender_currency: 'USD',
              payout_currency: 'EUR',
                    sender_entity_type: 'company'
            };
            const result = await makeRequest('POST', '/v1/hosted/disburse/beneficiary', 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 = [
            "category" => "bank",
            "beneficiary_entity_type" => "individual",
            "merchant_reference_id" => "b-100456",
            "cancel_url" => "http://example.com/cancel",
            "complete_url" => "http://example.com/complete",
            "sender_country" => "US",
            "beneficiary_optional_fields" => array(
                "identification_type" => "international_passport",
                "identification_value" => "123456789"
            ),
          "payout_method_types_exclude"  => [
            "us_bank"
            ],
            "sender_currency" => "USD",
            "payout_currency" => "EUR",
            "sender_entity_type" => "company"
        ];
        
        try {
            $object = make_request('post', '/v1/hosted/disburse/beneficiary', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        request_body = {
            "category": "bank",
            "beneficiary_entity_type": "individual",
            "merchant_reference_id": "b-100456",
            "cancel_url": "http://example.com/cancel",
            "complete_url": "http://example.com/complete",
            "sender_country": "US",
            "beneficiary_optional_fields": {
                "identification_type": "international_passport",
                "identification_value": "123456789"
            },
            "payout_method_types_exclude": [
                "us_bank"
            ],
            "sender_currency": "USD",
            "payout_currency": "EUR",
            "sender_entity_type": "company"
        }
        
        results = make_request(method='post',
                               path='/v1/hosted/disburse/beneficiary',
                               body=request_body)
        pprint(results)
  • /v1/hosted/disburse/beneficiary

  • Category=Bank, Beneficiary=Individual

  • curl -X post 'https://sandboxapi.rapyd.net/v1/hosted/disburse/beneficiary' \
    -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' \
    --data-raw '{
        "category": "bank",
        "beneficiary_entity_type": "individual",
        "merchant_reference_id": "2025-11-06a",
        "cancel_url": "http://cancel.rapyd.net",
        "complete_url": "http://complete.rapyd.net",
        "sender_country": "US",
        "beneficiary_optional_fields": {
            "identification_type": "international_passport",
            "identification_value": "123456789"
        },
        "sender_currency": "USD",
        "payout_currency": "EUR",
        "sender_entity_type": "company"
    }'
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "84b76693-0610-47c6-a342-f25745546e98"
        },
        "data": {
            "status": "NEW",
            "cancel_url": "http://cancel.rapyd.net",
            "complete_url": "http://complete.rapyd.net",
            "language": null,
            "merchant_color": "323fff",
            "merchant_logo": null,
            "merchant_website": "https://example1234.net",
            "merchant_customer_support": {
                "url": "https://example1234.net",
                "email": "support@example1234.net",
                "phone_number": "121255551213"
            },
            "merchant_alias": "Doc Team",
            "page_expiration": 1763636567,
            "redirect_url": "https://sandboxhosted.rapyd.net/disburse/beneficiary?token=hp_ben_177ebbfca0ed39944190d1b8abe9a33a",
            "id": "hp_ben_177ebbfca0ed39944190d1b8abe9a33a",
            "category": "bank",
            "sender_entity_type": "company",
            "sender_country": "US",
            "merchant_reference_id": "2025-11-06a",
            "beneficiary_entity_type": "individual",
            "beneficiary_country": null,
            "beneficiary_currency": "EUR",
            "sender_currency": "USD",
            "beneficiary_id": null,
            "payout_method_type": null,
            "beneficiary_validated": false,
            "timestamp": 1762426969,
            "beneficiary_optional_fields": {
                "last_name": null,
                "first_name": null,
                "company_name": null,
                "identification_type": "international_passport",
                "identification_value": "123456789"
            },
            "payout_method_types_include": null,
            "payout_method_types_exclude": null,
            "expiration": 1763636567,
            "beneficiary_extended_fields": false
        }
    }
  • Category=Bank, Beneficiary=Company

  • curl -X post 'https://sandboxapi.rapyd.net/v1/hosted/disburse/beneficiary' \
    -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' \
    --data-raw '{
        "category": "bank",
        "beneficiary_entity_type": "company",
        "merchant_reference_id": "bank_company",
        "cancel_url": "http://cancel.rapyd.net",
        "complete_url": "http://complete.rapyd.net",
        "sender_country": "SG",   
        "beneficiary_country": "DE",
        "beneficiary_optional_fields": {
            "last_name": "",
            "first_name": "",
            "company_name": "Four Star Limousine Service",
            "identification_type": "company_registered_number",
            "identification_value": "123456789"
        },
        "sender_entity_type": "company"
    }'
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "34832027-3188-4e9b-a7e3-5cfd8ca87326"
        },
        "data": {
            "status": "NEW",
            "cancel_url": "http://cancel.rapyd.net",
            "complete_url": "http://complete.rapyd.net",
            "language": null,
            "merchant_color": "323fff",
            "merchant_logo": null,
            "merchant_website": "https://example1234.net",
            "merchant_customer_support": {
                "url": "https://example1234.net",
                "email": "support@example1234.net",
                "phone_number": "121255551213"
            },
            "merchant_alias": "Doc Team",
            "page_expiration": 1763637661,
            "redirect_url": "https://sandboxhosted.rapyd.net/disburse/beneficiary?token=hp_ben_14df7bb862198a9c401228234da69033",
            "id": "hp_ben_14df7bb862198a9c401228234da69033",
            "category": "bank",
            "sender_entity_type": "company",
            "sender_country": "SG",
            "merchant_reference_id": "bank_company",
            "beneficiary_entity_type": "company",
            "beneficiary_country": "DE",
            "beneficiary_currency": "EUR",
            "sender_currency": "SGD",
            "beneficiary_id": null,
            "payout_method_type": null,
            "beneficiary_validated": false,
            "timestamp": 1762428063,
            "beneficiary_optional_fields": {
                "last_name": null,
                "first_name": null,
                "company_name": "Four Star Limousine Service",
                "identification_type": "company_registered_number",
                "identification_value": "123456789"
            },
            "payout_method_types_include": null,
            "payout_method_types_exclude": null,
            "expiration": 1763637661,
            "beneficiary_extended_fields": false
        }
    }
  • Category=Card, Beneficiary=Individual

  • curl -X post 'https://sandboxapi.rapyd.net/v1/hosted/disburse/beneficiary' \
    -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' \
    --data-raw '{
        "category": "card",
        "beneficiary_entity_type": "individual",
        "merchant_reference_id": "johndoe",
        "cancel_url": "http://example.com/cancel",
        "complete_url": "http://example.com/complete",
        "sender_country": "US",
        "beneficiary_optional_fields": {
            "first_name": "John",
            "last_name": "Doe",
            "identification_type": "international_passport",
            "identification_value": "123456789"
         },
        "sender_currency": "USD",
        "payout_currency": "USD",
        "sender_entity_type": "company"
    }'
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "844c5b93-851a-4e6c-bade-f0989f391016"
        },
        "data": {
            "status": "NEW",
            "cancel_url": "http://example.com/cancel",
            "complete_url": "http://example.com/complete",
            "language": null,
            "merchant_color": "323fff",
            "merchant_logo": null,
            "merchant_website": "https://example1234.net",
            "merchant_customer_support": {
                "url": "https://example1234.net",
                "email": "support@example1234.net",
                "phone_number": "121255551213"
            },
            "merchant_alias": "Doc Team",
            "page_expiration": 1763637744,
            "redirect_url": "https://sandboxhosted.rapyd.net/disburse/beneficiary?token=hp_ben_c8a409ec2e711b7f618e33eec03e729f",
            "id": "hp_ben_c8a409ec2e711b7f618e33eec03e729f",
            "category": "card",
            "sender_entity_type": "company",
            "sender_country": "US",
            "merchant_reference_id": "johndoe",
            "beneficiary_entity_type": "individual",
            "beneficiary_country": null,
            "beneficiary_currency": "USD",
            "sender_currency": "USD",
            "beneficiary_id": null,
            "payout_method_type": null,
            "beneficiary_validated": false,
            "timestamp": 1762428146,
            "beneficiary_optional_fields": {
                "last_name": "Doe",
                "first_name": "John",
                "company_name": null,
                "identification_type": "international_passport",
                "identification_value": "123456789"
            },
            "payout_method_types_include": null,
            "payout_method_types_exclude": null,
            "expiration": 1763637744,
            "beneficiary_extended_fields": false
        }
    }
Related Information