TygaPay Docs
  • ๐Ÿ‘‹Welcome!
  • ๐Ÿ›’Payment Gateway
    • ๐Ÿ’กHow It Works
    • โ„น๏ธGet Started
  • API
    • ๐Ÿš€API Integration Setup
      • ๐Ÿ”Authentication
      • โ†—๏ธRequests
    • ๐Ÿ“ฆAPIs
      • ๐Ÿ“–Swagger Docs
      • ๐ŸฆTenants
      • ๐Ÿ˜„Users
      • โ†”๏ธTransactions
      • ๐ŸงพOrders
  • Plugins
    • ๐Ÿ›๏ธWooCommerce
      • ๐Ÿ”‘API Credentials
      • ๐Ÿ› ๏ธIntegration
  • Admin Portal
    • โชRefunds
      • โฎ๏ธPaid Order Refunds
      • โ—€๏ธPartial Paid Order Refunds
      • โ—€๏ธOverpaid Order Refunds
Powered by GitBook
On this page
  1. API
  2. APIs

Transactions

API's to manage Transactions.

PreviousUsersNextOrders

Last updated 8 months ago

Production URL:

Create Payout Request

Payouts can be created for users which will be deducted from the Tenant Distribution Wallet.

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.

Create Staking Payout Request

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

Good to know:

  • Rewards are calculated based on the asset configuration.

  • For more details about staking terms and conditions, please contact support@tygapay.com.

Revoke Staking Payout

Payout Completed Notify Url

POST https://your-notify-url

Request Body

Name
Type
Description

transactionId*

string

Unique Transaction Id.

thirdPartyId*

string

Unique Id of the third party involved in the transaction.

amount*

number

The transaction payout amount.

status*

string

success: Payout has been processed successfully. cancelled: Payout has been cancelled.

Get User Transactions

Search Transactions

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.

๐Ÿ“ฆ
โ†”๏ธ
https://transactions-v1-api-rdqehkur6a-ey.a.run.app

Fetches a list of transactions for a user.

get
Query parameters
idstringOptional

The Id of the transaction to retrieve.

userIdstringRequired

The Id of the user whose transactions to retrieve.

Header parameters
x-api-keystringRequired

Your unique API Key.

x-api-hashstringRequired

Your API Hash.

Responses
200
OK
application/json
409
Permission denied.
500
Internal error.
get
GET /transactions/users?userId=text HTTP/1.1
Host: 
x-api-key: text
x-api-hash: text
Accept: */*
[
  {
    "id": "text",
    "userId": "text",
    "tenantId": "text",
    "status": "text",
    "amount": 1
  }
]

Fetches a transaction by order number or transaction hash.

get
Query parameters
txHashstringOptional

The transaction hash to retrieve.

orderNumberstringOptional

The order number to retrieve.

Header parameters
x-tenant-idstringRequired

The tenant ID.

x-api-keystringRequired

Your unique API Key.

x-api-hashstringRequired

Your API Hash.

Responses
200
OK
application/json
400
Either orderNumber or txHash is required.
500
Internal error.
get
GET /transactions HTTP/1.1
Host: 
x-tenant-id: text
x-api-key: text
x-api-hash: text
Accept: */*
{
  "id": "text",
  "userId": "text",
  "tenantId": "text",
  "status": "text",
  "side": "text",
  "type": "text",
  "orderId": "text",
  "orderNumber": "text",
  "amount": 1,
  "txHash": "text",
  "createdDate": "2025-05-16T22:38:58.214Z",
  "completedDate": "2025-05-16T22:38:58.214Z"
}

Create a payout request that will credit a user's balance. All credits will be locked/pending until the funds are confirmed.

post
Header parameters
x-api-keystringRequired

Your unique API Key.

x-api-hashstringRequired

Your API Hash.

Body
thirdPartyIdstringOptional

Third party unique transaction id.

userIdstringOptional

Tyga user id.

amountnumberOptional

Amount to credit.

notifyUrlstringOptional

URL to notify after the payout is completed. (Webhook)

Responses
200
Payout request successfully created.
application/json
409
User with the same third party Id already exists.
500
Internal error.
post
POST /transactions/payout HTTP/1.1
Host: 
x-api-key: text
x-api-hash: text
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "thirdPartyId": "text",
  "userId": "text",
  "amount": 1,
  "notifyUrl": "text"
}
{
  "transactionId": "text",
  "thirdPartyId": "text"
}

Revoke a staking payout transaction.

post
Header parameters
x-api-keystringRequired

Your unique API Key.

x-api-hashstringRequired

Your API Hash.

Body
transactionIdstringOptional

Transaction Id for the staking request.

Responses
200
Revoked Staking Transaction Successfully.
application/json
500
Internal error.
post
POST /transactions/staking/payout/revoke HTTP/1.1
Host: 
x-api-key: text
x-api-hash: text
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "transactionId": "text"
}
{
  "transactionId": "text",
  "thirdPartyId": "text"
}

Refund Pending Confirmation Payment Transactions.

post
Header parameters
x-api-keystringRequired

Your unique API Key.

x-api-hashstringRequired

Your API Hash.

Body
txIdstringOptional

Payment transaction id.

emailstringOptional

TygaPay account email that will receive the refund.

Responses
200
Refund Payment Transaction Successfully.
application/json
500
Internal error.
post
POST /transactions/refund HTTP/1.1
Host: 
x-api-key: text
x-api-hash: text
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "txId": "text",
  "email": "text"
}
{
  "status": "text",
  "message": "text"
}
  • Create Payout Request
  • POSTCreate a payout request that will credit a user's balance. All credits will be locked/pending until the funds are confirmed.
  • Create Staking Payout Request
  • POSTCreate a staking payout transaction.
  • Revoke Staking Payout
  • POSTRevoke a staking payout transaction.
  • Payout Completed Notify Url
  • Get User Transactions
  • GETFetches a list of transactions for a user.
  • Search Transactions
  • GETFetches a transaction by order number or transaction hash.
  • Refund Pending Confirmation Transactions
  • POSTRefund Pending Confirmation Payment Transactions.

Create a staking payout transaction.

post
Header parameters
x-api-keystringRequired

Your unique API Key.

x-api-hashstringRequired

Your API Hash.

Body
thirdPartyIdstringOptional

Third party unique transaction id.

userIdstringOptional

Tyga user id.

usdAmountnumberOptional

USD amount to stake.

assetstring ยท enumOptional

Type of staking - Supported KRU

Possible values:
durationInMonthsnumberOptional

Staking duration in months. Defaults to 3 months if not set.

Responses
200
Staking Payout request successfully created.
application/json
409
Unique Id with the same third party Id already exists.
500
Internal error.
post
POST /transactions/staking/payout HTTP/1.1
Host: 
x-api-key: text
x-api-hash: text
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "thirdPartyId": "text",
  "userId": "text",
  "usdAmount": 1,
  "asset": "KRU",
  "durationInMonths": 1
}
{
  "transactionId": "text",
  "thirdPartyId": "text"
}