XRPL Webhook API
API Endpoint
https://webhook.xrpayments.coAPI requires authorization. All requests must have valid
x-api-key
and x-api-secret
.
Subscriptions ¶
Return all Subscriptions belong to app ¶
Headers
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"subscriptions": [
{
"id": 34070368,
"created_at": "2019-02-15T22:46:00",
"address": "rqAiBkWakRA9Jr5TCahtKrPS23KBYUZhj"
}
],
"app_id": 314014556
}
Return all Subscriptions belong to appGET/api/v1/subscriptions
Returns a list of the current Activity type subscriptions.
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Body
{
"address": "rqAiBkWakRA9Jr5TCahtKrPS23KBYUZhj"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {}
}
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"success": true,
"subscription_id": 34070368
}
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Body
{
"address": "invalid_address"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {}
}
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"errors": {
"address": [
"invalid ripple address"
]
}
}
Subscribes address to appPOST/api/v1/subscriptions
Subscribes the provided app all events for the provided address for all transaction types. After activation, all transactions for the requesting address will be sent to the provided webhook id via POST request.
- address
string
(required)Valid XRP address
Delete subscription ¶
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"success": true
}
Delete subscriptionDELETE/api/v1/subscriptions/{subscription_id}
Deactivates subscription(s) for the provided subscription ID and application for all activities. After deactivation, all events for the requesting subscription_id will no longer be sent to the webhook URL.
The subscription ID can be accessed by making a call to GET /api/v1/subscriptions.
- subscription_id
number
(required)Subscriptions ID to deactivation
Webhooks ¶
Return all webhooks ¶
Headers
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"webhooks": [
{
"url": "https://myapp.com/webhook",
"id": 4192294,
"created_at": "2019-02-15T22:46:00",
"active": true
}
],
"app_id": 314014556
}
Return all webhooksGET/api/v1/webhooks
Returns all webhook URLs and their statuses for the authenticating app
The URL will be validated via CRC request before saving. In case the validation failed, returns comprehensive error message to the requester.
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Body
{
"url": "https://myapp.com/webhook"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {}
}
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"webhook_id": 4192294,
"success": true
}
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Body
{
"url": "https://invalid-url"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {}
}
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"errors": {
"url": [
"invalid host"
]
}
}
Registers webhook URLPOST/api/v1/webhooks
Registers a webhook URL for all event types.
The URL will be validated via CRC request before saving. In case the validation failed, returns comprehensive error message to the requester.
- url
string
(required)Encoded URL for the callback endpoint.
Delete webhook ¶
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
"success": true
}
Delete webhookDELETE/api/v1/webhooks/{webhook_id}
Removes the webhook from the provided application’s all subscription configuration.
The webhook ID can be accessed by making a call to GET /api/v1/webhooks.
- webhook_id
number
(required)Webhook ID to delete
Generated by aglio on 15 Feb 2019