Over the HTTP API, you can set /mutate?commitNow=true for the /mutate endpoint.
For txns with multiple mutations, you can call /commit separately with the appropriate timestamp and txn keys/preds: https://dgraph.io/docs/clients/raw-http/#committing-the-transaction
When you commit, you’ll see the commit_ts in the extensions in the response, e.g.:
{
"data": { ... },
"extensions": {
"txn": {
"start_ts": 200460131,
"commit_ts": 200460132,
...
}
}
}