You don't tell us what kind of indication or notice you received indicating the IRS didn't accept your payment. But there are several possibilities.
1) The credit/debit card is maxed out, or completing the payment would result in exceeding your max, meaning the credit card company rejected the payment request.
2) If a debit, maybe your account didn't have sufficient funds in at on the date the IRS submitted to your bank for payment.
3) You put in the wrong credit/debit card number, or if a direct bank debit, and incorrect account number or incorrect routing number.
3) The name you entered as the payor is not a name that is on the account to be paid from.
4) Wrong expiration date for the credit/debit card used.
5) wrong 3-digit number entered (from the back of a credit card)
6) bank computer systems were down for maintenance (scheduled or unscheduled) at the time the IRS submitted the payment request.
7) Computer glitch that neither you, the IRS, or any other human had any control over at the time the glitch occurred.
I think they can take it up to July 15. I just found this info for another post.
Pay IRS tax due by direct withdrawal
If a payment is returned by your financial institution (e.g., due to insufficient funds, incorrect account information, closed account, etc.) the IRS will mail a Letter 4870 to the address we have on file for you, explaining why the payment could not be processed, and providing alternate payment options.