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

# Accept payments online

> Add a checkout to your website or app. Create a session, display the Dintero-hosted payment page, and handle the result.

Add a payment checkout to your website or app. You create a session with the order details, display the Dintero-hosted checkout (embedded or as a redirect), and receive a callback when the customer has paid.

This is the standard integration for any online store or service that needs to collect a one-time payment.

```mermaid theme={null}
sequenceDiagram
    participant Merchant as Your server
    participant API as Dintero API
    participant Checkout as Checkout page
    participant Customer as Customer

    Merchant->>API: Create checkout session
    API-->>Merchant: Session ID + checkout URL
    Merchant->>Checkout: Redirect or embed checkout
    Customer->>Checkout: Select payment method & pay
    Checkout->>API: Payment completed
    API->>Merchant: Callback with transaction status
    Checkout->>Customer: Redirect to confirmation page
```

## Integration steps

**1. Create API credentials**

In [Backoffice](https://backoffice.dintero.com/), go to **Settings > API clients** and create a new **Checkout client**. Save the Client ID and Client Secret. The secret is only shown once.

Use your sandbox account (`T` prefix) while developing. Switch to production (`P` prefix) when you're ready to accept real payments.

**2. Authenticate**

Exchange your credentials for a bearer token using the OAuth 2.0 client credentials flow. The token is valid for 4 hours and is used in the `Authorization` header for all API calls.

See [Authentication](/docs/checkout/checkout-client.md#authentication) for details.

**3. Create a checkout session**

Send a `POST` request to `/v1/sessions-profile` with the order details: items, amounts, currency, and URLs for the callback and customer redirect.

The response returns a **session ID** and a **checkout URL** that you use to display the payment page.

See [Create a session](/docs/checkout/create-session.md) for the full payload reference.

**4. Display the checkout**

Show the checkout to the customer. You have two options:

* **Redirect**: send the customer to the Dintero-hosted checkout page. Minimal setup, no iframe.
* **Embed**: render the checkout inside your page using the [Web SDK](https://github.com/Dintero/Dintero.Checkout.Web.SDK). More control over the experience.

See [Embed vs redirect](/docs/checkout/embedVredirect.md) for a comparison.

**5. Handle the payment result**

After the customer pays, Dintero notifies you through two channels:

| Channel | How | Use for |
| - | - | - |
| **callback\_url** | Server-to-server GET request (retried up to 20 times) | Verify payment and fulfill the order |
| **return\_url** | Customer browser redirect (not guaranteed) | Show a confirmation page |

Always verify the transaction via the callback. The browser redirect can fail if the customer closes the tab.

See [Handling payment](/docs/checkout/after-payment.md) for transaction statuses and handling.

**6. Manage transactions**

After authorization, you can **capture**, **void**, or **refund** transactions through the Transactions API. Most integrations capture when the order is shipped.

See [Transaction management](/docs/checkout/transaction-management.md) for available operations and the [state diagram](/docs/checkout/transaction-state-diagram.md) for how transactions move between statuses.

## What's next

> **[Quickstart](/docs/checkout/quickstart.md)**
>
> End-to-end walkthrough with code examples in cURL, Python, and Node.js.

> **[Test data](/docs/checkout/checkout-testdata.md)**
>
> Test cards and sandbox scenarios for verifying your integration.

> **[Payment profiles](/docs/checkout/payment-profiles.md)**
>
> Configure which payment methods are shown in the checkout.

> **[Webhooks](/docs/checkout/checkout-webhooks.md)**
>
> Subscribe to real-time transaction events.


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