Skip to content

Event Overview - Gift order closed

Target Audience: Users, Developers, Stakeholders

Introduction

This document defines the event gift_order_closed.

Description

This event is triggered when a gift v2 order is completed.

Listeners

Listeners available to the event.

Subscription system integration (SSI)

This event is supported by SSI.

Subscription system export

This event is generally supported in exports to subscription systems. Check with support for details.

Payload emitted

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  "event_name": "new_gift_subscription",
  "timestamp": "2021-03-26T14:33:13+00:00",
  "giver": {
    "account_id": "605df0a409c04c87657ef11b",
    "email": "user@email.com",
    "customer_number": "123456"
  },
  "receiver": {
    "email": "user@email.com",
    "delivery_address": {
      "first_name": "Kalle",
      "last_name": "Anka",
      "street": "The Streets",
      "street_number": "12",
      "staircase": "A",
      "apartment_number": "13",
      "zip_code": "83242",
      "city": "Stockholm",
      "country_code": "SE",
      "mobile_number": ""
    }
  },
  "order": {
    "id": "605df0a909c04c87657ef12c",
    "order_reference": "ORGANISATION-1",
    "created": "2021-03-26T14:33:13+00:00",
    "amount": "210.0",
    "payment_method": "invoice",
    "delivery_address": {
      "first_name": "Kalle",
      "last_name": "Anka",
      "street": "The Streets",
      "street_number": "12",
      "staircase": "A",
      "apartment_number": "13",
      "zip_code": "83242",
      "city": "Stockholm",
      "country_code": "SE",
      "mobile_number": null
    }
  },
  "payment": null,
  "gift_subscription": {
    "created": "2021-03-26T14:33:13+00:00",
    "start_date": "2021-03-26T14:33:13+00:00",
    "payway_product_code": "campaign_code",
    "period": "month",
    "period_length": 1,
    "external_package_id": "package_integration_code",
    "external_campaign_id": "campaign_integration_code",
    "campaign": true,
    "title_code": "TITLE_CODE",
    "transition_to_package": false
  }
}

Webhook

This event can be listened to using webhooks. To register your webhook please contact support.

Payload emitted

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  "event": "gift_order_closed",
  "timestamp": "2021-03-26T14:28:18.790Z",
  "payload": {
    "account": {
      "id": "605def7c09c04c85c671b3ef",
      "organisation_id": "organisation",
      "first_name": "",
      "last_name": "",
      "contact_email": "user@email.com",
      "mobile_number": null,
      "alias": "",
      "customer_number": "",
      "birth_date": "",
      "ssn": "",
      "status": "active",
      "loyalty_card_number": "",
      "account_origin": "",
      "verified": false,
      "created": "2021-03-26T15:28:11+01:00",
      "updated": "2021-03-26T15:28:12+01:00",
      "confirmation_code": "",
      "contact_email_for_update": "",
      "contact_email_update_code": "",
      "address": {
        "id": "605def7c09c04c85c671b3f0",
        "first_name": "Kalle",
        "last_name": "Anka",
        "street": "The Streets",
        "street_number": "12",
        "staircase": "A",
        "floor": "3",
        "apartment_number": "13",
        "zip_code": "83242",
        "city": "Stockholm",
        "mobile_number": null,
        "phone_number": "50460531",
        "email": "user@email.com",
        "country_code": "SE"
      },
      "gender": ""
    },
    "order": {},
    "payment": {},
    "receipt": {},
    "share": {},
    "user_product": {},
    "new_user_product": {},
    "gift": {
      "gift_code": "7b85076d-5153-4e35-9800-21a1bec9f9e6",
      "receiver_first_name": "john",
      "receiver_last_name": "receiver",
      "receiver_contact_email": "john.receiver@adeprimo.se",
      "gift_url": "redeem_gift_url"
    },
    "product": {
      "product_code": "campaign_code",
      "name": "product_name",
      "valid_from": "2020-03-26T15:28:14.832+01:00",
      "valid_to": "2022-03-26T15:28:14.833+01:00"
    },
    "payment_retry": {},
    "event_data": {},
    "payment_about_to_expire": {}
  }
}

Legacy e-mail

This event is supported by the transactional e-mailing system built into Payway.

Third-party e-mail

This event is supported by third party e-mailing systems such as Rule.