diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
index 176ad6694a..519c059f2f 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
@@ -848,8 +848,7 @@ Status WiredTigerRecoveryUnit::setTimestamp(Timestamp timestamp) {
         return Status::OK();
     }
 
-    const std::string conf = "commit_timestamp=" + unsignedHex(timestamp.asULL());
-    auto rc = session->timestamp_transaction(session, conf.c_str());
+    auto rc = session->timestamp_transaction_commit(session, timestamp.asULL());
     if (rc == 0) {
         _isTimestamped = true;
     }
diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h
index 3270c75d10..a61a20d319 100644
--- a/src/third_party/wiredtiger/src/include/extern.h
+++ b/src/third_party/wiredtiger/src/include/extern.h
@@ -1606,6 +1606,8 @@ extern int __wt_txn_set_read_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_txn_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
   WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
+extern int __wt_txn_set_timestamp_commit(WT_SESSION_IMPL *session, wt_timestamp_t ts)
+  WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_txn_truncate_log(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *start,
   WT_CURSOR_BTREE *stop) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
 extern int __wt_txn_ts_log(WT_SESSION_IMPL *session)
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 47946c8c16..51e749a6b2 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -1842,6 +1842,7 @@ struct __wt_session {
 	 * @errors
 	 */
 	int __F(timestamp_transaction)(WT_SESSION *session, const char *config);
+	int __F(timestamp_transaction_commit)(WT_SESSION *session, unsigned long long ts);
 
 	/*!
 	 * Query the session's transaction timestamp state.
diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c
index 8353a6e9d5..08dfbb0295 100644
--- a/src/third_party/wiredtiger/src/session/session_api.c
+++ b/src/third_party/wiredtiger/src/session/session_api.c
@@ -1761,6 +1761,20 @@ err:
     API_END_RET(session, ret);
 }
 
+static int
+__session_timestamp_transaction_commit(WT_SESSION *wt_session, unsigned long long ts)
+{
+    WT_DECL_RET;
+    WT_SESSION_IMPL *session;
+
+    session = (WT_SESSION_IMPL *)wt_session;
+    SESSION_API_CALL_NOCONF(session, timestamp_transaction_commit);
+
+    ret = __wt_txn_set_timestamp_commit(session, (wt_timestamp_t)ts);
+err:
+    API_END_RET(session, ret);
+}
+
 /*
  * __session_query_timestamp --
  *     WT_SESSION->query_timestamp method.
@@ -1954,7 +1968,7 @@ __open_session(WT_CONNECTION_IMPL *conn, WT_EVENT_HANDLER *event_handler, const
         __session_log_printf, __session_rename, __session_reset, __session_salvage,
         __session_truncate, __session_upgrade, __session_verify, __session_begin_transaction,
         __session_commit_transaction, __session_prepare_transaction, __session_reset_snapshot,
-        __session_rollback_transaction, __session_timestamp_transaction, __session_query_timestamp,
+        __session_rollback_transaction, __session_timestamp_transaction, __session_timestamp_transaction_commit, __session_query_timestamp,
         __session_checkpoint, __session_transaction_pinned_range, __wt_session_breakpoint},
       stds_readonly = {NULL, NULL, __session_close, __session_reconfigure, __session_flush_tier,
         __wt_session_strerror, __session_open_cursor, __session_alter_readonly,
@@ -1964,7 +1978,7 @@ __open_session(WT_CONNECTION_IMPL *conn, WT_EVENT_HANDLER *event_handler, const
         __session_truncate_readonly, __session_upgrade_readonly, __session_verify,
         __session_begin_transaction, __session_commit_transaction,
         __session_prepare_transaction_readonly, __session_reset_snapshot,
-        __session_rollback_transaction, __session_timestamp_transaction, __session_query_timestamp,
+        __session_rollback_transaction, __session_timestamp_transaction, __session_timestamp_transaction_commit, __session_query_timestamp,
         __session_checkpoint_readonly, __session_transaction_pinned_range, __wt_session_breakpoint};
     WT_DECL_RET;
     WT_SESSION_IMPL *session, *session_ret;
diff --git a/src/third_party/wiredtiger/src/txn/txn_timestamp.c b/src/third_party/wiredtiger/src/txn/txn_timestamp.c
index 784c2cacfe..074bad5133 100644
--- a/src/third_party/wiredtiger/src/txn/txn_timestamp.c
+++ b/src/third_party/wiredtiger/src/txn/txn_timestamp.c
@@ -845,6 +845,24 @@ __wt_txn_set_read_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t read_ts)
  * __wt_txn_set_timestamp --
  *     Parse a request to set a timestamp in a transaction.
  */
+int
+__wt_txn_set_timestamp_commit(WT_SESSION_IMPL *session, wt_timestamp_t ts)
+{
+    WT_DECL_RET;
+    bool set_ts;
+
+    set_ts = false;
+    WT_TRET(__wt_txn_context_check(session, true));
+
+    WT_RET(__wt_txn_set_commit_timestamp(session, ts));
+
+    __wt_txn_publish_durable_timestamp(session);
+
+    WT_RET(__wt_txn_ts_log(session));
+
+    return (0);
+}
+
 int
 __wt_txn_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
 {
