Instant Payments
Set payment expiration
9min
cross river queues instant payments to be sent later if for some reason the receiving bank is offline and cannot receive the credit transfer immediately in this tutorial, you'll learn how to ✅ set an expiration time for how long a payment remains in the queue before being cancelled if you are new to instant payments we recommend you read the instant payments before starting this tutorial the tutorial assumes you have a knowledge of apis and how they work for more information on sending api calls, see the api basics docid\ hjr4y6ml96zuyj6trytom page make sure you have register your partner id your master account number the tutorial uses this api endpoint instant payments transfers funds between banks in real time via an instant payments network post /v1/payments/{paymentid}/cancel the tutorial uses these webhooks rtp payment queued payment queued for sending when the receiving financial institution comes back online rtp payment canceled payment canceled register for the relevant webhook events to receive webhook events, banking and payments for each webhook event type events are sent to the urls you register the event object includes resource identifiers that provide details on each event set the expiration time for a queued payment prepare to send an instant payment as described in the originate a payment tutorial define your expiration time set a specific date and time ( queuedpaymentexpiresat ) define an expiration time in seconds ( queuedpaymentexpiresafterinseconds ) if both are provided, the system prioritizes the time in seconds and ignores the date and time payments have a default queue expiration of 3 days if the expiration is reached, cr cancels the payment and triggers an rtp payment canceled webhook set expiration by date and time use the queuedpaymentexpiresat attribute in your payment request format yyyy mm ddthh\ mm\ ss (us eastern time) the value must be a future date and time this field is optional for reference, the sample request includes this attribute on row 17 sample payment request with date and time expiration queuing post /v1/payments { "accountnumber" "2553179843", "amount" 15000, "creditor" { "routingnumber" "011000138", "accountnumber" "456789000", "name" "cleveland brown", "addressstreetname" "spooner st", "addressbuildingnumber" "34", "addresscity" "quahog", "addressstate" "ri", "addresspostalcode" "00093", "addresscountry" "us" "addresscountry" "us" }, "queuedpaymentexpiresat" "2023 02 19t08 22 17 512z" } setting expiration by time in seconds use the queuedpaymentexpiresafterinseconds attribute in your payment request enter the value in seconds (whole number) the countdown starts when the payment is queued a value of 0 cancels the payment immediately if the rdfi is offline this field is optional for reference, the sample request includes this attribute on row 17 sample payment request with queuing expiration in seconds post /v1/payments { "accountnumber" "2553179843", "amount" 15000, "creditor" { "routingnumber" "011000138", "accountnumber" "456789000", "name" "cleveland brown", "addressstreetname" "spooner st", "addressbuildingnumber" "34", "addresscity" "quahog", "addressstate" "ri", "addresspostalcode" "00093", "addresscountry" "us" "addresscountry" "us" }, "queuedpaymentexpiresafterinseconds" 3600 } canceling a queued payment cancel a queued payment anytime using the post /v1/payments/{paymentid}/cancel endpoint test queuing in sandbox to simulate offline participants, three participants alternate between online and offline every 60 minutes register for the rtp payment queued webhook submit a payment using one of the following routing numbers 000000010 000000017 244084264 if the participant is offline, the rtp payment queued webhook fires, and the payment status changes to queued once the participant returns online, the payment resumes normal processing if the payment isn’t queued, continue submitting until the participant cycles offline