# Get Webhooks
GET https://api-stg.transak.com/partners/api/v2/webhooks
Retrieves a list of webhook events based on an `eventID` filter. You can
apply filters to narrow down the response.
Supported `eventID` values:
- `ORDER_CREATED`
- `ORDER_PROCESSING`
- `ORDER_PAYMENT_VERIFYING`
- `ORDER_COMPLETED`
- `ORDER_FAILED`
- `ORDER_CANCELLED`
To fetch relevant data, provide `orderID` along with the `eventID` filter.
Reference: https://docs.transak.com/api/public/get-webhooks
## OpenAPI Specification
```yaml
openapi: 3.1.0
info:
title: partner-api
version: 1.0.0
paths:
/webhooks:
get:
operationId: get-webhooks
summary: Get Webhooks
description: |-
Retrieves a list of webhook events based on an `eventID` filter. You can
apply filters to narrow down the response.
Supported `eventID` values:
- `ORDER_CREATED`
- `ORDER_PROCESSING`
- `ORDER_PAYMENT_VERIFYING`
- `ORDER_COMPLETED`
- `ORDER_FAILED`
- `ORDER_CANCELLED`
To fetch relevant data, provide `orderID` along with the `eventID` filter.
tags:
- ''
parameters:
- name: eventID
in: query
description: >-
Filter by event id (ORDER_COMPLETED, ORDER_CANCELLED, ORDER_CREATED,
ORDER_FAILED, ORDER_PROCESSING,ORDER_PAYMENT_VERIFYING))
required: false
schema:
type: string
default: ORDER_COMPLETED
- name: orderID
in: query
description: Filter by order id
required: false
schema:
type: string
default: YOUR_ORDER_ID
- name: access-token
in: header
description: >-
Your Access Token, you can generate one using our [Refresh
Token](/api/public/refresh-access-token) endpoint
required: true
schema:
type: string
default: YOUR_ACCESS_TOKEN
responses:
'200':
description: '200'
content:
application/json:
schema:
$ref: '#/components/schemas/get-webhooks_Response_200'
'401':
description: '401'
content:
application/json:
schema:
$ref: '#/components/schemas/Get-webhooksRequestUnauthorizedError'
servers:
- url: https://api-stg.transak.com/partners/api/v2
components:
schemas:
WebhooksGetResponsesContentApplicationJsonSchemaMeta:
type: object
properties:
orderID:
type: string
description: Filter by order id
eventID:
type: string
description: >-
Filter by event id (ORDER_COMPLETED, ORDER_CANCELLED, ORDER_CREATED,
ORDER_FAILED, ORDER_PROCESSING,ORDER_PAYMENT_VERIFYING))
title: WebhooksGetResponsesContentApplicationJsonSchemaMeta
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgDataPaymentOptionsItemsFieldsItems:
type: object
properties:
name:
type: string
value:
type: string
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgDataPaymentOptionsItemsFieldsItems
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgDataPaymentOptionsItems:
type: object
properties:
currency:
type: string
description: Name of Payment Currency. E.g., "EUR"
id:
type: string
description: payment provider id. E.g., "sepa_bank_transfer"
name:
type: string
description: Payment option Name. E.g., "Bank Transfer Details"
fields:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgDataPaymentOptionsItemsFieldsItems
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgDataPaymentOptionsItems
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgData:
type: object
properties:
liquidityProvider:
type: string
description: Order Conversion Liquidity Provider E.g., "OPENPAYD_MALTA"
status:
type: string
description: order creation status E.g. "CREATED"
beneficiaryName:
type: string
description: Beneficiary Name of Provider. E.g., "Abc Xyz"
paymentOptions:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgDataPaymentOptionsItems
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgData
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentData:
type: object
properties:
orderId:
type: string
description: orderID Unique identifier
paymentId:
type: string
description: Payment Unique ID
pgData:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentDataPgData
liquidityProvider:
type: string
description: Order Conversion Liquidity Provider E.g., "OPENPAYD_MALTA"
updatedAt:
type: string
description: Updated timestamp
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentData
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataStatusHistoriesItems:
type: object
properties:
status:
type: string
description: status of the order. E.g. COMPLETED "
createdAt:
type: string
description: creation timestamp
message:
type: string
description: >-
message of transaction status. E.g., "Payment reconciled
successfully. Received 45 EUR"
isEmailSentToUser:
type: boolean
default: true
description: Email Sent User flag "True" or " False"
partnerEventId:
type: string
description: Order Event Status. E.g., ORDER_PROCESSING
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataStatusHistoriesItems
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataSwapsItems:
type: object
properties:
sourceCurrency:
type: string
description: source currency for order E.g., "GBP"
destinationCurrency:
type: string
description: user initiated currency conversion E.g., USDT, ETH
sourceAmount:
type: integer
default: 0
description: Input amount
destinationAmount:
type: number
format: double
default: 0
description: Output amount
paymentMethod:
type: string
description: Fiat payment method. E.g., gbp_bank_transfer
liquidityProvider:
type: string
description: Source of liquidity Provider. E.g., transak
conversionPrice:
type: number
format: double
default: 0
description: convertion Amount Price based on swap
feeInSourceAmount:
type: integer
default: 0
description: Fees soruce amount
networkFeeInSourceAmount:
type: integer
default: 0
description: network fee source amount
marketConversionPrice:
type: number
format: double
default: 0
description: based on marketprice showing conversion price
isNonCustodial:
type: boolean
default: true
description: source of provide is "NonCustodial" flag based on True / False
isFiatliquidityProvider:
type: boolean
default: true
description: >-
Fiat liquidity provider flag to check there is liquidity provide is
there "True" / "False"
isFiatPartnerDirectCryptoDeposit:
type: boolean
default: true
isFiatPartnerAccountWalletDeposit:
type: boolean
default: true
liquidityProviderData:
type: boolean
default: true
originalDestinationAmount:
type: number
format: double
default: 0
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataSwapsItems
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataFeesItems:
type: object
properties:
name:
type: string
description: Fees Name E.g., "Network/Exchange fee", "Transak fee"
value:
type: integer
default: 0
description: Fees value amount. E.g., "2"
id:
type: string
description: fee id name E.g., "transak_fee"
ids:
type: array
items:
type: string
description: fees ids name E.g., "transak_fee", "partner_fee"
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataFeesItems
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataInternalFeesItems:
type: object
properties:
name:
type: string
description: Name of Fee E.g.,
id:
type: string
description: fees id name E.g., "transak_fee"
value:
type: number
format: double
default: 0
description: value of fees amount
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataInternalFeesItems
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataCost:
type: object
properties:
ethPriceInLocalCurrency:
type: number
format: double
default: 0
description: ETH price in Local currency
gasCostinLocalCurrency:
type: number
format: double
default: 0
description: Transaction Gas Fee cost in Local currency
transakMinimumFee:
type: integer
default: 0
description: transak Minimum Transaction Fees
transakFeeAmount:
type: integer
default: 0
description: Transaction Fees charger by transak
fiatLiquidityProviderFee:
type: integer
default: 0
description: Transaction Fees charger by LiquidityProvide
gasCostinLocalCurrencyByFiatPartner:
type: integer
default: 0
description: Transaction Gas Fee cost in Local currency by FiatPartner
gasCostinLocalCurrencyByCryptoPartner:
type: integer
default: 0
description: Transaction Gas Fee cost in Local currency by CryptoPartner
partnerFeeDecimal:
type: number
format: double
default: 0
description: partner Fee in decimal amount.
partnerFeeInLocalCurrency:
type: number
format: double
default: 0
description: partner fees changed in LocalCurrency during conversion
totalFeeDecimal:
type: number
format: double
default: 0
description: Total Amount of fees in Decimals
totalFeeAmount:
type: number
format: double
default: 0
description: Total Amount of fees charged during transaction
gasCurrency:
type: string
description: Transaction gas fee currency. E.g., "ETH"
gasInNativeToken:
type: number
format: double
default: 0
description: Transaction gas fee chargerd in Crytpo Native Token.
gasCurrencyRateInUsd:
type: number
format: double
default: 0
description: Transaction gas fee Rate in USD
totalAmountChargedByTransak:
type: number
format: double
default: 0
description: Transak Fee Amount
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataCost
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceData:
type: object
properties:
_id:
type: string
description: Unique identifier
id:
type: string
description: Unique identifier
createdAt:
type: string
description: creation timestamp
fiatCurrency:
type: string
description: Fiat currency E.g., "GBP"
cryptoCurrency:
type: string
description: crypto currency E.g., "ETH"
paymentMethod:
type: string
description: Payment method used for order. E.g., "gbp_bank_transfer"
fiatAmount:
type: integer
default: 0
description: Amount in Fiat currency
network:
type: string
description: Blockchain network E.g., ethereum, polygon
cryptoAmount:
type: number
format: double
default: 0
description: Amount in crypto currency
isBuyOrSell:
type: string
description: Type of order – in this case, a crypto purchase.
conversionPrice:
type: number
format: double
default: 0
description: Effective conversion rate.Fiat/crypto rate after fees
marketConversionPrice:
type: number
format: double
default: 0
description: Market rate at order time Without slippage
slippage:
type: number
format: double
default: 0
description: >-
Slippage is the difference between the expected price of a crypto
trade and the actual executed price.
cryptoLiquidityProvider:
type: string
description: Source of crypto liquidity. E.g., transak
fiatLiquidityProvider:
type: string
description: Source of fiat liquidity.E.g.,coinbase
partnerApiKey:
type: string
description: Partner’s API key used to authenticate API
sourceTokenAmount:
type: number
format: double
default: 0
description: Partner’s API key used in API for response
sourceToken:
type: string
description: Initial token type. E.g.,ETH, USDT
notes:
type: array
items:
description: Any type
fiatFeeAmount:
type: number
format: double
default: 0
description: Total fee charged in fiat.
feeDecimal:
type: number
format: double
default: 0
description: Fee percentage in decimal.
swaps:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataSwapsItems
fees:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataFeesItems
fiatAmountInUsd:
type: number
format: double
default: 0
internalFees:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataInternalFeesItems
cost:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceDataCost
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceData
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookData:
type: object
properties:
id:
type: string
description: Unique identifier
walletAddress:
type: string
description: User’s blockchain wallet address
createdAt:
type: string
description: creation timestamp
status:
type: string
description: >-
Current state of the order. Possible values: PENDING, COMPLETED,
FAILED, etc
fiatCurrency:
type: string
description: Fiat currency E.g., "GBP", "USD"
userId:
type: string
description: Unique ID of the user placing the order.
cryptoCurrency:
type: string
description: Cryptocurrency E.g., ETH, BTC
isBuyOrSell:
type: string
description: Type of order – in this case, a crypto purchase.
fiatAmount:
type: integer
default: 0
description: Amount of fiat paid by the user for order
ipAddress:
type: string
description: IP address from which the order was initiated.
amountPaid:
type: integer
default: 0
description: Total charged Amount from the user for order.
paymentOptionId:
type: string
description: Payment method used for order. E.g., "gbp_bank_transfer"
walletLink:
type: string
description: Link to blockchain explorer for the wallet.
quoteId:
type: string
description: >-
A unique identifier generated by the API when the user initially
requests a pricing quote.
orderProcessingType:
type: string
description: Processing mode of order E.g., NORMAL, FAST
addressAdditionalData:
type: boolean
default: true
description: Additional wallet metadata
network:
type: string
description: 'Blockchain network, E.g.,: ethereum, polygon'
conversionPrice:
type: number
format: double
default: 0
description: Effective conversion rate.Fiat/crypto rate after fees
cryptoAmount:
type: number
format: double
default: 0
description: Crypto Amount received after conversion
totalFeeInFiat:
type: number
format: double
default: 0
description: Total fee charged in fiat.
fiatAmountInUsd:
type: number
format: double
default: 0
description: Fiat Amount in USD. E.g. 50
countryCode:
type: string
description: country code based on IP. E.g., "IN"
stateCode:
type: string
description: State Name E.g., "Karnataka"
orderChannelType:
type: string
description: order Channel E.g., WIDGET
tokenContractAddress:
type: string
description: token contract address
userKycType:
type: string
description: Kyc Type E.g., "STANDARD"
cardPaymentData:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataCardPaymentData
statusHistories:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataStatusHistoriesItems
isFirstOrder:
type: boolean
default: true
description: order flag order is FirstOrder or not.
updatedAt:
type: string
description: Update order Timestamp
completedAt:
type: string
description: completed order Timestamp
transactionHash:
type: string
description: transaction ID E.g., "DUMMY_TX_ID"
transactionLink:
type: string
description: transaction Link to track details
conversionPriceData:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookDataConversionPriceData
partnerFeeInLocalCurrency:
type: number
format: double
default: 0
description: partner fees in local currency based on local IP.
title: WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookData
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponseBodyError:
type: object
properties:
message:
type: string
description: error message
id:
type: string
description: error message
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponseBodyError
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponseBody:
type: object
properties:
success:
type: boolean
default: true
error:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponseBodyError
description: error message
title: >-
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponseBody
WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponse:
type: object
properties:
body:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponseBody
statusCode:
type: integer
default: 0
description: API response status code
statusMessage:
type: string
description: API response message
url:
type: string
description: webhook response url
title: WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponse
WebhooksGetResponsesContentApplicationJsonSchemaDataItems:
type: object
properties:
id:
type: string
description: Unique identifier
partnerApiKey:
type: string
description: Partner’s API key used to authenticate API
createdAt:
type: string
description: creation timestamp
eventID:
type: string
description: >-
eventId based on fillter value E.g.,(ORDER_COMPLETED,
ORDER_CANCELLED, ORDER_CREATED, ORDER_FAILED,
ORDER_PROCESSING,ORDER_PAYMENT_VERIFYING))
webhookData:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookData
webhookResponse:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItemsWebhookResponse
title: WebhooksGetResponsesContentApplicationJsonSchemaDataItems
get-webhooks_Response_200:
type: object
properties:
meta:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaMeta
data:
type: array
items:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaDataItems
title: get-webhooks_Response_200
WebhooksGetResponsesContentApplicationJsonSchemaError:
type: object
properties:
statusCode:
type: integer
default: 0
name:
type: string
message:
type: string
title: WebhooksGetResponsesContentApplicationJsonSchemaError
Get-webhooksRequestUnauthorizedError:
type: object
properties:
error:
$ref: >-
#/components/schemas/WebhooksGetResponsesContentApplicationJsonSchemaError
title: Get-webhooksRequestUnauthorizedError
```
## SDK Code Examples
```python Success
import requests
url = "https://api-stg.transak.com/partners/api/v2/webhooks"
headers = {"access-token": "YOUR_ACCESS_TOKEN"}
response = requests.get(url, headers=headers)
print(response.json())
```
```javascript Success
const url = 'https://api-stg.transak.com/partners/api/v2/webhooks';
const options = {method: 'GET', headers: {'access-token': 'YOUR_ACCESS_TOKEN'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go Success
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-stg.transak.com/partners/api/v2/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("access-token", "YOUR_ACCESS_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby Success
require 'uri'
require 'net/http'
url = URI("https://api-stg.transak.com/partners/api/v2/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["access-token"] = 'YOUR_ACCESS_TOKEN'
response = http.request(request)
puts response.read_body
```
```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse response = Unirest.get("https://api-stg.transak.com/partners/api/v2/webhooks")
.header("access-token", "YOUR_ACCESS_TOKEN")
.asString();
```
```php Success
request('GET', 'https://api-stg.transak.com/partners/api/v2/webhooks', [
'headers' => [
'access-token' => 'YOUR_ACCESS_TOKEN',
],
]);
echo $response->getBody();
```
```csharp Success
using RestSharp;
var client = new RestClient("https://api-stg.transak.com/partners/api/v2/webhooks");
var request = new RestRequest(Method.GET);
request.AddHeader("access-token", "YOUR_ACCESS_TOKEN");
IRestResponse response = client.Execute(request);
```
```swift Success
import Foundation
let headers = ["access-token": "YOUR_ACCESS_TOKEN"]
let request = NSMutableURLRequest(url: NSURL(string: "https://api-stg.transak.com/partners/api/v2/webhooks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```