> For the complete documentation index, see [llms.txt](https://docs.tendar.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tendar.co/documentation/buy-now-pay-later/transactions.md). Agents can also search and read this documentation through its [MCP server](https://docs.tendar.co/~gitbook/mcp).

# Transactions

A transaction is a customer's purchase on your company's credit. It's created with the merchant's [order](https://docs.tendar.co/documentation/buy-now-pay-later/orders.md), follows the customer through checkout, and ends when the loan is paid out to the merchant.

As the company, you follow your transactions, approve or decline the ones waiting for you, and get a [webhook](#webhooks) at every step.

All endpoints need your secret key. See [Authentication](https://docs.tendar.co/documentation/getting-started/authentication.md).

### Status

***

```
pending ──► awaiting_approval ──► approved ──► success ──► disbursed
   │               │                  │
   │               └──► declined      └──► failed
   └──► cancelled

pending, awaiting_approval, approved or success ──(7 days)──► abandoned
```

| Status              | Meaning                                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| `pending`           | Created. The customer is checking out: signing in, getting verified, picking a plan.            |
| `awaiting_approval` | The customer accepted a plan. **You** approve or decline it.                                    |
| `approved`          | Approved, by you or automatically. The customer can make the first payment.                     |
| `success`           | The first payment is made. The loan is paid out once the customer has set up how they'll repay. |
| `disbursed`         | The loan is running and the merchant is paid.                                                   |
| `declined`          | You declined it.                                                                                |
| `cancelled`         | The customer cancelled it.                                                                      |
| `failed`            | The first payment failed. The hold on your wallet is released.                                  |
| `abandoned`         | Nothing happened for 7 days. If its plan was chosen, you can still approve or decline it.       |

With **automatic approval** on in your BNPL settings, a transaction goes straight from `pending` to `approved`.

### The money

***

|                              | Amount                                                                                                                                                        |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The purchase                 | `amount`: the products' total.                                                                                                                                |
| The customer's first payment | The first installment of their plan (the down payment, if the plan has one), plus the `service_charge` and any `delivery_cost`.                               |
| Your loan                    | `loan_info.loan_amount`: the rest of the purchase. It's held on your Tendar wallet when the customer starts paying, and lent when the first payment succeeds. |
| The merchant                 | Receives the full `amount` in its wallet.                                                                                                                     |

The service charge is 5% of the amount, at most ₦3,000. The customer pays it; it doesn't reduce what the merchant receives.

### The transaction object

***

```json
{
  "id": "6707c1a2b3c4d5e6f7a8b9c0",
  "amount": 250000,
  "service_charge": 3000,
  "currency": "NGN",
  "reference": "ORD-12345",
  "status": "awaiting_approval",
  "status_reason": "",
  "narration": "Samsung 55\" Smart TV x 1",
  "products": [
    { "id": "sku-tv-55", "name": "Samsung 55\" Smart TV", "unit_price": 250000, "currency": "NGN", "quantity": 1 }
  ],
  "success_url": "https://yourstore.com/checkout/success",
  "cancel_url": "https://yourstore.com/checkout/cancel",
  "cancellation_reason": "",
  "loan_info": {
    "interest_rate": 5,
    "interest_type": "flat",
    "duration": 3,
    "duration_type": "monthly",
    "frequency": 1,
    "frequency_type": "monthly",
    "amount_per_frequency": 70000,
    "down_payment": { "type": "percentage", "value": 20 },
    "first_payment": 50000,
    "loan_amount": 200000
  },
  "loan_info_set": true,
  "date_paid": null,
  "progress": ["created", "analyzed", "loan_info_set", "approved_loan_info"],
  "origin": "api",
  "payment_reference": "",
  "abandon_at": "2026-10-17T09:00:00.000Z",
  "collect_set": false,
  "collect_verified": false,
  "delivery": { "address": "4 Admiralty Way", "city": "Lekki", "state": "Lagos", "country": "Nigeria" },
  "delivery_cost": 0,
  "receipt": "",
  "activity_logs": [
    { "action": "Transaction Created", "description": "A new transaction with reference ORD-12345 has been created.", "timestamp": "2026-10-10T09:00:00.000Z" },
    { "action": "Awaiting Company's Approval", "description": "Transaction is awaiting the financing company's approval.", "timestamp": "2026-10-10T09:20:00.000Z" }
  ],
  "checkout_url": "https://checkout.tendar.co/?transactionId=6707c1a2b3c4d5e6f7a8b9c0",
  "merchant": {
    "id": "66fb2a1c3d4e5f6a7b8c9d01",
    "business_info": { "company_name": "Adeyemi Electronics Ltd", "business_sector": "Electronics" },
    "business_logo": "https://res.cloudinary.com/tendar/image/upload/logo.png",
    "store_name": "adeyemi_electronics"
  },
  "customer": {
    "id": "6707b0f1e2d3c4b5a6978801",
    "first_name": "Chioma",
    "last_name": "Okafor",
    "email": "customer@example.com",
    "phone": "+2348031234567",
    "image": "",
    "status": "active"
  },
  "metadata": { "cart_id": "CART-88213" },
  "created_at": "2026-10-10T09:00:00.000Z",
  "updated_at": "2026-10-10T09:20:00.000Z"
}
```

| Field                             | Description                                                                                                                                                                      |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`                          | The products' total.                                                                                                                                                             |
| `service_charge`                  | The customer's fee, paid with the first payment.                                                                                                                                 |
| `reference`                       | The merchant's reference, or one Tendar generated. Unique to your company.                                                                                                       |
| `status`, `status_reason`         | See [Status](#status). `status_reason` is your reason when you declined it.                                                                                                      |
| `loan_info`                       | The plan the customer picked: interest, duration, how often they pay, the down payment, `first_payment` and your `loan_amount`.                                                  |
| `progress`                        | The checkout steps done: `created`, `analyzed`, `loan_info_set`, `approved_loan_info`, `down_payment`, `loan_disbursed`, `first_recollection`.                                   |
| `origin`                          | `api` (the merchant's website), `merchant_store` (the merchant's Tendar store) or `market_place` ([Oja](https://docs.tendar.co/documentation/buy-now-pay-later/marketplace.md)). |
| `loan`                            | The [loan](https://docs.tendar.co/documentation/disbursement/loans.md)'s ID, once disbursed.                                                                                     |
| `abandon_at`                      | When it's abandoned if nothing happens.                                                                                                                                          |
| `collect_set`, `collect_verified` | The customer's [Collect](https://docs.tendar.co/documentation/recollection/collect.md) mandate, when you collect that way.                                                       |
| `merchant`, `customer`            | Who sells, and who buys.                                                                                                                                                         |
| `cancellation_reason`             | The customer's reason, when cancelled.                                                                                                                                           |
| `activity_logs`                   | Every step, with a time.                                                                                                                                                         |

### Approve a transaction

***

```
POST /api/v1/transaction/approve/:id
```

Approves a transaction that is `awaiting_approval`, or an `abandoned` one whose plan was chosen (it gets 7 more days). It becomes `approved`, and the customer can make the first payment.

**Request body**

```json
{ "send_payment_link": true }
```

| Field               | Required | Description                                                       |
| ------------------- | -------- | ----------------------------------------------------------------- |
| `send_payment_link` | No       | `true` also emails the customer the link to pay. Default `false`. |

**Response** `200 OK`

```json
{ "error": false, "message": "transaction approved successfully" }
```

### Decline a transaction

***

```
POST /api/v1/transaction/decline/:id
```

Declines a transaction waiting for you. There are two ways:

* **Decline it.** It becomes `declined`, and the customer is emailed your reason.
* **Send it back.** Name the steps the customer must redo in `options`. It goes back to `pending`, and the customer is emailed to update those details. Use this when, say, an ID document is unreadable.

**Request body**

```json
{
  "reason": "Please upload a clearer ID and a recent bank statement",
  "options": ["identity_information", "bank_statement"]
}
```

| Field     | Required | Description                                          |
| --------- | -------- | ---------------------------------------------------- |
| `reason`  | No       | Shown to the customer.                               |
| `options` | No       | The steps to redo. Leave it out to decline outright. |

The steps you can name come from `GET /api/v1/transaction/decline/options`: `profile_information`, `identity_information`, `liveliness_check`, `employment_information`, `bank_statement`, then your own onboarding forms by name.

```json
{
  "error": false,
  "message": "rejection options fetched successfully",
  "data": ["profile_information", "identity_information", "liveliness_check", "employment_information", "bank_statement", "guarantor_form"]
}
```

**Response** `200 OK`

```json
{ "error": false, "message": "transaction declined successfully" }
```

### Send a payment link

***

```
GET /api/v1/transaction/send-payment-link/:id
```

Emails the customer the link to make the first payment of an `approved` transaction, for example if they lost the first email.

```json
{ "error": false, "message": "payment link sent successfully" }
```

### Fetch and list transactions

***

| Action             | Endpoint                                             |
| ------------------ | ---------------------------------------------------- |
| Fetch by ID        | `GET /api/v1/transaction/fetch/:id`                  |
| Fetch by reference | `GET /api/v1/transaction/fetch/reference/:reference` |
| List               | `GET /api/v1/transaction/list`                       |

Fetched and listed transactions include the merchant and the customer. Fetched by reference, the customer has only their ID, names and email.

The list takes these [query params](https://docs.tendar.co/documentation/getting-started/query-params.md): `status`, `reference`, `customer` (the customer's ID), `loan`, `currency`, `amount` (`50000` or a range like `50000/300000`), `search` (reference, narration and product names), `created_at`, `updated_at`, `date_by`, `sort-created_at` and `sort-updated_at`.

```
GET /api/v1/transaction/list?status=awaiting_approval&page=1&limit=20
```

### Webhooks

***

Each change of status sends a webhook to your company's webhook URL.

| Event                           | Sent when                                                                                                                         |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `transaction.created`           | A merchant created an order, or you accepted a [bid](https://docs.tendar.co/documentation/buy-now-pay-later/marketplace.md#bids). |
| `transaction.awaiting_approval` | The customer accepted a plan; it's waiting for you.                                                                               |
| `transaction.approved`          | It was approved, by you or automatically.                                                                                         |
| `transaction.declined`          | You declined it.                                                                                                                  |
| `transaction.cancelled`         | The customer cancelled it.                                                                                                        |
| `transaction.success`           | The customer's first payment succeeded.                                                                                           |
| `transaction.failed`            | The first payment failed.                                                                                                         |
| `transaction.disbursed`         | The loan was paid out and the merchant paid.                                                                                      |
| `transaction.abandoned`         | Nothing happened for 7 days.                                                                                                      |

`data` is the [transaction](#the-transaction-object) as it stands, with its merchant and customer.

**`transaction.approved`**

```json
{
  "data": {
    "id": "6707c1a2b3c4d5e6f7a8b9c0",
    "amount": 250000,
    "service_charge": 3000,
    "currency": "NGN",
    "reference": "ORD-12345",
    "status": "approved",
    "loan_info": {
      "interest_rate": 5,
      "interest_type": "flat",
      "duration": 3,
      "duration_type": "monthly",
      "frequency": 1,
      "frequency_type": "monthly",
      "amount_per_frequency": 70000,
      "down_payment": { "type": "percentage", "value": 20 },
      "first_payment": 50000,
      "loan_amount": 200000
    },
    "progress": ["created", "analyzed", "loan_info_set", "approved_loan_info"],
    "origin": "api",
    "merchant": { "id": "66fb2a1c3d4e5f6a7b8c9d01", "store_name": "adeyemi_electronics" },
    "customer": { "id": "6707b0f1e2d3c4b5a6978801", "first_name": "Chioma", "last_name": "Okafor", "email": "customer@example.com" },
    "metadata": { "cart_id": "CART-88213" },
    "checkout_url": "https://checkout.tendar.co/?transactionId=6707c1a2b3c4d5e6f7a8b9c0",
    "created_at": "2026-10-10T09:00:00.000Z",
    "updated_at": "2026-10-10T11:00:00.000Z"
  },
  "event": "transaction.approved"
}
```

Every event has the same shape; the `event` and the transaction's `status` change. `transaction.disbursed` also has the `loan` ID, and `transaction.success` the `date_paid`.

See [Webhooks](https://docs.tendar.co/documentation/getting-started/webhooks.md) to verify and acknowledge them.

### Errors

***

| Status | Message                                             | Cause                                          |
| ------ | --------------------------------------------------- | ---------------------------------------------- |
| 400    | `this transaction cannot be approved`               | It isn't waiting for your decision.            |
| 400    | `this transaction cannot be declined`               | It isn't waiting for your decision.            |
| 400    | `not an approved transaction`                       | Payment links are for `approved` transactions. |
| 400    | `Bnpl is not enabled for this company`              | BNPL is switched off in your settings.         |
| 401    | `Invalid token`                                     | The secret key is wrong.                       |
| 403    | `company not subscribed to BNPL service`            | Your plan doesn't include BNPL.                |
| 403    | `You don't have permission to access this resource` | You sent a merchant's API key.                 |
| 404    | `transaction not found`                             | No transaction with that ID or reference.      |

See [Error](https://docs.tendar.co/documentation/getting-started/error.md) for the error format.

### Next steps

***

* [BNPL SDK](https://docs.tendar.co/documentation/buy-now-pay-later/bnpl-sdk.md) — what the customer sees at checkout.
* [Merchant withdrawals](https://docs.tendar.co/documentation/buy-now-pay-later/withdrawals.md) — pay your merchants what they've earned.
