# Capusta.space

{% hint style="info" %}
Loyalty program for the promocode **"Salebot"**:&#x20;

The tariff is 5 per cent, without term limit and without the need to confirm the status of self-employment.&#x20;

Among other things, without additional charge and without fees, you can immediately access all the features of the service: bills, invoices, subscription, after-payment file delivery, streaming widgets, partner program.&#x20;

The affiliate program will connect customers and generate additional revenue in the form of 0.2% from their transactions.
{% endhint %}

## Register

After registration in the service <https://capusta.space/> in the settings of your project will appear the data you need:&#x20;

**project code(project\_code)** - in the example&#x20;

**this is testsalebot token for API** - 71b7d77f-7c77-77cb-7f7a-bbc7a17c1e77&#x20;

**your Email ( which you have registered with)** - <test@test.ru>

In addition to these data, you will also need to fill in the form in the section "Notifications and forwarding" under the link <https://dev.capusta.space/#rec167335038&#x20>;

Clicking on the link, scroll down a little bit and find the following window:

!!!!!

Use the button "Specify URL and fill in the following data in the form:

* Your Login Mail in your Capusta.space Account
* the last 4 digits of the linked card
* &#x20;<https://chatter.salebot.pro/capusta\\_callback/result> - callback url&#x20;
* &#x20;<https://chatter.salebot.pro/capusta\\_callback/success> - success url&#x20;
* <https://chatter.salebot.pro/capusta\\_callback/fail> - fail url

!!!!!!

## Connection setting&#x20;

To connect the Capusta payment system, you will need to enter your token and project code in the Salebot settings. In salebot we open the section of payment systems, select capusta and enter the received data.

![](/files/ErO4KrXNTheRqKnCeQcg)

## Generation of link to payment

To generate a link to payment, you need to set the value of the payment\_sum variable (for example, 1000), and then the capusta\_pay\_url variable appears. This variable can be displayed with a link or placed on the button with the text "Pay". The link appears as: <https://capu.st/billfb22c773-3a0f> Also, before setting the payment\_sum value, you can specify the following optional variables for payment configuration: payment\_description - payment description link\_expired - payment lifespan. You can enter the date in the format dd.mm.yyyyyyyyyyyyyyyyy hh:mm, for example: â 03.04.2022 19:34'. Attention! Time is formed by the time zone of the project. payment\_comment - You can allow the paying user to leave a comment to the translation. test\_payments - You can make a test payment in Capusta if you specify the value of this variable to True. You can find out more about which cards you can specify for test transactions on the https\:/dev.capusta.space/#rec240878484 page

!!!!!!

### Example of a link to pay&#x20;

Create a link to the payment of 1 dollar (pay attention - <mark style="color:purple;">the amount of less than 10 rubles do not pass to the payment!)</mark>

<mark style="color:purple;">!!!!!</mark>

{% hint style="info" %}
Note: first additional variables are specified for the settings, then payment\_sum.
{% endhint %}

You can define variables earlier in a chain, not in a single block, this is an example.&#x20;

Next, at the right place, print the variable capusta\_pay\_url, which contains the link

<mark style="color:purple;">!!!!!</mark>

## Payment result processing (callback about payment)&#x20;

After successful payment in the bot will come callback , by which you can understand that there was a successful payment. These callback in the system you see as messages from the user, so that they can not be sent by the user, they consist of the first 10 token characters and homepage success, for example: 71b7d77f-7\_success These callback DOES NOT SEE the user, they are displayed only to the operator. The type of comparison should be "Full match" Also, after successful payment, the variable capusta\_payment\_completed is set to true. For example, you can make a successful payment processing block with a condition and print the corresponding message to the user:

<mark style="color:purple;">!!!!!!</mark>

Upon completion of payment, the client will be added a capusta\_callback\_data variable containing the payment system response data for the completed transaction. You can extract the necessary data from the dictionary using the get method.

## Subscription creation&#x20;

Subscription creation is available on capusta. To do this, you should assign any value to the capusta\_subscription\_payment variable, and then you will create a monthly subscription. If you want to specify another period, create the variable capusta\_subscription\_period and assign it one of the following values: daily - "DAILY", weekly - "WEEKLY", monthly - "MONTHLY", "SELECTIVELY" is the user’s choice (in this case, the payer chooses the frequency of write-off) Example(what a payment looks like when the "SELECTIVELY" value is used)

<mark style="color:purple;">!!!!!</mark>

After a successful subscription, the client variable capusta\_subscriber\_id will appear, indicating the subscriber number on the Capusta system.

<mark style="color:purple;">!!!!!</mark>

## Unsubscribing&#x20;

In order to cancel an existing subscription, you should use the function capusta\_remove\_subscription(capusta\_subscriber\_id), which takes on the input the same number of the cabbage subscriber. After triggering the function, the capusta\_subscriber\_id variable will be cleared and the subscription will be canceled.

<mark style="color:purple;">!!!!!</mark>


---

# 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.mavibot.ai/integrations/payment/capusta.space.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.
