---
updatedAt: 2026-06-02T18:55:16.000Z
agentTools:
  projectIndex: https://checkout-docs.transfi.com/llms.txt
---

# Step 3: Create a Transaction

A transaction represents a payment attempt. You can create a transaction by hitting the TransFi Checkout API.

When you create a transaction:

1. You hit the TransFi Checkout API and provide the transaction details
2. You receive a redirection URL in response
3. This link opens the TransFi hosted page which has the Checkout Widget

You can check the API details here: [Create Payment Invoice API](https://transfi-checkout.readme.io/reference/createpaymentinvoice)

The optional details of the `individual` object are needed by TransFi for creating a transaction. If you pass these details, the user won't be asked again in checkout. Otherwise, the user will first need to fill in these information on the TransFi hosted page.

> \[!TIP] Pre-filling customer details improves conversion and speeds up checkout.

### Where to Get the API Keys?

In both Sandbox and Production, you will get the API keys in the Settings page. For the TransFi Checkout API you will need a **Public key** and a **Secret key**. You can get these from:

**Dashboard → Settings**

![Sandbox Testing Options](https://files.readme.io/5053e8b04f819e45c99806a61b838b06efb66b3f61668621e019b1ff984e4b84-Screenshot_2026-02-06_at_3.11.16_PM.png)

> \[!NOTE] To generate the keys, you will need to authenticate with 2FA that you used while logging in to the dashboard.