Skip to main content

Transactions

Create Transaction
Enterprise

Creates a new transaction.

POST
https://api.basistheory.com/transactions
Copy

Permissions

None

Request

curl "https://api.basistheory.com/transactions" \
-H "BT-API-KEY: <API_KEY>" \
-X "POST"

Response

Returns a transaction object if the transaction was created successfully.

{
"id": "683b3e4a-b50c-4fc2-9dea-c48e544b1603",
"created_at": "2023-05-30T18:12:16.4033481+00:00",
"created_by": "9cce23ec-5848-47c2-8a67-f7539077e423",
"expires_at": "2023-05-30T19:12:16.3826804+00:00"
}

Commit Transaction
Enterprise

Commits an open transaction.

POST
https://api.basistheory.com/transactions/{id}/commit
Copy

Permissions

None

Request

curl "https://api.basistheory.com/transactions/683b3e4a-b50c-4fc2-9dea-c48e544b1603/commit" \
-H "BT-API-KEY: <API_KEY>" \
-X "POST"

Response

Returns an empty 200 response when successful.

Rollback Transaction
Enterprise

Rolls back an open transaction.

POST
https://api.basistheory.com/transactions/{id}/rollback
Copy

Permissions

None

Request

curl "https://api.basistheory.com/transactions/683b3e4a-b50c-4fc2-9dea-c48e544b1603/rollback" \
-H "BT-API-KEY: <API_KEY>" \
-X "POST"

Response

Returns an empty 200 response when successful.

Transaction Object

AttributeTypeDescription
iduuidThe transaction ID
created_atdateThe date and time the transaction was created, in ISO 8601 format
created_byuuidThe Application ID which created the transaction
expires_atdateThe date and time at which this transaction expires, in ISO 8601 format