# DIDComm Payload vs. Identity Hub Payload
**DIDComm Payload**
```json=
{
"typ": "application/didcomm-plain+json",
"id": "1234567890",
"type": "https://schema.org/MusicPlaylist",
"from": "did:example:alice",
"to": ["did:example:bob"],
"created_time": 1516269022,
"expires_time": 1516385931,
"body": {
"@context": "https://schema.org",
"@type": "MusicPlaylist",
"name": "Classic Rock Playlist",
"numTracks": "1",
"track": [
{
"@type": "MusicRecording",
"byArtist": "Lynard Skynard",
"duration": "PT4M45S",
"inAlbum": "Second Helping",
"name": "Sweet Home Alabama",
"url": "sweet-home-alabama"
}
]
}
}
```
**Plaintext Hub Message**
Alice -> Bob
```json=
{
"descriptor": {
"objectId": "uuid-v4-1"
"schema": "https://schema.org/MusicPlaylist",
"method": "CollectionsWrite",
"encryption": "jwe",
"cid": CID(data)
},
"data": {
"protected": ...,
"recipients": ...,
"ciphertext": Base64Encode({
"@context": "https://schema.org",
"@type": "MusicPlaylist",
"name": "Classic Rock Playlist",
"numTracks": "1",
"track": [
{
"@type": "MusicRecording",
"byArtist": "Lynard Skynard",
"duration": "PT4M45S",
"inAlbum": "Second Helping",
"name": "Sweet Home Alabama",
"url": "sweet-home-alabama"
}
]
}),
"iv": ...,
"tag": ...
},
"attestation": {
"protected": {
"alg": "ES256K",
"kid": "did:example:123#key-1"
},
"payload": CID(descriptor),
"signature": Sign(protected + payload)
}
}
```
**Signed Hub Message**
Alice -> Bob
```json=
{
"descriptor": {
"objectId": "uuid-v4-1"
"schema": "https://schema.org/MusicPlaylist",
"method": "CollectionsWrite"
},
"data": {
"@context": "https://schema.org",
"@type": "MusicPlaylist",
"name": "Classic Rock Playlist",
"numTracks": "1",
"track": [
{
"@type": "MusicRecording",
"byArtist": "Lynard Skynard",
"duration": "PT4M45S",
"inAlbum": "Second Helping",
"name": "Sweet Home Alabama",
"url": "sweet-home-alabama"
}
]
}
```
```json=
// Daniel's DID Doc
{
"service": [
{
"type": "DIDCommMessaging",
"serviceEndpoint": "did:ion:mediator"
}
]
}
```
```json=
// Mediator's DID Doc
{
"service": [
{
"type": "DIDCommMessaging",
"serviceEndpoint": "https://mediators-r-us.com/didcomm"
}
]
}
```