Onerway
POST

Retrieve a beneficiary

Retrieve beneficiary details by beneficiaryId in the current merchant scope.

Request

ApiKey
Account service API key assigned by Onerway, supplied in the request header. Use the key for the same environment as the request domain.
Example:
Content-Type
Request media type.
Example:
beneficiaryId
Onerway beneficiary ID (64-bit integer).
Constraints
Rule
beneficiaryId is required. A missing, foreign-owned or deleted beneficiary returns an invalid-beneficiary business error.
onBehalfOf
Merchant number that the request applies to. Supply it only when making a request on behalf of another merchant.

Request example

curl -X POST 'https://sandbox-transfer-api.onerway.com/api/v3/beneficiary/queryDetail' \
  -H 'ApiKey: replace_with_account_service_apikey' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "beneficiaryId": 10001
}'

Response

respCode
Response code; 20000 indicates successful request processing. All other values are error codes.
respMsg
Human-readable description of the response code.
Business data on success; do not consume as valid business data on failure
Constraints
Rule
Entity and account branches follow the entity type and payment method. Inapplicable branches have no usable data. Leaf fields absent from historical records may be empty; request requirements do not establish response non-null guarantees.
Structured failure information; not present for every failure path

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "beneficiaryId": "10001",
    "merchantNo": "10000",
    "status": "unnecessary",
    "entityType": "BUSINESS",
    "paymentMethod": "BANK_TRANSFER",
    "business": {
      "companyName": "Example Demo Company",
      "registrationNumber": "demo_registration_001",
      "registrationDate": "2020-01-01",
      "tin": "demo_tax_id"
    },
    "contact": {
      "email": "demo@example.com"
    },
    "address": {
      "countryCode": "US",
      "state": "Example State",
      "city": "Example City",
      "addressLine1": "Example Address",
      "postalCode": "00000"
    },
    "account": {
      "countryCode": "US",
      "currency": "USD",
      "bankAccount": {
        "accountHolderName": "Example Demo Company",
        "bankName": "Example Bank",
        "accountType": "CHECKING",
        "accountIdentifier": {
          "type": "LOCAL_ACCOUNT",
          "value": "demo_account_001"
        },
        "routingNumber": "000000000"
      }
    }
  }
}
20050112

The identifier is nonexistent, foreign-owned or already deleted.

Trigger: The identifier is nonexistent, foreign-owned or already deleted.

Example

{
  "respCode": "50112",
  "respMsg": "beneficiaryId invalid",
  "error": {
    "type": "business_error",
    "code": "cl1048",
    "message": "beneficiaryId invalid",
    "requestId": "req_00000000000000000000000000000001",
    "errorDetails": [
      {
        "errorCode": "cl1048",
        "message": "beneficiaryId invalid"
      }
    ]
  }
}