Simulate a deposit to a payin

This POST endpoint simulates the funds of a pay-in arriving, as if the payer had sent them, and is available in the sandbox environment (staging-api.masspay.io) only; in production it returns a 404.
Provide the payin_token of an open pay-in created via /payin/USER_TOKEN. The deposit is booked the way the partner's own notification books one: the destination wallet is credited with the deposit's share of the quoted destination_amount, the deposit is added to the pay-in's deposits, and the pay-in moves to COMPLETED once its full source_amount has arrived (PROCESSING after a partial deposit); the pay-in fee is collected by the deposit that completes it. A payin.status webhook is sent.
By default the deposit is the amount still outstanding, so one call completes the pay-in; send a smaller amount to simulate a partial deposit.
The deposit's metadata and transaction_reference are shaped like those of the pay-in's funding method:

  • Crypto: network, asset, the receiving address (the pay-in's deposit address), a sender_address, confirmations and a network_tx_id in the chain's own format, which is also the transaction_reference.
  • Bank deposit: the sender's name (the user), account and bank_name, the credited_account the pay-in handed out, and, depending on method, a routing number with a trace_number (ACH) or an imad (wire), a bic with a uetr (SWIFT), an iban with an end_to_end_id (SEPA), or a bank_reference; that reference is the transaction_reference.
  • Card: card_brand, card_last4, the sender's name, a network_tx_id and an approval_code, which is the transaction_reference.
  • Mobile wallet: the sender's name, a masked account and a provider_reference.
Every simulated deposit's metadata carries "simulated": true; fields sent in metadata replace the generated ones.
An external_id makes the call safe to retry: a deposit already recorded under it is not booked again, the webhook is sent again and the response has already_recorded: true. A pay-in that is COMPLETED, CANCELLED, EXPIRED, ERROR, REFUNDED or PARTIALLY_REFUNDED takes no deposit and returns a 400; a pay-in that does not belong to your account returns a 404. Deposits to one pay-in are booked one at a time: a request that arrives while another deposit to the same pay-in is being booked returns a 409; retry it.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Token representing the pay-in transaction. Returned in the response when a pay-in is created via /payin/USER_TOKEN

Body Params

A simulated deposit to a pay-in. Every field is optional: an empty body deposits what is still outstanding.

double
> 0

Amount deposited, in the pay-in's source_currency_code. Defaults to the amount still outstanding.

string
enum

Rail a bank deposit arrives on. Defaults to the pay-in's own: wire for a reverse wire, payid, interac or faster_payments for those products, sepa for EUR, ach for USD, otherwise bank_transfer. Ignored for crypto, card and mobile wallet pay-ins.

string

Identifier of the deposit at the partner. Defaults to a generated sim_ identifier. A deposit already recorded under it is announced again, not booked twice.

metadata
object

Deposit details that replace the generated ones in the deposit's metadata, such as the sender's name or a remark.

Headers
string

Unique key to prevent duplicate processing

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json