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
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
psp_ref | String | ✓ | The payment reference received from the payment terminal and is used as the value for idToken. (max 255 chars) |
receipt_id | String | — | (max 50 chars) |
receipt_url | String | — | The receipt URL, to be used if the receipt is generated by the payment terminal or the CS. (max 2000 chars) |
settlement_amount | Float | ✓ | The amount that was settled, or attempted to be settled (in case of failure). |
settlement_time | DateTime | ✓ | The time when the settlement was done. |
status | PaymentStatus | ✓ | |
status_info | String | — | Additional information from payment terminal/payment process. (max 500 chars) |
transaction_id | String | — | The 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_company | Address | — | |
vat_number | String | — | VAT 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
-
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), )
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
receipt_id | String | — | The receipt id if the receipt is generated by CSMS. (max 50 chars) |
receipt_url | String | — | The 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
-
Response( custom_data: option.Option(custom_data.CustomData), receipt_id: option.Option(String), receipt_url: option.Option(String), )
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 response_decoder() -> decode.Decoder(Response)
Decode a Response from its OCPP-J JSON object, enforcing schema constraints.