Cryptopay API
  • Welcome
  • Guides
    • Introduction
    • Environments
    • Creating a Test Account
    • API Credentials
    • API Basics
      • Responses
      • Date formats
      • Authentication
        • How it works
        • Signature
        • Creating a signature. Code samples
      • Callbacks
    • API Client Libraries
    • API Reference
    • Cryptocurrency Payments
    • Currencies
      • Supported Currencies
      • Currency Icons
    • Confirmations
    • Tools for accepting payments
    • Prebuilt integrations
      • E-commerce payment plugins
      • Payment and software providers
    • Channels
      • Channel payment
      • Payment statuses
      • Channel payment sequence
      • Create a Channel
      • Visual representation at Cashier
      • Channel hosted page
      • Channel payment callbacks
    • Invoices
      • Invoice statuses
      • Invoice payment sequence
      • How to handle unresolved invoices
        • Underpaid
        • Overpaid
        • Paid late
        • Illicit resource
        • Invoice refunds sequence
      • Create an invoice
      • Visual presentation at Cashier
      • Invoice hosted page
      • Online checkout
        • How-to
      • Payment links
      • Invoice callbacks
    • Payouts
      • Payout statuses
      • Payout sequence
      • Payout fees consideration
        • Network fees
      • Create a Coin Withdrawal
        • Possible errors
        • Withdrawals from fiat accounts
        • Withdrawals from cryptocurrency accounts
        • high_risk_address error message
      • Visual representation at Cashier
      • Minimum transaction amount
      • Coin Withdrawal callbacks
      • Travel Rule Compliance
    • Email Billing
      • Create an email billing
      • Email billing callbacks
    • Testing
      • Channels
      • Invoices
      • Payouts
    • Risks
    • Customers
    • Transactions types and Statuses
Powered by GitBook
On this page
  1. Guides
  2. Email Billing

Email billing callbacks

PreviousCreate an email billingNextTesting

Last updated 1 year ago

Handling callbacks correctly is crucial to ensure your integration’s business logic works as expected. It is highly recommended to validate payment statuses and callbacks before acting on it inside your system.

Refer to to get more information on what callbacks are and how to validate them before acting on it inside your system.

Type
Event
Description

Subscription

paid

The invoice, linked to the subscription, is successfully paid in full before the subscription's expiration date.

Subscription

cancelled

The subscription is not paid before the expiration date or is manually cancelled using API.

{
  "data": {
    "id": "4e9820e8-2805-47cc-a7d9-6e53bb17b59b",
    "name": "User-friendly high-level policy",
    "amount": "100.43",
    "period": "month",
    "status": "active",
    "currency": "USD",
    "custom_id": "fb241e79-b9d4-4b9b-a93f-38c43d4faf06",
    "created_at": "2023-06-16T13:45:36+00:00",
    "payer_name": "John Doe",
    "payer_email": "johndoe@email.me",
    "cancelled_at": null,
    "product_name": "Virtual systematic hub",
    "period_quantity": 1,
    "current_period_paid": true,
    "product_description": "Use the primary RAM card, then you can synthesize the multi-byte bus!",
    "success_redirect_url": "https://successRedirectUrl.me/",
    "current_period_ends_at": "2023-07-20T23:16:55+00:00",
    "unsuccess_redirect_url": "https://unsuccessRedirectUrl.me/",
    "current_period_starts_at": "2023-06-20T23:16:55+00:00"
  },
  "type": "Subscription",
  "event": "paid"
}
{
  "data": {
    "id": "cd4489a2-471e-41ad-ae5e-80b60f0756ad",
    "name": "Programmable contextually-based hub",
    "amount": "1000.0",
    "period": "month",
    "status": "cancelled",
    "currency": "CNY",
    "custom_id": "e0da1c36-f564-4ad1-a173-7bda750ba7d4",
    "created_at": "2023-06-20T13:37:04+00:00",
    "payer_name": "John Doe",
    "payer_email": "johndoe@email.me",
    "cancelled_at": "2023-06-30T00:15:00+00:00",
    "product_name": "Down-sized scalable workforce",
    "period_quantity": 1,
    "current_period_paid": false,
    "product_description": "Try to navigate the EXE monitor, maybe it will parse the neural port!",
    "success_redirect_url": "https://successRedirectUrl.me/",
    "current_period_ends_at": "2023-06-30T00:00:00+00:00",
    "unsuccess_redirect_url": "https://unsuccessRedirectUrl.me/",
    "current_period_starts_at": "2023-05-31T00:00:00+00:00"
  },
  "type": "Subscription",
  "event": "cancelled"
}
this section