Onerway
POST

Retrieve a transfer voucher

Retrieve the voucher download URL for a successful transfer. Download the voucher within 30 minutes of obtaining the URL, as the link may expire after that time.

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:
transferId
Onerway payment identifier.
Constraints
Rule
Supply transferId or requestId. If both are supplied, they must identify the same payment.
Rule
Only a transfer whose underlying payout status is S is eligible. An unsuccessful transfer cannot provide a success voucher. Failure to obtain the voucher produces an error.
requestId
Merchant-generated business reference for the payout.
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/txn/voucherQuery' \
  -H 'ApiKey: replace_with_account_service_apikey' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "requestId": "demo_transfer_001"
}'

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
Use downloadUrl to retrieve the voucher.
Structured failure information; not present for every failure path

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "merchantNo": "10000",
    "requestId": "demo_transfer_001",
    "transferId": 1000001,
    "downloadUrl": "https://developers.onerway.com/example-voucher.pdf"
  }
}
20050120

Omitting both transferId and requestId.

Trigger: Omitting both transferId and requestId.

Example

{
  "respCode": "50120",
  "respMsg": "requestId or transferId is invalid",
  "error": {
    "type": "business_error",
    "code": "50120",
    "message": "requestId or transferId is invalid",
    "requestId": "req_00000000000000000000000000000001",
    "errorDetails": [
      {
        "errorCode": "50120",
        "message": "requestId or transferId is invalid"
      }
    ],
    "param": "transferId"
  }
}