Skip to main content

Documentación

Retrieve Beneficiary

Retrieve details of a payout beneficiary.

Nota

  • The response includes additional fields for the specific payout method. For details about the additional fields, run Get Payout Required Fields.

  • The code samples include successful requests (200), bad requests (400), and an unauthorized request (401). For all error messages that appear due to bad requests, see Payout Errors and General Errors.

    • beneficiary

    • ID of the beneficiary object. String starting with beneficiary_.

    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string beneficiaryId = "beneficiary_8ba699483c80b7fb9f7e658be3275703";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/payouts/beneficiary/{beneficiaryId}");
        
                        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/payouts/beneficiary/beneficiary_8ba699483c80b7fb9f7e658be3275703'
            );
        
            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/payouts/beneficiary/beneficiary_8ba699483c80b7fb9f7e658be3275703');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        beneficiary_id = 'beneficiary_8ba699483c80b7fb9f7e658be3275703'  
        results = make_request(method='get',
                               path=f'/v1/payouts/beneficiary/{beneficiary_id}')
        pprint(results)
  • /v1/payouts/beneficiary/:beneficiary

  • Retrieve Beneficiary - Individual

  • curl -X get 'https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiary_cb009f46c8dcd85004c8054541287723' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -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": "98ac2d04-ede3-46de-8f48-58d6c4899ba0"
        },
        "data": {
            "id": "beneficiary_cb009f46c8dcd85004c8054541287723",
            "last_name": "Doe",
            "first_name": "John",
            "country": "US",
            "entity_type": "individual",
            "address": "1 Main Street",
            "name": "John Doe",
            "postcode": "12345",
            "city": "Anytown",
            "state": "Illinois",
            "account_number": "1234567",
            "currency": "USD",
            "identification_type": "identification_id",
            "identification_value": "*********",
            "merchant_reference_id": "JohnDoe",
            "gender": "other",
            "bic_swift": "12345678XXX",
            "payment_type": "priority",
            "category": "bank",
            "default_payout_method_type": "us_general_bank"
        }
    }
  • Retrieve Beneficiary - Company

  • curl -X get 'https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiary_ec63141037199ae470c60f9ac8426056' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -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": "7acfd391-fdf8-4c53-88b6-117dcb64c03d"
        },
        "data": {
            "id": "beneficiary_ec63141037199ae470c60f9ac8426056",
            "country": "US",
            "entity_type": "company",
            "name": "All Star Limousine",
            "company_name": "All Star Limousine",
            "account_number": "0987654321",
            "currency": "USD",
            "identification_type": "company_registered_number",
            "identification_value": "**********",
            "merchant_reference_id": "AllStarLimo",
            "aba": "987654321",
            "category": "bank"
        }
    }
  • Bad Request - Beneficiary Not Found

  • curl -X get 'https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiarycb009f46c8dcd85004c8054541287723' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -H 'salt: your-random-string-here' \
    -H 'signature: your-calculated-signature-here' \
    -H 'timestamp: your-unix-timestamp-here'
  • {
        "status": {
            "error_code": "ERROR_GET_BENEFICIARY",
            "status": "ERROR",
            "message": "The request attempted an operation that requires a payout beneficiary, but the beneficiary was not found. The request was rejected. Corrective action: Use the ID of a valid beneficiary.",
            "response_code": "ERROR_GET_BENEFICIARY",
            "operation_id": "72b9234d-35c8-486c-92ca-12b6f61211cc"
        }
    }
  • Unauthorized

  • curl -X get 'https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiary_cb009f46c8dcd85004c8054541287723' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -H 'salt: your-random-string-here' \
    -H 'signature: your-calculated-signature-here' \
    -H 'timestamp: your-unix-timestamp-here'
  • {
        "status": {
            "error_code": "UNAUTHENTICATED_API_CALL",
            "status": "ERROR",
            "message": "The request was rejected due to an authentication issue. Corrective action: Check the status of your account in the 'Account Details' page of the Client Portal.",
            "response_code": "UNAUTHENTICATED_API_CALL",
            "operation_id": "eb088dcb-0a02-4138-9a9e-68fefa913e6f"
        }
    }