# Beneficiary Edit

> Update the profile information of an existing beneficiary.

```yaml
openapi: 3.1.0
info:
  title: Beneficiary Edit
  version: 1.0.0
  description: Update the profile information of an existing beneficiary.
paths:
  /api/v1/beneficiary/edit:
    post:
      summary: Beneficiary Edit
      description: Update the profile information of an existing beneficiary.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. Retrieve it from the merchant
                    portal or onboarding material after your sandbox or
                    production account is created.
                merchantRefId:
                  type: string
                  description: Merchant-side beneficiary reference ID.
                beneficiaryId:
                  type: string
                  description: Beneficiary ID to update.
                bankCountry:
                  type: string
                  description: Destination country of the beneficiary.
                payoutCurrency:
                  type: string
                  description: Beneficiary payout currency.
                entityType:
                  type: string
                  description: Beneficiary entity type. `0` for business and `1` for individual.
                paymentMethod:
                  type: string
                  description: Configured payout method.
                receiverInfo:
                  type: string
                  description: Beneficiary identity information encoded as a JSON string.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      companyName:
                        type: string
                        description: companyName field.
                      lastName:
                        type: string
                        description: lastName field.
                      firstName:
                        type: string
                        description: firstName field.
                      areaCode:
                        type: string
                        description: areaCode field.
                      phone:
                        type: string
                        description: phone field.
                      birthDate:
                        type: string
                        description: birthDate field.
                      email:
                        type: string
                        description: email field.
                      identityType:
                        type: string
                        description: identityType field.
                      identityNumber:
                        type: string
                        description: identityNumber field.
                      vatNumber:
                        type: string
                        description: vatNumber field.
                  x-onerway-format: json_string
                address:
                  type: string
                  description: Beneficiary address information encoded as a JSON string.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      countryCode:
                        type: string
                        description: countryCode field.
                      state:
                        type: string
                        description: state field.
                      city:
                        type: string
                        description: city field.
                      townName:
                        type: string
                        description: townName field.
                      addressLine1:
                        type: string
                        description: addressLine1 field.
                      addressLine2:
                        type: string
                        description: addressLine2 field.
                      addressLine3:
                        type: string
                        description: addressLine3 field.
                      postalCode:
                        type: string
                        description: postalCode field.
                  x-onerway-format: json_string
                accountInfomation:
                  type: string
                  description: Beneficiary account information encoded as a JSON string.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      cardNumber:
                        type: string
                        description: cardNumber field.
                      accountType:
                        type: string
                        description: accountType field.
                      swiftCode:
                        type: string
                        description: swiftCode field.
                      bankName:
                        type: string
                        description: bankName field.
                      sortCode:
                        type: string
                        description: sortCode field.
                      branchCode:
                        type: string
                        description: branchCode field.
                      bankHolderName:
                        type: string
                        description: bankHolderName field.
                      bankAccount:
                        type: string
                        description: bankAccount field.
                      walletType:
                        type: string
                        description: walletType field.
                      walletPhone:
                        type: string
                        description: walletPhone field.
                      pickUpBankName:
                        type: string
                        description: pickUpBankName field.
                      pickUpBankBranchName:
                        type: string
                        description: pickUpBankBranchName field.
                      pickUpBankBranchId:
                        type: string
                        description: pickUpBankBranchId field.
                      pickUpBankBranchAddress:
                        type: string
                        description: pickUpBankBranchAddress field.
                  x-onerway-format: json_string
                sign:
                  type: string
                  description: Request signature string. Generate it according to the Transfer
                    request-signing rules with your merchant private key.
              required:
                - merchantNo
                - beneficiaryId
                - bankCountry
                - payoutCurrency
                - entityType
                - paymentMethod
                - receiverInfo
                - address
                - accountInfomation
                - sign
            examples:
              update-beneficiary:
                summary: Update beneficiary request
                value:
                  accountInfomation: '{"cardNumber":null,"accountType":null,"swiftCode":null,"bankName":"MCB
                    BankLimited","sortCode":null,"branchCode":null,"bankHolderName":null,"walletType":"EASYPAISA","walletPhone":"03079770877","pickUpBankName":null,"pickUpBankBranchName":null,"pickUpBankBranchId":null,"pickUpBankBranchAddress":null}'
                  address: '{"countryCode":null,"state":"NY","city":"Adin","townName":null,"addressLine1":"testdsgddfs1233","addressLine2":null,"addressLine3":null,"postalCode":"10005"}'
                  bankCountry: PK
                  beneficiaryId: "1984102812163112960"
                  entityType: "1"
                  merchantNo: 801129
                  paymentMethod: E_WALLET
                  payoutCurrency: PKR
                  receiverInfo: '{"companyName":"helloBoy","lastName":"testData","firstName":"betaData","areaCode":"+92","phone":"2313019452","birthDate":"1990-12-04","email":"jing.yuan1@onerway.com","identityType":"SSN","vatNumber":"8859884832"}'
                  sign: d2ea92efff636320122021f65b613201403f6d34334cfbc7e589ce9f842284a3
      responses:
        "200":
          description: Update beneficiary response
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code returned by Onerway.
                  respMsg:
                    type:
                      - string
                      - "null"
                    description: Response message returned by Onerway.
                    x-onerway-value:
                      nullable: true
                      when:
                        en: No response message is returned.
                        zh: 未返回响应信息时为 `null`。
                  data:
                    type: object
                    properties:
                      beneficiaryId:
                        type: string
                        description: Updated beneficiary ID.
                      payeeStatus:
                        type: string
                        description: Beneficiary review status after update.
                    description: Updated beneficiary result.
              examples:
                beneficiary-updated:
                  summary: Update beneficiary response
                  value:
                    respCode: "20000"
                    respMsg: null
                    data:
                      beneficiaryId: "1984102812163112960"
                      payeeStatus: unnecessary
```
