# Errors Building with an AI agent? Start at https://docs.payme.io/agents.md ## Related - [Authentication and environments](/b2b-payments/getting-started/authentication) - [Create a payment contract](/b2b-payments/contracts/post-contracts) - [Transfer funds between sellers](/b2b-payments/wallets/post-generate-transfer) - [Contracts](/b2b-payments/contracts) - [Errors](/payments/getting-started/errors) ## Error response A refused call returns a JSON body with these fields: | Field | Meaning | |---|---| | `status_code` | `1` on failure. | | `status_error_code` | PayMe's numeric error code. | | `status_error_details` | The error message. | | `status_additional_info` | More detail, such as the field or value that failed. On HTTP `422`, every validation message, joined with spaces. | | `session` | PayMe session ID. Quote it when you contact PayMe support. | ```json { "status_code": 1, "status_error_details": "The contract amount is over the maximum amount for the selected payment method", "status_additional_info": "Max amount 5000000", "status_error_code": 393, "session": "FhT3aXe7" } ``` ## Check `status_code`, not only the HTTP status - Contract calls return HTTP `422` for a validation error (code `20`), `400` for a request that is valid but can't be carried out, and `500` for an unknown or inactive seller key, a call with no key at all, or a body that isn't JSON. A partner key without a seller key returns error `1` with HTTP `400`; on the file endpoints, a missing `PayMe-Merchant-Key` header returns error `251` with HTTP `400`. - [Transfer funds between sellers](/b2b-payments/wallets/post-generate-transfer) returns HTTP `200` when the transfer fails while the money is being moved (for example error `502`, insufficient funds), with `status_code` `1`, `payme_status` `error` and the reason in `status_error_code` and `status_error_details`. A request that fails its checks before the transfer returns HTTP `400` or `500`, as listed on that page. The fields are the same as in Payments API error responses: see Payments [Errors](/payments/getting-started/errors#error-response-shape). ## Contract error codes The contract endpoints return these codes in `status_error_code`: | Code | Message | When | |---|---|---| | `380` | Payment contract not found | No contract with this `guid` involves your seller account | | `381` | Not enough details for unique recipient identification | Only `recipient.business_code` was sent and it matches no PayMe seller. Add `email` or `phone` | | `382` | Cannot perform action due to payment contract status inconsistency | The action isn't allowed in the contract's current status | | `383` | Initiator and recipient are the same | The recipient is the initiator's own account | | `384` | Recipient account settings problem - please contact Customer Support | The recipient's seller account is inactive | | `385` | Action not allowed - please contact Customer Support | Your seller account isn't a side of this contract, or didn't upload this file | | `386` | Uploading multiple files not allowed - please contact Customer Support | Two files of the same `type`, or an unknown `type`, in one upload | | `387` | Uploading multiple files with same name not allowed | Two files with the same `name` in one upload | | `388` | File type has to be the same | A replacement file has a different `type` | | `389` | The payment method isn't attached to the payer's account, please attach it or use a different one | The payer has no attached card or direct-debit authorization | | `390` | The credit card expiration date is lower than the payment's due date, please add another payment method | No attached card is valid on `payment.due_date` | | `391` | We didn't find any bank debits we can use for that account, please create a new one or select a different payment method | No direct-debit authorization is `Active` | | `392` | The selected payment method isn't matching the provided token | `buyer_key` isn't one of the payer's attached payment methods | | `393` | The contract amount is over the maximum amount for the selected payment method | A `credit-card` or `il-direct-debit` contract over `5000000` | | `394` | The selected payment method does not match the provided token | `buyer_key` sent with `funds-transfer` | Each endpoint page lists every code it returns, for example [Create a payment contract](/b2b-payments/contracts/post-contracts) and [Transfer funds between sellers](/b2b-payments/wallets/post-generate-transfer). A contract that fails after it was created carries its own `error_code` (`11000` to `11004`): see [B2B payment contracts](/b2b-payments/contracts#errors).