Class DeliveryReceipt
Represents a delivery receipt (DLR) received via webhook from the Vonage SMS API. Delivery receipts confirm whether a message was successfully delivered to the recipient's handset.
public class DeliveryReceipt : ISignable
- Inheritance
-
DeliveryReceipt
- Implements
- Inherited Members
Properties
ApiKey
The API key that sent the SMS. This is useful when multiple accounts are sending webhooks to the same endpoint.
[JsonProperty("api-key")]
[JsonPropertyName("api-key")]
public string ApiKey { get; set; }
Property Value
ClientRef
If the client-ref is set when the SMS is sent, it will be included in the delivery receipt
[JsonProperty("client-ref")]
[JsonPropertyName("client-ref")]
public string ClientRef { get; set; }
Property Value
ErrorCode
The status of the request. Will be a non 0 value if there has been an error, or if the status is unknown. See the Delivery Receipt documentation for more details: https://developer.nexmo.com/messaging/sms/guides/delivery-receipts#dlr-error-codes
[JsonProperty("err-code")]
[JsonPropertyName("err-code")]
public string ErrorCode { get; set; }
Property Value
MessageId
The Vonage ID for this message.
[JsonProperty("messageId")]
[JsonPropertyName("messageId")]
public string MessageId { get; set; }
Property Value
MessageTimestamp
The time when Vonage started to push this Delivery Receipt to your webhook endpoint.
[JsonProperty("message-timestamp")]
[JsonPropertyName("message-timestamp")]
public string MessageTimestamp { get; set; }
Property Value
Msisdn
The number the message was sent to. Numbers are specified in E.164 format.
[JsonProperty("msisdn")]
[JsonPropertyName("msisdn")]
public string Msisdn { get; set; }
Property Value
NetworkCode
The Mobile Country Code Mobile Network Code (MCCMNC) of the carrier this phone number is registered with.
[JsonProperty("network-code")]
[JsonPropertyName("network-code")]
public string NetworkCode { get; set; }
Property Value
Nonce
A random string to be used when calculating the signature. Only included if you have signatures enabled
[JsonProperty("nonce")]
[JsonPropertyName("nonce")]
public string Nonce { get; set; }
Property Value
Price
The cost of the message
[JsonProperty("price")]
[JsonPropertyName("price")]
public string Price { get; set; }
Property Value
Scts
When the DLR was received from the carrier in the following format YYMMDDHHMM. For example, 2001011400 is at 2020-01-01 14:00
[JsonProperty("scts")]
[JsonPropertyName("scts")]
public string Scts { get; set; }
Property Value
Sig
The signature to enable verification of the source of this webhook. Please see the developer documentation for validating signatures for more information, or use one of our published SDKs. Only included if you have signatures enabled
[JsonProperty("sig")]
[JsonPropertyName("sig")]
public string Sig { get; set; }
Property Value
Status
A code that explains where the message is in the delivery process.
[JsonIgnore]
[JsonIgnore]
public DlrStatus Status { get; }
Property Value
StringStatus
A code that explains where the message is in the delivery process. Will be one of: delivered, expired, failed, rejected, accepted, buffered or unknown
[JsonProperty("status")]
[JsonPropertyName("status")]
public string StringStatus { get; set; }
Property Value
Timestamp
A timestamp in Unix (seconds since the epoch) format. Only included if you have signatures enabled
[JsonProperty("timestamp")]
[JsonPropertyName("timestamp")]
public int Timestamp { get; set; }
Property Value
To
The SenderID you set in from in your request.
[JsonProperty("to")]
[JsonPropertyName("to")]
public string To { get; set; }
Property Value
Methods
ValidateSignature(string, Method)
Validate the webhook signature against a secret.
public bool ValidateSignature(string signatureSecret, SmsSignatureGenerator.Method method)
Parameters
signatureSecretstringThe secret.
methodSmsSignatureGenerator.MethodThe encryption method.
Returns
- bool
Whether the signature has been validated or not.