Linksfield Developer
OverviewCube APIsTopup APIs
Old version
OverviewCube APIsTopup APIs
Old version
  1. Notification
  • Mall Global Specification
  • Mall Business Flow
  • Mall API Signature Code Examples
  • APP Integration with Stripe SDK — Example Notes
  • Vshop
    • Card Login Verification
      POST
    • Get Available Data Plan Product List
      POST
    • Create User Order
      POST
    • Query Active and Pending Orders
      POST
    • Get Active Auto-Renewal
      POST
    • Cancel Auto-Renewal
      POST
    • Create User Order (Third-Party Payment)
      POST
  • Payment
    • Get Stripe Single Payment Authorization
      POST
    • Get Stripe Subscription Payment Authorization
      POST
    • Create Stripe Subscription / Auto-Renewal
      POST
    • Query Payment Result
      POST
    • Confirm Payment Result
      POST
  • Notification
    • Recharge Success Message Push
      POST
  • Bundle-groups
    • Add SIM Cards to a Specified Group
      POST
    • Remove SIM Cards from a Specified Group
      DELETE
    • Query SIM Card Numbers in a Specified Group
      GET
    • Query All Groups and Basic Data Plan Information
      GET
    • Retrieve Asynchronous Operation Result
      GET
  • Order
    • Query Order Details
      GET
  1. Notification

Recharge Success Message Push

Demo UAT
http://127.0.0.1
Demo UAT
http://127.0.0.1
POST
客户自定义的URL

Overview#

The Linksfield Cube API Outbound (Webhook) system uses RESTful API to send Notification APIs.
The notification content consists of events from the Linksfield system.
Customers can receive event notifications in the following way:
1.
With customer authorization, an FAE configures notification APIs for certain system events on behalf of the customer via BBC.

Header Structure#

ParameterRequiredTypeExample ValueDescriptionIncluded in Signature Calculation
x-lf-notification-versionRequiredString1.0Version identifier of the Notification APIYes
x-lf-algoRequiredStringHMAC-SHA1Algorithm identifier. Currently supports HMAC-SHA1. Can be extended in the future to md5, sha256, etc. Default is HMAC-SHA1.Yes
x-lf-signatureRequiredString{keyId}/{signature}Signature. Multiple business key pairs may exist. The keyId must be included.Yes
x-lf-timestampRequiredString1683524066000Send timestamp, in millisecondsYes

Algorithm#

The API outbound carries a Linksfield-defined algorithm identifier, intended to strengthen security between communicating parties and prevent message tampering or unauthorized sending.
Receiving Notifications requires a separate key.

HMAC-SHA1#

Steps to Compute the Signature#

1.
Load the notification key (in raw hex).
2.
Construct the message:
2.1 JSON String encode the POST body, with top-level keys sorted in lexicographic order (arrays are not sorted) => sorted_message
2.2 Prepend the header information: {x-lf-notification-version}:{x-lf-algo}:{x-lf-timestamp}
Example:
3.
Apply HMAC-SHA1 (key = key_hex, data = message).
4.
Base64-encode the digest.
5.
x-lf-signature = {keyId}/{digest}
Example:

Steps to Verify the Signature#

1.
Based on the {keyId} in x-lf-signature, load the notification key.
2.
Construct the message:
2.1 JSON String encode the POST body, with top-level keys sorted in lexicographic order (arrays are not sorted) => sorted_message
2.2 Prepend the header information: {x-lf-notification-version}:{x-lf-algo}:{x-lf-timestamp}
Example:
3.
Apply HMAC-SHA1 (key = key_hex, data = message).
Note: key_hex refers to the notification key value in the Developer module on the Cube page.
4.
Base64-encode the digest.
5.
Compare the computed digest with the digest received in x-lf-signature.
It is recommended that the client application discard any messages that fail signature verification.

Signature Code Examples#

Notification Signature Code Examples
How to Obtain the Notification Key

Retry Mechanism#

Automatic retry is triggered in the following situations. The system retries up to 3 times (4 attempts total), with escalating intervals of: 1, 5, and 10 minutes.
1.
Internal Linksfield timeout (wait timeout, etc.) or send service exception
2.
External response timeout (read timeout, connection timeout, etc.)
3.
HTTP status code >= 500 (2xx, 3xx, 4xx do not trigger a retry)

Request

Header Params

Body Params application/json

Example
{
    "notification_id": "NT-09887665434565",
    "org_id": "P001234",
    "event_type": "payment",
    "event_subtype": "payment_succeeded",
    "level": "normal",
    "trigger_mode": 0,
    "source": {
        "type": "bbc-event",
        "reference_id": "bbc001",
        "reference_name": "payment_succeeded"
    },
    "event": {
        "occurred_at": 1683178613876,
        "sim_id": "89852123456789012345",
        "id": "EV-9988776666666",
        "detail": {
            "order_id": "CU-7ZOIHX0RB16U20250828111429591",
            "purchase_order_id": "4567",
            "bundle_name": "CLJF_ZRR_20250317_001",
            "cycles": "1",
            "total_amount": 1000,
            "payment_method": "stripe",
            "payee": "linksfield",
            "currency": "USD",
            "partner_name": "Excepteur deserunt eu labore",
            "paid_at": 1683178613876,
            "order_status": "active",
            "payment_status": "paid",
            "dispute_status": "none",
            "risk_status": "normal",
            "transaction_type": "one-time",
            "payer_email": "linksfield@gmail.com"
        }
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'http://127.0.0.1客户自定义的URL' \
--header 'x-lf-md5;' \
--header 'x-lf-delivery;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "notification_id": "NT-09887665434565",
    "org_id": "P001234",
    "event_type": "payment",
    "event_subtype": "payment_succeeded",
    "level": "normal",
    "trigger_mode": 0,
    "source": {
        "type": "bbc-event",
        "reference_id": "bbc001",
        "reference_name": "payment_succeeded"
    },
    "event": {
        "occurred_at": 1683178613876,
        "sim_id": "89852123456789012345",
        "id": "EV-9988776666666",
        "detail": {
            "order_id": "CU-7ZOIHX0RB16U20250828111429591",
            "purchase_order_id": "4567",
            "bundle_name": "CLJF_ZRR_20250317_001",
            "cycles": "1",
            "total_amount": 1000,
            "payment_method": "stripe",
            "payee": "linksfield",
            "currency": "USD",
            "partner_name": "Excepteur deserunt eu labore",
            "paid_at": 1683178613876,
            "order_status": "active",
            "payment_status": "paid",
            "dispute_status": "none",
            "risk_status": "normal",
            "transaction_type": "one-time",
            "payer_email": "linksfield@gmail.com"
        }
    }
}'

Responses

🟢200成功
application/json
Bodyapplication/json

Example
{}
Modified at 2026-06-25 03:26:41
Previous
Confirm Payment Result
Next
Add SIM Cards to a Specified Group
Built with