# Transfer with beneficiary ID

> Submit a Transfer payout by using an approved beneficiary ID.

```yaml
openapi: 3.1.0
info:
  title: Transfer with beneficiary ID
  version: 1.0.0
  description: Submit a Transfer payout by using an approved beneficiary ID.
paths:
  /api/v1/txn/remittance:
    post:
      summary: Transfer with beneficiary ID
      description: Submit a Transfer payout by using an approved beneficiary ID.
      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.
                payerId:
                  type: string
                  description: Stored payer ID used for the transfer. Reuse this field when the
                    payer has already been created and does not need to be
                    passed inline.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Provide `payerId` or `payerDetail`.
                payerDetail:
                  type: string
                  description: Inline payer details encoded as a JSON string. Use it when the
                    payer is not pre-created or when the latest payer attributes
                    must be sent with the request.
                  contentMediaType: application/json
                  contentSchema:
                    type: object
                    properties:
                      createTime:
                        type: string
                        description: createTime field.
                      merchantNo:
                        type: string
                        description: merchantNo field.
                      country:
                        type: string
                        description: country field.
                      addressEn1:
                        type: string
                        description: addressEn1 field.
                      addressEn2:
                        type: string
                        description: addressEn2 field.
                      addressEn3:
                        type: string
                        description: addressEn3 field.
                      postcode:
                        type: string
                        description: postcode field.
                      status:
                        type: number
                        description: status field.
                      email:
                        type: string
                        description: email field.
                      areaCode:
                        type: string
                        description: areaCode field.
                      phoneNumber:
                        type: string
                        description: phoneNumber field.
                      state:
                        type: string
                        description: state field.
                      city:
                        type: string
                        description: city field.
                      subEntityType:
                        type: string
                        description: subEntityType field.
                      firstName:
                        type: string
                        description: firstName field.
                      lastName:
                        type: string
                        description: lastName field.
                      idType:
                        type: string
                        description: idType field.
                      idNumber:
                        type: string
                        description: idNumber field.
                      birthDate:
                        type: string
                        description: birthDate field.
                      idValidDateFrom:
                        type: string
                        description: idValidDateFrom field.
                      idValidDateTo:
                        type: string
                        description: idValidDateTo field.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Provide `payerDetail` or `payerId`.
                  x-onerway-format: json_string
                beneficiaryId:
                  type: string
                  description: Approved beneficiary ID used for the transfer.
                sourceAmount:
                  type: number
                  description: Source amount before downstream deductions. Use this field when the
                    transfer is driven by the debit-side amount.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Required when `chargeFlag=N`.
                sourceCurrency:
                  type: string
                  description: Source currency of the transfer.
                targetAmount:
                  type: number
                  description: Expected arrival amount in the beneficiary currency. Use this field
                    when the transfer is driven by the beneficiary-side arrival
                    amount.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Required when `chargeFlag=Y`.
                targetCurrency:
                  type: string
                  description: Target or beneficiary currency of the transfer.
                requestId:
                  type: string
                  description: Merchant request ID. Keep it unique for each transfer request for
                    reconciliation and idempotency tracking.
                reference:
                  type: string
                  description: Transfer reference or memo that appears in downstream
                    reconciliation or beneficiary statements when supported.
                transactionPurpose:
                  type: string
                  description: Transfer purpose code. Choose the value that matches the underlying
                    business purpose and compliance requirement of the payout.
                chargeFlag:
                  type: string
                  description: Full-arrival flag used to choose whether the target amount or
                    source amount drives the calculation.
                feeBearing:
                  type: string
                  description: SWIFT fee-bearing mode.
                  x-onerway-required: conditional
                  x-onerway-condition:
                    - Required for SWIFT transfers when fee-bearing mode must be
                      declared.
                sign:
                  type: string
                  description: Request signature string. Generate it according to the Transfer
                    request-signing rules with your merchant private key.
              required:
                - merchantNo
                - beneficiaryId
                - sourceCurrency
                - targetCurrency
                - requestId
                - transactionPurpose
                - chargeFlag
                - sign
            examples:
              transfer-by-beneficiary-id:
                summary: Initiate a transfer by beneficiary ID
                value:
                  beneficiaryId: "1953727182141784064"
                  chargeFlag: Y
                  merchantNo: "801040"
                  payerId: "1953712585351499776"
                  reference: REFERENCE PAYOUT
                  requestId: DM2025081120520
                  sign: "{{SIGN}}"
                  sourceAmount: 113
                  sourceCurrency: USD
                  targetAmount: 1901
                  targetCurrency: PKR
                  transactionPurpose: "4"
              transfer-by-beneficiary-id-with-payer-detail:
                summary: Initiate a transfer with inline payer details
                value:
                  beneficiaryId: "1953727182141784064"
                  chargeFlag: N
                  merchantNo: "801040"
                  payerDetail: '{"subEntityType":"1","country":"US","addressEn1":"99 Demo
                    Street","postcode":"10001","email":"payer@example.com","areaCode":"+1","phoneNumber":"5550001234","state":"NEW
                    YORK","city":"NEW
                    YORK","idType":"SSN","idNumber":"replace_with_id_number","idValidDateTo":"2035-12-31"}'
                  reference: INLINE PAYER PAYOUT
                  requestId: DM2025081120521
                  sign: "{{SIGN}}"
                  sourceAmount: 100
                  sourceCurrency: USD
                  targetCurrency: USD
                  transactionPurpose: "3"
      responses:
        "200":
          description: Transfer accepted
          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:
                      merchantNo:
                        type: string
                        description: Merchant number.
                      payoutId:
                        type: string
                        description: Transfer or payout ID returned by Onerway.
                      status:
                        type: string
                        description: Initial transfer status returned when the request is accepted.
                          Final success or failure should still be confirmed by
                          webhook or query APIs.
                      requestId:
                        type: string
                        description: Merchant request ID echoed in the response.
                    description: Created transfer record.
              examples:
                transfer-accepted:
                  summary: Transfer accepted
                  value:
                    respCode: "20000"
                    respMsg: null
                    data:
                      merchantNo: "801129"
                      payoutId: "1984136974445449216"
                      status: A
                      requestId: CYPW20251031055450
                transfer-validation-failed:
                  summary: Transfer rejected because of invalid parameters
                  value:
                    respCode: "1001"
                    respMsg: "Parameter error: targetAmount is required when chargeFlag=Y"
                    data: null
```
