Skip to main content
POST
/
api
/
v1
/
stripe
/
webhooks
/
classic
Create webhook
curl --request POST \
  --url https://demo.api.loopcrypto.xyz/api/v1/stripe/webhooks/classic \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "postUrl": "https://loopcrypto.xyz/webhook",
  "networkIds": [
    1,
    10
  ],
  "events": [
    "AgreementSignedUp"
  ]
}'
{
  "totalResults": 100,
  "webhooks": [
    {
      "webhookId": "1234567890abcdef",
      "networkId": 1,
      "event": "CreatePayins",
      "postUrl": "https://example.com/webhook",
      "dateCreated": 1716211200
    }
  ]
}

Authorizations

api-key
string
header
required
entity-id
string
header
required

Body

application/json
postUrl
string
required

The URL to send the webhook to.

Example:

"https://loopcrypto.xyz/webhook"

networkIds
integer[]

(Optional) The blockchain network IDs to subscribe to. If not provided, the webhook will be subscribed to all networks.

Note: Most users will leave this empty to receive events from all networks.

Valid network IDs:

  • 1 (Ethereum)
  • 10 (Optimism)
  • 56 (BNB)
  • 137 (Polygon)
  • 8453 (Base)
  • 42220 (Celo)
  • 42161 (Arbitrum)
  • 900 (Solana)
  • 11155111 (Sepolia) - Only available on the demo environment
Example:
[1, 10]
events
enum<string>[]

(Optional) The events to subscribe to. If not provided, all events will be subscribed to and be sent to the postUrl.

Valid webhook events:

  • AgreementSignedUp
  • AgreementCancelled
  • ScheduledAgreementCancel
  • TransferProcessed
  • TransferCreated
  • TransferFinalized
  • LatePayment
Example:
["AgreementSignedUp"]

Response

Ok

totalResults
number
required

The total count of webhooks matching the search criteria, regardless of page size or number.

Example:

100

webhooks
object[]
required

The list of webhooks.

I