XRPL Webhook API

API requires authorization. All requests must have valid x-api-key and x-api-secret.

Subscriptions

Return all Subscriptions belong to app

GET https://webhook.xrpayments.co/api/v1/subscriptions
Requests200
Headers
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Responses200
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 app
GET/api/v1/subscriptions

Returns a list of the current Activity type subscriptions.


POST https://webhook.xrpayments.co/api/v1/subscriptions
Requests200422
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": {}
}
Responses200
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": {}
}
Responses422
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 app
POST/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.

URI Parameters
HideShow
address
string (required) 

Valid XRP address


Delete subscription

DELETE https://webhook.xrpayments.co/api/v1/subscriptions/subscription_id
Requests204
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Responses204
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
  "success": true
}

Delete subscription
DELETE/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.

URI Parameters
HideShow
subscription_id
number (required) 

Subscriptions ID to deactivation


Webhooks

Return all webhooks

GET https://webhook.xrpayments.co/api/v1/webhooks
Requests200
Headers
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Responses200
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 webhooks
GET/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.


POST https://webhook.xrpayments.co/api/v1/webhooks
Requests200422
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": {}
}
Responses200
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": {}
}
Responses422
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
  "errors": {
    "url": [
      "invalid host"
    ]
  }
}

Registers webhook URL
POST/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.

URI Parameters
HideShow
url
string (required) 

Encoded URL for the callback endpoint.


Delete webhook

DELETE https://webhook.xrpayments.co/api/v1/webhooks/webhook_id
Requests204
Headers
Content-Type: application/json; charset=utf-8
x-api-key: 69682cbf-85bd-4507-8cbd-f4ee63fed1dc
x-api-secret: bWR3ajJSMWxwR3R5Nmd4cmtCaXNBQT09
Responses204
Headers
Content-Type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
Body
{
  "success": true
}

Delete webhook
DELETE/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.

URI Parameters
HideShow
webhook_id
number (required) 

Webhook ID to delete


Generated by aglio on 15 Feb 2019