ocpp/v2_1/message/notify_settlement

OCPP 2.1 NotifySettlement action.

Request/Response payload types with their OCPP-J codecs (request_to_json/request_decoder, response_to_json/ response_decoder). Transport-agnostic; the action-string mapping lives in ocpp/v2_1/dispatch.

Types

FieldTypeReqDescription
custom_dataCustomData
psp_refStringThe payment reference received from the payment terminal and is used as the value for idToken. (max 255 chars)
receipt_idString(max 50 chars)
receipt_urlStringThe receipt URL, to be used if the receipt is generated by the payment terminal or the CS. (max 2000 chars)
settlement_amountFloatThe amount that was settled, or attempted to be settled (in case of failure).
settlement_timeDateTimeThe time when the settlement was done.
statusPaymentStatus
status_infoStringAdditional information from payment terminal/payment process. (max 500 chars)
transaction_idStringThe transactionId that the settlement belongs to. Can be empty if the payment transaction is canceled prior to the start of the OCPP transaction. (max 36 chars)
vat_companyAddress
vat_numberStringVAT number for a company receipt. (max 20 chars)

Schema: NotifySettlementRequest

pub type Request {
  Request(
    custom_data: option.Option(custom_data.CustomData),
    psp_ref: String,
    receipt_id: option.Option(String),
    receipt_url: option.Option(String),
    settlement_amount: Float,
    settlement_time: timestamp.Timestamp,
    status: payment_status.PaymentStatus,
    status_info: option.Option(String),
    transaction_id: option.Option(String),
    vat_company: option.Option(address.Address),
    vat_number: option.Option(String),
  )
}

Constructors

FieldTypeReqDescription
custom_dataCustomData
receipt_idStringThe receipt id if the receipt is generated by CSMS. (max 50 chars)
receipt_urlStringThe receipt URL if receipt generated by CSMS. The Charging Station can QR encode it and show it to the EV Driver. (max 2000 chars)

Schema: NotifySettlementResponse

pub type Response {
  Response(
    custom_data: option.Option(custom_data.CustomData),
    receipt_id: option.Option(String),
    receipt_url: option.Option(String),
  )
}

Constructors

Values

pub fn new_request(
  psp_ref psp_ref: String,
  settlement_amount settlement_amount: Float,
  settlement_time settlement_time: timestamp.Timestamp,
  status status: payment_status.PaymentStatus,
) -> Request

Construct a Request from its required fields, with every optional field set to None.

pub fn new_response() -> Response

Construct a Response from its required fields, with every optional field set to None.

pub fn request_decoder() -> decode.Decoder(Request)

Decode a Request from its OCPP-J JSON object, enforcing schema constraints.

pub fn request_to_json(value: Request) -> json.Json

Encode a Request to its OCPP-J JSON object.

pub fn response_decoder() -> decode.Decoder(Response)

Decode a Response from its OCPP-J JSON object, enforcing schema constraints.

pub fn response_to_json(value: Response) -> json.Json

Encode a Response to its OCPP-J JSON object.

Search Document