Instant payments
Set payment expiration
10 min
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, check out the instant payments overview this tutorial assumes familiarity with apis for more information, visit structure before you begin make sure you have quickstart your partner id your master account number the tutorial uses these api endpoints originate a credit transfer transfers funds between banks in real time via an instant payments network cancel a payment request cancels a payment request if a credit transfer or payment request response has not been received 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 relevant webhook events to receive webhook events, accounts, cards and payment events 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 queued payment expiration time prepare to send an instant payment as described in the send an instant 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, cross river cancels the payment and triggers an rtp payment canceled webhook 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" } 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 } cancel 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