> ## Documentation Index
> Fetch the complete documentation index at: https://doc.seerbit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Standard checkout

> Create a transaction server-side and redirect the customer to a hosted checkout page.

**Ideal for**: Developers who require full backend control. This method enables you to generate secure, unique payment links for customers, perfect for invoicing, email payments, or complex order workflows

> **Standard Checkout or a payment link?** Both send the customer to a SeerBit-hosted page. Standard Checkout creates a link for one customer and one purchase, at the moment of purchase. A [payment link](/online-payments/payment-features/payment-link) is created once and can be paid by anyone, any number of times. See the [full comparison](/online-payments/payment-features/payment-link#payment-link-or-standard-checkout).

## How it Works

When a customer clicks a payment button in your application, your server sends a **POST** request to our API. We return a **redirect link** where the customer enters payment details. After payment, the user is redirected to your specified callbackUrl.

## Authentication

Standard Checkout calls are authenticated with a **bearer token**, generated from your public and secret keys.

```bash theme={null}
POST https://seerbitapi.com/api/v2/encrypt/keys
```

<Card title="Authentication" icon="key" href="/authentication#bearer-token">
  How to generate the token, and which credential every other SeerBit API expects.
</Card>

## Requesting a Payment/ Initialize a Transaction

Once you have the Bearer Token, create a transaction when the customer is ready to pay.

<Badge color="blue">POST</Badge>

```bash theme={null}
https://seerbitapi.com/api/v2/payments
```

##### Headers:

Authorization: Bearer YOUR\_ENCRYPTED\_KEY

See the [parameter description](#parameter-description) below for every field, its type and whether it is required.

#### Request Sample

The code snippet below shows an example request for initialising a transaction

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://seerbitapi.com/api/v2/payments' \ 
  --header 'Content-Type: application/json' \ 
  --header 'Authorization: Bearer YOUR_ENCRYPTED_KEY' \ 
  --data-raw '{ 
      "publicKey": "YOUR_PUBLIC_KEY", 
      "amount": "5000.00", 
      "currency": "NGN", 
      "country": "NG", 
      "paymentReference": "payment_reference",
      "email": "customer@example.com",
      "fullName": "Jane Doe",
      "tokenize": false,
      "callbackUrl": "https://yourwebsite.com/thank-you"
  }'
  ```

  ```js NODE theme={null}
  var request = require('request');
  var options = {
    'method': 'POST',
    'url': 'https://seerbitapi.com/api/v2/payments',
    'headers': {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_ENCRYPTED_KEY'
    },
    body: JSON.stringify({
      "publicKey": "YOUR_PUBLIC_KEY",
      "amount": "500",
      "currency": "NGN",
      "country": "NG",
      "paymentReference": "payment_reference",
      "email": "ts@emaildomain.com",
      "fullName": "Halil TS",
      "tokenize": "false",
      "callbackUrl": "https://seerbit.com"
    })

  };
  request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
  });
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://seerbitapi.com/api/v2/payments',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
      "publicKey": "YOUR_PUBLIC_KEY",
      "amount": "500",
      "currency": "NGN",
      "country": "NG",
      "paymentReference": "payment_reference",
      "email": "ts@emaildomain.com",
      "fullName": "Halil TS",
      "tokenize": "false",
      "callbackUrl": "https://seerbit.com",
      "splitCode": "" // Split rule code
  }',
    CURLOPT_HTTPHEADER => array(
      'Content-Type: application/json',
      'Authorization: Bearer YOUR_ENCRYPTED_KEY'
    ),
  ));

  $response = curl_exec($curl);

  curl_close($curl);
  echo $response;
  ```
</CodeGroup>

#### Response Sample

A successful response carries `code: "00"`, with `redirectLink` — the URL to send the customer to — and `paymentStatus` (`"08"` means initialised).

<CodeGroup>
  ```json 200:OK theme={null}
  {
  	"status": "SUCCESS", 
  	"data": { 
  		"code": "00", 
  		"payments": { "redirectLink":"http://checkout.seerbitapi.com/#/mid=
          	merchantpublickey&paymentReference=643108207792124616573324", 
  		"paymentStatus": "08" 
          },
  	"message": "Successful" 
  	} 
  }
  ```

  ```json 409:Conflict theme={null}
  {
      "message": "Transaction Exists",
      "error": "PROCESSING"
  }
  ```
</CodeGroup>

#### Parameter description

| Name | Type | Description | Required |
| - | - | - | - |
| publicKey | `string` | Your SeerBit public key, used for secure transactions. Obtain it from the [Merchant Dashboard](https://dashboard.seerbit.com/#/auth/login). | Yes |
| amount | `string` | Amount to be charged. | Yes |
| currency | `string` | The transaction currency (e.g., NGN, USD). | Yes |
| country | `string` | This is the country from which the transaction is been carried out from | Yes |
| paymentReference | `string` | This is the unique identifier for a transaction, to be generated by merchant. | Yes |
| email | `string` | This is the email of the customer. | Yes |
| fullName | `string` | Customer’s full name (first and last name separated by a space). | Yes |
| tokenize | `boolean` | If `true`, checkout restricts payment to card only and the `authorizationCode` is returned by [Check Payment Status](/online-payments/after-payments/verify-payment), not this endpoint. | No |
| callbackUrl | `string` | URL the customer is redirected to after payment. | Yes |
| splitCode | `string` | Reference to a split rule configured in advance on the dashboard. See [Split settlement](#split-settlement). | No |
| splits | `object` | Inline split definition, applied to this transaction only. See [Split settlement](#split-settlement). | No |

## Payment references and retries

`paymentReference` is the identifier you generate for a transaction, and SeerBit enforces that it is unique. Submitting one that has already been used returns `409 Conflict`:

```json 409:Conflict theme={null}
{
    "message": "Transaction Exists",
    "error": "PROCESSING"
}
```

The equivalent SeerBit status codes are `S14` and `S18` — *transaction reference must be unique*.

### Generating a reference

Use a value that is unique per transaction and traceable back to your own records — a UUID, or your order ID with a prefix:

```
order-8f3c1a2e-4b90        ✅  unique and traceable
1740394829174              ❌  a timestamp can collide under concurrent checkouts
```

Store the reference before you send the request, not after. If the request fails midway you still need the reference to find out what happened.

### If a request times out

Do not resubmit the same charge with a new reference — that risks charging the customer twice. Instead, query the original reference with the [status endpoint](/online-payments/after-payments/verify-payment):

* Status code `S0` means the transaction timed out and the outcome is not yet settled. Query again shortly rather than re-charging.
* A `409 Conflict` on retry means the reference already reached SeerBit, so the original attempt exists — query its status to find out how it resolved.

## Split settlement

Standard Checkout can split a single payment across multiple accounts — with a `splitCode` referencing a rule configured in advance, or a `splits` object defined inline per transaction.

<Card title="Split settlement" icon="git-fork" href="/platforms/split-settlement">
  Payloads and field reference for both split modes.
</Card>

## Transaction fees

Who pays the SeerBit transaction fee is a **setting on your merchant dashboard**, not something you control per request.

| Fee bearer | What the customer is charged | What you receive |
| - | - | - |
| **Merchant** (default) | The `amount` you sent | The `amount`, less the fee, at settlement |
| **Customer** | The `amount` you sent, **plus the fee** | The full `amount` you sent |

When the customer bears the fee, **SeerBit Checkout calculates it and presents it to the customer** on the checkout page, on top of the amount you sent. The customer sees the fee before they pay.

> **Important**: Send the amount you want to receive. Do not add the fee to `amount` yourself — if the customer is set as the fee bearer, checkout adds it, and adding it again charges the customer twice over.

Change the fee bearer in your dashboard settings; it applies to subsequent transactions on that account.

> **This applies to the hosted checkout only.** If you build your own checkout with the [direct payment method endpoints](/payment-methods/overview), SeerBit charges exactly the amount you send — you must calculate and add the fee yourself when the customer bears it.

## Notes

* Always use the redirectLink to send customers to the SeerBit checkout page.
* Set up [webhooks](/online-payments/after-payments/webhook-events) for secure, server-side payment confirmation. Do not rely solely on browser redirects.
* For testing, use SeerBit [test cards](/test-and-live).

## Troubleshooting

If the payment modal does not appear, check your browser console for errors (commonly a missing publicKey). For full parameter details, visit the [Standard Checkout API Reference](/api-reference).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.