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

# Quickstart: Accept Your First Payment with Accelebit

> Make your first card payment through the Accelebit API in minutes. Create a customer, submit a test payment, and verify the response end-to-end.

The Accelebit Payments API is a server-to-server gateway — your backend sends card and billing details directly to the API and receives a payment result in real time. This guide walks you through the full flow: getting your API keys, creating a customer, submitting a test payment, and handling the response.

<Steps>
  <Step title="Get your API keys">
    Sign in to the [Accelebit Dashboard](https://dashboard.accelebit.com) and navigate to **Developers > API Keys**. You will see two types of keys:

    | Key type   | Prefix      | Use                                                                      |
    | ---------- | ----------- | ------------------------------------------------------------------------ |
    | Secret key | `smtgw_sk_` | Server-side API calls. Never expose this in client-side code.            |
    | Public key | `smtgw_pk_` | Identifies your account in client-side contexts. Not used for API calls. |

    All API requests require your **secret key** in the `X-API-Key` header. During development, use a test key (prefixed `smtgw_sk_test_`) — it will never trigger real charges.
  </Step>

  <Step title="Create a customer">
    Before processing payments, create a customer record. The `externalId` field is your own identifier for this customer — for example, your internal user ID.

    <CodeGroup>
      ```bash Request theme={null}
      curl -X POST https://api.gateway.accelebit.com/v1/customers \
        -H "Content-Type: application/json" \
        -H "X-API-Key: smtgw_sk_test_your_secret_key" \
        -H "Idempotency-Key: cust_$(uuidgen)" \
        -d '{
          "externalId": "user_12345",
          "email": "jane@example.com"
        }'
      ```

      ```json Response theme={null}
      {
        "data": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "externalId": "user_12345",
          "email": "jane@example.com",
          "createdAt": "2026-04-09T12:00:00.000Z"
        }
      }
      ```
    </CodeGroup>

    Save the returned `id` — you will pass it as `customerId` in the next step.
  </Step>

  <Step title="Create a test payment">
    Send a `POST /v1/payments` request with the card details, billing address, and the customer ID from the previous step. Pass amounts as decimal strings (for example, `"55.00"`, not the integer `5500`).

    <CodeGroup>
      ```bash Request theme={null}
      curl -X POST https://api.gateway.accelebit.com/v1/payments \
        -H "Content-Type: application/json" \
        -H "X-API-Key: smtgw_sk_test_your_secret_key" \
        -H "Idempotency-Key: pay_$(uuidgen)" \
        -d '{
          "amount": "55.00",
          "currency": "EUR",
          "paymentMethod": "card",
          "customerId": "user_12345",
          "card": {
            "number": "4111111111111111",
            "expiryMonth": "12",
            "expiryYear": "28",
            "cvv": "123",
            "holderName": "Jane Doe"
          },
          "billing": {
            "firstName": "Jane",
            "lastName": "Doe",
            "email": "jane@example.com",
            "phone": "+35699123456",
            "country": "MT",
            "address": "123 Main Street",
            "city": "Valletta",
            "postalCode": "VLT 1000"
          },
          "returnUrl": "https://yoursite.com/payment/callback",
          "merchantRef": "order_98765"
        }'
      ```

      ```json Response theme={null}
      {
        "data": {
          "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
          "status": "captured",
          "amount": "55.00",
          "currency": "EUR",
          "provider": "everest",
          "threeDsRequired": false,
          "threeDsData": null,
          "createdAt": "2026-04-09T12:01:00.000Z"
        }
      }
      ```
    </CodeGroup>

    A `"status": "captured"` response means the payment was authorised and captured successfully.

    <Note>
      If the response contains `"threeDsRequired": true`, the cardholder must complete a 3D Secure challenge before the payment can be captured. Follow the redirect instructions in [the 3D Secure guide](/guides/server-to-server#3d-secure) to complete the flow.
    </Note>
  </Step>

  <Step title="Handle webhooks">
    Configure a webhook endpoint in the [Dashboard](https://dashboard.accelebit.com) to receive real-time payment notifications. When a payment completes, Accelebit sends a `payment.captured` or `payment.failed` event to your endpoint:

    ```json theme={null}
    {
      "event": "payment.captured",
      "data": {
        "transactionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "merchantId": "your_merchant_id",
        "status": "captured",
        "amount": 5500,
        "currency": "EUR"
      },
      "timestamp": "2026-04-09T12:01:01.000Z"
    }
    ```

    Use webhooks rather than polling to update your order state reliably. See [Webhooks](/webhooks/overview) for signature verification and retry behavior.
  </Step>

  <Step title="Check payment status">
    You can query the current status of any payment at any time using its `id`:

    ```bash theme={null}
    curl https://api.gateway.accelebit.com/v1/payments/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
      -H "X-API-Key: smtgw_sk_test_your_secret_key"
    ```

    This is useful for reconciliation or to confirm a payment's final state after a webhook event.
  </Step>
</Steps>

## Next steps

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/authentication">
    Understand API key types, key management, idempotency, and rate limits.
  </Card>

  <Card title="Server-to-server guide" icon="server" href="/guides/server-to-server">
    Complete integration walkthrough including 3D Secure handling.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/webhooks/overview">
    Set up signature verification and understand retry behavior.
  </Card>
</CardGroup>
