LogoLogo
  • GENERAL
    • About Criptan
    • Get started
      • Introduction
      • 1. Activate your account
      • 2. Add funds to your balance
      • 3. Start interacting with the API
    • API
      • Introduction
      • Authentication
        • Auth Transactions and Earn
          • API Reference
        • Auth Business (Criptan Pay)
      • Real-Time API (WebSockets)
        • OHLCV
        • TICKERS
      • Webhooks
        • Transactions and Earn Webhooks
        • Business Webhooks
      • API reference
      • Changelog
    • Developer tools
      • Sandbox
      • Support
      • Feedback
    • Security
  • Transactions
    • General
      • Overview
      • Available exchange
      • Geographic availability
      • Use cases
        • Buy
          • UX example
        • Sell
          • UX example
        • Send crypto
          • UX example
        • Receive crypto
          • UX example
        • Recurring purchases
          • UX example
        • Check history
      • FAQ
    • API Reference
      • Trades
      • Withdrawals
      • Information
  • Earn
    • General
      • Overview
      • Geographic availability
      • Use cases
        • 3, 6, 12 months
          • Make a deposit
            • UX example
          • Set up auto-renew a deposit automatically
            • UX example
        • Flex
          • Make a deposit
            • UX example
          • Make a withdrawal
            • UX example
          • Cancel a withdrawal
            • UX example
          • Set up reinvest or not rewards
            • UX example
        • Flex and 3, 6, 12 months
          • Receiving Rewards
      • FAQ
    • API Reference
  • Business (Criptan Pay)
    • General
      • Business (Criptan Pay)
      • Onboarding
      • Payment Button
      • Charges
      • FAQ
    • API Reference
      • Charge
      • Generate charge receipt
      • Get payment
    • Types CPay definitions
      • BusinessAccount
      • BusinessCharge
Powered by GitBook
On this page
  • Events
  • Fields
  1. GENERAL
  2. API
  3. Webhooks

Business Webhooks

Events

Below is the list of all available webhook events:

Event
Description

charge:paid

Charge has been paid, but hasn't been confirmed yet

charge:confirmed

Charge has been confirmed and the associated payment is completed

charge:expired

Charge has expired without a payment being made

charge:delayed

The payment was made after the specified time

charge:underpaid

The payment was made for an inferior quantity of what was requested

charge:refund_pending

A refund has been requested, but it hasn't been resolved yet

charge:refunded

They payment has been sucessfully refunded

Fields

The payload of the webhook has the following structure:

{
  "event": string, // Name of the event
  "id": string // Charge identifier,
  "description": string // description of the payment
  "fiatCurrency": string // Fiat currency in which the payment was requested,
  "payment": {
    "amount": string // amount paid
    "currencyCode": string // code of the currency used (BTC, ETH...)
  }
  "createdAt": string // ISO string with the creation timestamp of the payment
  "updateAt": string // ISO string with the last update timestamp of the payment
  "metadata": object // Object with any metadata you passed during charge creation
}

For example, if you use Typescript you can verify a payload like this:

{
    event: "charge:confirmed",
    id: "768298de-f922-4663-8c3d-110098e65446",
    fiatCurrency: "EUR",
    fiatAmount: "20",
    payment: {
        currencyCode: "BTC",
        amount: "1.0"
    },
    createdAt: "2020-10-09T11:51:46Z",
    updateAt: "2020-10-09T11:55:21Z",
    metadata: {order_id: "001-003", tags: ["blackfriday", "vip"]}
}

PreviousTransactions and Earn WebhooksNextAPI reference

Last updated 1 year ago