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 receivingaddress(the pay-in's deposit address), asender_address,confirmationsand anetwork_tx_idin the chain's own format, which is also thetransaction_reference. - Bank deposit: the sender's
name(the user),accountandbank_name, thecredited_accountthe pay-in handed out, and, depending onmethod, aroutingnumber with atrace_number(ACH) or animad(wire), abicwith auetr(SWIFT), anibanwith anend_to_end_id(SEPA), or abank_reference; that reference is thetransaction_reference. - Card:
card_brand,card_last4, the sender'sname, anetwork_tx_idand anapproval_code, which is thetransaction_reference. - Mobile wallet: the sender's
name, a maskedaccountand aprovider_reference.
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.| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||