Skip to main content

Update beneficiary

PATCH/partner/v1/beneficiaries/{beneficiaryId}
Auth Bearer tokenScope partner.write

Changes a saved beneficiary in one call. Send only what you want to change; everything you leave out stays as it is. The beneficiary can be yours or one of your customers'.

The bank account itself cannot change. If the account details are wrong, disable the beneficiary and create a new one.

You changeEffect on status
details.beneficiaryAddress, details.beneficiaryCity, details.website, or documentIdsReturns to pending while the payout provider reviews the change. See Statuses.
label or isDefaultUnchanged. These are Ryno's own and are not sent to the provider.

A beneficiary that is already pending stays pending. On corridors whose payout providers keep no copy of beneficiaries, and for a beneficiary suspended by Ryno, the status does not change. A disabled beneficiary cannot be edited.

Path​

beneficiaryIduuidpathrequired

The beneficiary to change. An id that does not exist, is not a uuid, or belongs to someone who is not you or one of your customers is 404 partner.beneficiary_not_found.

Headers​

Idempotency-Keystringheaderrequired

A key you generate per edit, at most 255 characters. Sending the same key with the same body returns the beneficiary as it is now, so retry a timed-out call with the key you already used. Sending the same key with a different body is 409 Beneficiary.IdempotencyConflict.

Keys are scoped to the beneficiary's owner. Values are trimmed before the bodies are compared, so a retry that differs only in surrounding spaces is the same request.

Body​

All fields are optional.

detailsobject

Values to change, keyed by the field names from Get beneficiary requirements. Every value is a string. Fields you leave out are unchanged.

  • You can change beneficiaryAddress, beneficiaryCity and website. Send an empty string to clear one that is optional on the corridor; a required field cannot be cleared.
  • The account details cannot change: beneficiaryType, accountName, accountNumber, bankName, swiftCode, bankCode, and any other bank field the beneficiary stores. Sending one with the value it already has is accepted and ignored. Sending a different value is 422 Beneficiary.InvalidField.
  • Only the fields that change are checked against the corridor's current requirements, with the same errors as Create beneficiary.
documentIdsuuid[]

The complete new list of supporting documents. It replaces the current list, so include every document that should stay attached. Send [] to remove them all. Leave it out to keep the current documents. Sending the list the beneficiary already has changes nothing.

Each document must meet the same rules as on Create beneficiary.

labelstring

Your own name for the beneficiary, at most 100 characters. Send a blank value to clear it.

isDefaultboolean

true makes this the owner's default beneficiary for its currency, and the previous default stops being the default. false removes the default.

Response​

The beneficiary as it is after the edit, in the same shape as Create beneficiary. status is pending after an address, city, website or documents change, and unchanged after a label or default change.

Field and document errors​

A value that breaks a rule is 422 Beneficiary.InvalidField, and a document that cannot be attached is 422 Beneficiary.InvalidDocument. Both use the reasons listed under Create beneficiary. One more applies to an edit: a field that the account details lock.

accountNumber: cannot be changed; disable this beneficiary and create a new one

If the beneficiary is not on a payout corridor, its address, city, website and documents cannot be edited either, and the reason is cannot be changed on this beneficiary.

Errors​

CodeHTTPMeaning
idempotency.key_required400No Idempotency-Key header, or it is blank.
idempotency.key_invalid400More than one Idempotency-Key header, or the key is longer than 255 characters.
Beneficiary.InvalidEditRequest400label is over 100 characters.
Request.Invalid400The body is not valid JSON, or a field has the wrong type.
partner.customer_read_only400The customer is suspended or closed. Its beneficiaries can still be listed and read, but not changed.
Auth.Unauthorized401The token is missing or invalid.
Auth.Forbidden403The token is not a partner credential, or lacks partner.write.
partner.profile_not_active403Your partner account is not active. Contact support.
BeneficiaryRequirement.CustomerInactive403Your account is not active.
partner.profile_not_found404Your partner account could not be found. Contact support.
partner.beneficiary_not_found404No beneficiary you can see has this id. Also returned for another partner's beneficiary, which is left unchanged.
BeneficiaryRequirement.CorridorNotFound404The beneficiary's corridor is no longer one you are offered.
Beneficiary.IdempotencyConflict409The Idempotency-Key was already used for this owner with a different body. Use a new key.
Beneficiary.InvalidField422A value breaks the corridor's rules, or you tried to change an account detail. See Field and document errors.
Beneficiary.InvalidDocument422A document cannot be attached. See Field and document errors.
Beneficiary.NotEditable422The beneficiary is disabled. Create a new one instead.
BeneficiaryRequirement.NotAvailable422The corridor cannot take changes right now. Do not retry unchanged.
BeneficiaryRequirement.Unavailable503The change cannot be saved right now. Retry with backoff, using the same key.

The 401, 429 and 503 responses from the API gateway use a different body. See Errors.