Webhook: Push Settlement Information

This interface is used to push settlement summary and transaction details to a third-party system via a webhook. The system will send a POST request with JSON data when a batch is settled.

Request Information

  • Method: POST

  • Content-Type: application/json

HTTP Header

Name
Value

Content-Type

application/json

sign-version

version of sign

Request Parameters

Root Object

Variable Name
Type
Required
Description

sn

String

Yes

The terminal serial number (e.g., WP20031Q21000000).

packageName

String

Yes

The package name of the payment application.

summary

Object

Yes

Settlement summary information (see Summary Object below).

settlementList

Array

Yes

List of settlement transactions (see Settlement Item below).

Summary Object (summary)

Variable Name

Type

Required

Description

mid

String

Yes

Merchant ID.

tid

String

Yes

Terminal ID.

batchId

String

Yes

The batch number associated with this settlement.

currencyCode

String

Yes

ISO 4217 Currency Code (e.g., 840 for USD).

debitTotalCount

Long

Yes

Total count of debit (sale/positive) transactions.

debitTotalAmount

Long

Yes

Total amount of debit transactions (in lowest currency unit, e.g., cents).

creditTotalCount

Long

Yes

Total count of credit (refund/negative) transactions.

creditTotalAmount

Long

Yes

Total amount of credit transactions (in lowest currency unit).

settleStatus

String

Yes

Status of the settlement (e.g., CLOSED).

Settlement Item Object (settlementList)

Variable Name

Type

Required

Description

amount

Long

Yes

Transaction amount

transId

String

Yes

Transaction ID / Trace Number.

batchId

String

Yes

The batch number for this specific transaction.

tranTime

String

Yes

Transaction time. Format: yyyy-MM-dd HH:mm:ss.

transType

String

No

Transaction type (e.g., SALE, REFUND).

cardType

String

No

Card brand/type (e.g., VISA, MASTERCARD).


Request Example

JSON

Response

The receiving server should return an HTTP status code to acknowledge receipt.

  • Success: 200 OK

  • Failure: 4xx or 5xx (The sender may retry based on internal retry policies).

Last updated