# Pay as you Go (PAYG)

With our Pay as you Go pricing, pay for our API based on how much you need. Our Pay as you Go offering is powered by [Dhali](https://dhali.io/docs/getting-started/). Click the link below to access Dhali payment terminal.

{% embed url="<https://pay.dhali.io/?uuids=ee519808-97b7-4288-abb8-17d4a8513ea5>" %}

## PAYG API base URL

Base URL for accessing XRP Ledger mainnet is:

```
https://xrpscan.dhali.io
```

## Full URL

To query ledger index `93957385`, use:

```
https://xrpscan.dhali.io/api/v1/ledger/93957385
```

## How to Pay as you Go

* Log into Dhali Payment Terminal, follow the instructions shown in the app to create a payment channel.
* Click "**Deposit**" to deposit enough `XRP` for your needs.
* Click "**Get payment claim**" to authorize spending your deposit.
* Copy `PAYMENT_CLAIM` value and save it securely. All API requests must use this payment claim to access the API.&#x20;
* Add `PAYMENT_CLAIM` to your request headers:

```
$ PAYMENT_CLAIM='<PAYMENT-CLAIM-VALUE>'
$ curl -H "Payment-Claim: $PAYMENT_CLAIM" https://xrpscan.dhali.io/<API_ENDPOINT>
```

* Monitor your usage via the Payment Terminal. Authorize more funds as needed.

## Example

```
$ PAYMENT_CLAIM='nue9eith1Cai......xi4toh8ohwfQ=='
$ curl -H "Payment-Claim: $PAYMENT_CLAIM" https://xrpscan.dhali.io/api/v1/ping
```

## Dhali documentation

{% embed url="<https://dhali.io/docs/getting-started/>" %}

## Dhali SDKs

{% embed url="<https://www.npmjs.com/package/dhali-js>" %}
dhali-js for Node.js applications
{% endembed %}

{% embed url="<https://pypi.org/project/dhali-py/>" %}
dhali-py for Python applications
{% endembed %}


---

# Agent Instructions: 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:

```
GET https://docs.xrpscan.com/api-documentation/pricing/pay-as-you-go-payg.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
