# Transactions

{% hint style="info" %}
Production URL: [https://transactions-v1-api-rdqehkur6a-ey.a.run.app](https://transactions-v1-api-rdqehkur6a-ey.a.run.app/)
{% endhint %}

## Create Payout Request

Payouts can be created for users which will be deducted from the Tenant <mark style="color:yellow;">Distribution Wallet</mark>.

{% hint style="info" %}
Good to know:

* Payouts can be processed automatically or manually via the TygaPay dashboard. Contact <support@tygapay.com> to configure your preferred payout process.
* Tenant Distribution Wallets can be funded via bank transfers or crypto deposits. Contact <support@tygapay.com> for more information.
  {% endhint %}

{% openapi src="<https://tygapay.github.io/docs/definition.json>" path="/transactions/payout" method="post" %}
<https://tygapay.github.io/docs/definition.json>
{% endopenapi %}

## Create Staking Payout Request

Staking allows users to earn rewards by holding and locking their cryptocurrencies over a period.

{% hint style="info" %}
Good to know:

* Rewards are calculated based on the asset configuration.
* For more details about staking terms and conditions, please contact <support@tygapay.com>.
  {% endhint %}

{% openapi src="<https://820186084-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCZIBuMMKukshUmEKQzb%2Fuploads%2Fnu6vNPt3wKDfs4NABu4X%2Fdefinition.latest.json?alt=media&token=b1c8df22-da43-4a33-be25-149ad5add318>" path="/transactions/staking/payout" method="post" %}
[definition.latest.json](https://820186084-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCZIBuMMKukshUmEKQzb%2Fuploads%2Fnu6vNPt3wKDfs4NABu4X%2Fdefinition.latest.json?alt=media\&token=b1c8df22-da43-4a33-be25-149ad5add318)
{% endopenapi %}

## Revoke Staking Payout

{% openapi src="<https://tygapay.github.io/docs/definition.json>" path="/transactions/staking/payout/revoke" method="post" %}
<https://tygapay.github.io/docs/definition.json>
{% endopenapi %}

## Payout Completed Notify Url

<mark style="color:green;">`POST`</mark> `https://your-notify-url`

#### Request Body

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>transactionId<mark style="color:red;">*</mark></td><td>string</td><td>Unique Transaction Id.</td></tr><tr><td>thirdPartyId<mark style="color:red;">*</mark></td><td>string</td><td>Unique Id of the third party involved in the transaction.</td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>number</td><td>The transaction payout amount.</td></tr><tr><td>status<mark style="color:red;">*</mark></td><td>string</td><td><code>success</code>: Payout has been processed successfully.<br><code>cancelled</code>: Payout has been cancelled.</td></tr></tbody></table>

## Get User Transactions

{% openapi src="<https://tygapay.github.io/docs/definition.json>" path="/transactions/users" method="get" %}
<https://tygapay.github.io/docs/definition.json>
{% endopenapi %}

## Search Transactions

{% openapi src="<https://tygapay.github.io/docs/definition.json>" path="/transactions" method="get" %}
<https://tygapay.github.io/docs/definition.json>
{% endopenapi %}

## Refund Pending Confirmation Transactions

In some instances, customers may make a duplicate payment or send a payment to a crypto wallet address that is no longer associated with an order. In such cases, the payment will remain unlinked to an order and be placed in a 'pending\_confirmation' status until it can be confirmed or refunded.

{% openapi src="<https://tygapay.github.io/docs/definition.json>" path="/transactions/refund" method="post" %}
<https://tygapay.github.io/docs/definition.json>
{% endopenapi %}
