Onerway
POST

Validate a beneficiary

Validate beneficiary fields, entity/account structure and applicable dynamic rules without persisting a beneficiary.

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:
paymentMethod
Payment method. See enum values.
Allowed values
BANK_TRANSFER
Bank transfer
SWIFT
SWIFT transfer
E_WALLET
E-wallet
entityType
Entity type. See enum values.
Allowed values
INDIVIDUAL
Individual
BUSINESS
Business
Condition: Required when entityType is INDIVIDUAL; omit for the other entity type.
Individual information. Applies only when entityType is INDIVIDUAL.
Condition: Required when entityType is BUSINESS; omit for the other entity type.
Business information. Applies only when entityType is BUSINESS.
Contact details
Address details
Recipient account
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/validate' \
  -H 'ApiKey: replace_with_account_service_apikey' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "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"
    }
  }
}'

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
Structured failure information; not present for every failure path

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "success": true,
    "errors": []
  }
}
20040004

Supplying account without countryCode.

Trigger: Supplying account without countryCode.

Example

{
  "respCode": "40004",
  "respMsg": "Validation Failed",
  "error": {
    "type": "validation_error",
    "code": "beneficiary_validate_failed",
    "message": "Beneficiary validation failed",
    "requestId": "req_00000000000000000000000000000001",
    "errorDetails": [
      {
        "fieldPath": "account.countryCode",
        "errorCode": "INVALID_PARAMETER",
        "message": "account.countryCode is required",
        "ruleType": "REQUIRED",
        "params": {
          "required": true
        }
      }
    ],
    "param": "account.countryCode"
  }
}