# Payments

## Payment types

Whether you want to bill your customers once off or on a recurring basis, we've got the solution for you. Here's a breakdown of all the payment types:

1. **Orders** (Any once off or recurring purchases in the hosted checkout)
2. **Renewals** (Any recurring billing transactions)
3. **(Re)Subscribe** (Customers (re)subscribing to recurring billing products)
4. **Pause** (Customers paying 12.5% fee to pause their recurring billing products)

## Payment Statuses

Every time a payment is made, it goes into an immediate pending status until the transaction has been confirmed on chain. Once confirmed it will be shown as successful and if an error has occurred then it will be marked as failed.

1. **Pending** (Currently being confirmed on chain)
2. **Successful** (Confirmed on chain)
3. **Failed** (Error or insufficient funds)

There is an additional pending API that monitors any transactions that are about to use the available balance in the users subscription contract balance. This means any order being placed during pending transactions will either decline the payment if not enough USDT is available or a deposit transaction will be created to top up their USDT subscription contract balance.

## Retry Failed Subscription Payments

If any recurring billing renewal transactions have failed, there will be **5 retry attempts** to collect the outstanding funds. After the first failed payment, there will be 4 more retry attempts made 24 hours after the previous one, so the customer essentially has 5 days to Top Up their balance before being unsubscribed.&#x20;

After all 5 retry attempts have been made, the customer will be automatically unsubscribed on chain and any applicable loyalty program discount progress will be reset.&#x20;

## Fallback Payments

This is designed for any recurring billing renewals that cannot be paid for in the original currency it was purchased with. Example: customer purchased a subscription with USDT and now his subscription is up for renewal. He doesn't have enough USDT left in his wallet or account balance but has enough XGT in his wallet and therefore his XGT will be used to pay for the renewal. Same rule applies if the customer originally purchased his subscription with XGT.

This reduces failed renewal payments and overall decreases churn rates for merchants. A simple yet effective solution to keep the steady stream of revenue flowing in.


---

# 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://xionwiki.gitbook.io/xion-global/smart-contracts-and-whitepaper/payments.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.
