Onerway
POST

Update a beneficiary

Update selected details of an existing beneficiary in the current merchant scope and return the stored result.

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:
merchantRefId
External reference assigned by the merchant to the beneficiary.
Individual information. Supply updates only for an INDIVIDUAL beneficiary.
Business information. Supply updates only for a BUSINESS beneficiary.
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.
beneficiaryId
Onerway beneficiary ID (64-bit integer).
Constraints
Rule
Must identify a non-deleted beneficiary belonging to the merchant that the request applies to.

Request example

curl -X POST 'https://sandbox-transfer-api.onerway.com/api/v3/beneficiary/edit' \
  -H 'ApiKey: replace_with_account_service_apikey' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "beneficiaryId": 10001,
  "contact": {
    "email": "updated-demo@example.com"
  }
}'

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": {
    "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": "updated-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"
      }
    }
  }
}
20040004

Attempting to change the saved payment method.

Trigger: Attempting to change the saved payment method.

Example

{
  "respCode": "40004",
  "respMsg": "Validation Failed",
  "error": {
    "type": "validation_error",
    "code": "beneficiary_edit_failed",
    "message": "Beneficiary edit request validation failed",
    "requestId": "req_00000000000000000000000000000001",
    "errorDetails": [
      {
        "fieldPath": "paymentMethod",
        "errorCode": "INVALID_PARAMETER",
        "message": "paymentMethod cannot be changed when editing beneficiary",
        "params": {}
      }
    ],
    "param": "paymentMethod"
  }
}