Skip to main content
Version: 2019-05-29 (Current)

Update a transfer

Update transfer status information. This endpoint is primarily used by webhook callbacks to update transfer success/failure status and related details.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`id`STRING(required)
Transfer ID (e.g., trsf_test_...). Provided in the URL path.
Example:"trsf_test_5xuy4w91xqz7d1w9u0t"
Additional - 3 fieldsAdditional Parameters
โ–ผ
`success`BOOLEAN(optional)
Indicates whether the transfer was successful or failed.
Example:true
`failure_code`STRING(optional)
Code indicating the type of failure. Required if success is false.
Example:"insufficient_balance"
Values:insufficient_balance, invalid_recipient, transfers_suspended, transfer_deleted, transfer_sent, transfer_failed
`failure_message`STRING(optional)
Human-readable description of the failure. Provides additional context about what went wrong.
Example:"Insufficient funds to complete the transfer"

Responsesโ€‹

200

Successful transaction

Transfer updated successfully. Returns the updated transfer object.

Updated transfer attributes:
  • failure_code - Error code if transfer failed
  • failure_message - Human-readable failure description
  • Other transfer attributes remain unchanged

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid failure_code value
  • Missing failure_code when success is false
  • Cannot update already completed transfer

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Transfer not found.

Common causes:
  • Invalid transfer ID
  • Transfer does not belong to your account
  • Transfer has been deleted
  • Mixing test and live mode IDs

Code samplesโ€‹

curl https://api.omise.co/transfers/trsf_test_5xuy4w91xqz7d1w9u0t \
-X PATCH \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-d "success=false" \
-d "failure_code=insufficient_balance" \
-d "failure_message=Insufficient funds to complete the transfer"

Error codesโ€‹

Failure Codesโ€‹

CodeDescription
insufficient_balanceNot enough funds to complete transfer
invalid_recipientRecipient ID not found or invalid
transfers_suspendedTransfers disabled on account
transfer_deletedTransfer was deleted
transfer_sentTransfer already sent
transfer_failedTransfer processing failed

Try it outโ€‹

Required - 1 fields
โ–ผ
Additional - 3 fields