Page cover

Endpoints

Get user subscription details

post

Retrieves subscription details and transaction history for a user

Authorizations
Body
flash_idstringRequired

The Flash ID for the platform

emailstringOptional

User's email address (one of email, npub, or external_uuid required)

npubstringOptional

User's Nostr public key in npub format (one of email, npub, or external_uuid required)

external_uuidstringOptional

External UUID for the user (one of email, npub, or external_uuid required)

Responses
200

Successful response

application/json
post
POST /v1/get_user_subscription_details HTTP/1.1
Host: api.paywithflash.com
Authorization: Bearer JWT
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 71

"flash_id='text'&email='text'&npub='text'&external_uuid='text'"
{
  "membership": {
    "user_public_key": "text",
    "is_paid": true,
    "membership_start_date": "text",
    "next_payment_date": "text",
    "status": "text",
    "external_uuid": "text"
  },
  "transactions": [
    {
      "id": 1,
      "from_public_key": "text",
      "to_public_key": "text",
      "transaction_date": "text",
      "amount_in_sats": 1,
      "amount_in_currency": 1,
      "currency": "text",
      "bitcoin_price": 1,
      "flash_id": "text",
      "flash_name": "text",
      "flash_type": "text",
      "to_wallet_id": 1,
      "to_user_wallet_name": "text",
      "from_wallet_id": 1,
      "from_user_wallet_name": "text",
      "lnurl": "text"
    }
  ]
}

Cancel user subscription

post

Cancels a user's active subscription

Authorizations
Body
flash_idstringRequired

The Flash ID for the platform

emailstringOptional

User's email address (one of email, npub, or external_uuid required)

npubstringOptional

User's Nostr public key in npub format (one of email, npub, or external_uuid required)

external_uuidstringOptional

External UUID for the user (one of email, npub, or external_uuid required)

Responses
200

Successful cancellation

application/json
post
POST /v1/cancel_user_subscription HTTP/1.1
Host: api.paywithflash.com
Authorization: Bearer JWT
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 71

"flash_id='text'&email='text'&npub='text'&external_uuid='text'"
{
  "success": true
}

Last updated