Getting Started
- B2B Payments API overview: B2B Payments moves money between two PayMe sellers: a payment contract sends or requests a payment on a set date after the other seller approves; a wallet transfer moves funds between two sellers' balances at once. Sections: Contracts (create, list, contract files, previous recipients) and Wallet Transfers. Read Authentication and environments, Errors, then Run a B2B payment contract end to end.
- Authentication and environments: Hosts: https://sandbox.payme.io/api (sandbox), https://live.payme.io/api (production); contracts under /payment-contracts. Contract calls: seller MPL in the PayMe-Merchant-Key header (POST /payment-contracts also accepts seller_payme_id in the body; .../invoices header only); partners may add PayMe-Partner-Key; no seller key gives HTTP 500 error 1. Wallet transfer: seller_payme_id (receiving seller) in the body authenticates; partners add payme_client_key; both sellers under that partner.
- Errors: Error body: status_code 1, status_error_code, status_error_details, status_additional_info (all validation messages on 422), session. Contract calls: HTTP 422 validation (code 20), 400 valid but refused, 500 seller-key problems or non-JSON body (partner key without seller key: 400). Wallet transfer returns HTTP 200 with status_code 1 and payme_status error when the transfer itself fails; failed checks return 400 or 500. Contract codes 380-394 (not found, recipient, status, files, payment method, amount over 5000000). Failed contracts carry error_code 11000-11004.
- Run a B2B payment contract end to end: B2B contract flow. Header PayMe-Merchant-Key = MPL. payment.type 1 send (initiator pays) or 2 request (recipient pays); the recipient approves in PayMe. Methods: funds-transfer, credit-card, il-direct-debit (ILS only, 320); card/debit max 5000000 (393). Card: tokenize, add-card-to-seller, send buyer_key top level. A repeat create within 5 min returns the same contract. Status 1, 2, 3 (auto), 4; or 5 with error_code 11000-11004 (read error_code); payment-contract-* callbacks. Change: PUT /payment-contracts/{guid}; cancel: .../cancellations (initiator); files: .../invoices. Errors 380-394.