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

# Checkout Redirect

#### Configuring debit items

When creating a new debit item that defines the parameters of the checkout and the subscription, you need to add a redirect url. This parameter is the only parameter you are allowed to alter after creating your item. It must point to a valid link on your website where you wish to redirect to.

<figure><img src="/files/TZ2B0RhPq9PetTeSJAYN" alt=""><figcaption><p>This is the form you need to fill out when creating an item</p></figcaption></figure>

The URL configured here will redirect the user after they have successfully created a subscription payment intent with their account and ready to start making payments.

The website will redirect using this schema:

```typescript
${redirectUrl}?paymentIntent=${paymentIntent}`
```

Where the redirect url is a valid url you have supplied, and the paymentIntent query parameter is a parameter used to identify the payment intent.

{% hint style="info" %}
The paymentIntent variable is a poseidon hash used with the zero-knowledge proof cryptography. It identifies individual zkSnarks created with the same account and nullifies them after they have been processed. \
\
All cryptography is handled by Debitllama and you just need to use this variable as an identifier. It will let you query the API and also the blockchain.
{% endhint %}

#### How to use?

Use this variable to fetch details about the subscription status using the payment\_intents endpoints. Learn more about how to use them here:

{% content-ref url="/pages/fmvGMsYsiynKkZHGruYW" %}
[/api/v1/payment\_intents/\[slug\]](/debitllama/rest-api-v1/api-v1-payment_intents-slug.md)
{% endcontent-ref %}

For fixed priced subscriptions by default you don't need to do anything. After the payment intent has been created the payments will be processed automatically. \
\
For dynamic priced subscriptions you will need to trigger a payment request on the front-end or via the API. For this you will need to use the paymentIntent as an identifier.

{% hint style="success" %}
Learn about how to create access tokens on the next page, before you start using the API!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://debitllama.gitbook.io/debitllama/accepting-payments/checkout-redirect.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
