> For the complete documentation index, see [llms.txt](https://fintechbiz-solutions.gitbook.io/fintechbiz-solutions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fintechbiz-solutions.gitbook.io/fintechbiz-solutions/transaction/editor.md).

# Create Transaction

<mark style="color:green;">`POST`</mark> <https://fintechbizsolutions.com/api/transaction/create&#x20>;

**Headers**

| Name          | Value               |
| ------------- | ------------------- |
| Content-Type  | `application/json`  |
| Authorization | `Bearer SECRET_KEY` |

**Body**

<table><thead><tr><th width="165">Name</th><th width="94">Type</th><th>Description</th></tr></thead><tbody><tr><td>api_key*</td><td>string</td><td>API key</td></tr><tr><td>reference*</td><td>string</td><td>transaction reference</td></tr><tr><td>amount*</td><td>string</td><td>amount of transaction</td></tr><tr><td>currency*</td><td>string</td><td>currency (USD)</td></tr><tr><td>firstname*</td><td>string</td><td>customer's first name</td></tr><tr><td>lastname *</td><td>string</td><td>customer's last name</td></tr><tr><td>email*</td><td>string</td><td>customer's email</td></tr><tr><td>phone*</td><td>string</td><td>customer's phone</td></tr><tr><td>country*</td><td>string</td><td>customer's country code (IALPHA 2)</td></tr><tr><td>state*</td><td>string</td><td>customer's state code (ALPHA 2)</td></tr><tr><td>city*</td><td>string</td><td>customer's city</td></tr><tr><td>address*</td><td>string</td><td>customer's address</td></tr><tr><td>zip_code*</td><td>string</td><td>customer's post code</td></tr><tr><td>cardName*</td><td>string</td><td>customer's card name</td></tr><tr><td>cardNumber*</td><td>string</td><td>customer's card number</td></tr><tr><td>cardCVV*</td><td>string</td><td>customer's card CVV</td></tr><tr><td>expMonth*</td><td>string</td><td>customer's card expiry month</td></tr><tr><td>expYear*</td><td>string</td><td>customer's card expiry year</td></tr><tr><td>ip_address*</td><td>string</td><td>customer's ip address</td></tr><tr><td>redirect_url*</td><td>string</td><td>redirect url (GET)</td></tr><tr><td>webhook_url*</td><td>string</td><td>webhook url (POST)</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200: OK" %}

```json
Response data for 2D
{
  "status" : "success",
  "message" : "success",
  "data" : {
      "reference" : "abssjsu222",
      "orderid" : "1282827",
      "transaction" : {
          "status" : "approved",
          "message": "Transaction is approved"
      }
  }
}

Response data for 3DS
{
  "status" : "success",
  "message" : "success",
  "data" : {
      "reference" : "abcdghrtusolkm",
      "orderid" : "FT-12938ANHG829229",
      "link" : "https://fintechbizsolutions.com/api/transaction/checkout/1/enaiaujklmnvshshshiwiwiaa"
  }
}
```

{% endtab %}

{% tab title="400: Bad Request" %}

```json
{
    "status" : "failed",
    "message" : "Bad Request"
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
    "status" : "failed",
    "message" : "Invalid Secret Key"
}
```

{% endtab %}
{% endtabs %}
