---
title: Notifications
slug: mihai-tests/notifications
createdAt: 2025-05-02T10:16:35.476Z
---

{
  "id": "sPf3mHgDjv7oJYJP5EXx6",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.sandbox.tripleup.dev/reward_webhook_url",
    "servers": [
      {
        "url": "https://api.sandbox.tripleup.dev/reward_webhook_url",
        "description": "triple Sandbox"
      }
    ],
    "name": "Notifications",
    "description": "<p>Note: This is not a valid triple API endpoint.</p>\n<p>If a Publisher or Portfolio Manager subscribes to receive notifications\nwe will send reward status messages to the registered endpoint.\nThis describes what our outbound webhook call will provide to the triple partner.</p>\n<p>The payload is contained as a string within the <code>Message</code> key sent by AWS SNS.</p>\n<p>The <code>transaction_amount</code> and <code>reward_amount</code> fields are passed as\nstrings but always contain decimal numerics.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "example": "{\"publisher_external_id\":\"pub-1231231\",\"card_program_external_id\":\"card-program-1234-5678\",\"card_account_external_id\":\"card-account-1234-5678\",\"transaction_external_id\":\"tx-12314\",\"offer_id\":\"34\",\"reward_id\":\"reward-1231231\",\"merchant_name\":\"Acme Tools\",\"reward_status\":\"PENDING_MERCHANT_APPROVAL\",\"reward_amount\":\"0.12\",\"reward_currency_code\":\"USD\",\"transaction_timestamp\":\"2022-07-30T00:43:00Z\",\"transaction_amount\":\"12.34\",\"transaction_currency_code\":\"USD\"}",
          "description": "The Transaction webhook payload is contained within a Notification type SNS message. The documentation on this particular format is available in AWS docs at https://docs.aws.amazon.com/sns/latest/dg/sns-message-and-json-formats.html#http-notification-json",
          "customType": "RewardWebhook",
          "schema": [
            {
              "name": "publisher_external_id",
              "kind": "optional",
              "type": "string",
              "description": "The external identifier for the publisher",
              "example": ""
            },
            {
              "name": "card_program_external_id",
              "kind": "optional",
              "type": "string",
              "description": "The external identifier for the card program",
              "example": ""
            },
            {
              "name": "card_account_external_id",
              "kind": "optional",
              "type": "string",
              "description": "The external identifier for the card account",
              "example": ""
            },
            {
              "name": "transaction_external_id",
              "kind": "optional",
              "type": "string",
              "description": "The matching transaction which caused the reward to be triggered",
              "example": ""
            },
            {
              "name": "offer_id",
              "kind": "optional",
              "type": "string",
              "description": "The identifier for the offer",
              "example": ""
            },
            {
              "name": "reward_id",
              "kind": "optional",
              "type": "string",
              "description": "The identifier for the reward",
              "example": ""
            },
            {
              "name": "merchant_name",
              "kind": "optional",
              "type": "string",
              "description": "The full name of the merchant offering the reward",
              "example": ""
            },
            {
              "name": "reward_status",
              "kind": "required",
              "type": "string",
              "description": "The status of the reward which currently is one of PENDING_MERCHANT_APPROVAL and DENIED_BY_MERCHANT with more statuses in the pipeline.\n",
              "example": ""
            },
            {
              "name": "reward_amount",
              "kind": "optional",
              "type": "string",
              "description": "The amount of the reward earned",
              "example": ""
            },
            {
              "name": "reward_currency_code",
              "kind": "optional",
              "type": "string",
              "description": "The currency code of the reward",
              "example": ""
            },
            {
              "name": "transaction_timestamp",
              "kind": "required",
              "type": "string",
              "description": "The timestamp of the initial transaction",
              "example": ""
            },
            {
              "name": "transaction_amount",
              "kind": "required",
              "type": "string",
              "description": "The amount of initial transaction",
              "example": ""
            },
            {
              "name": "transaction_currency_code",
              "kind": "optional",
              "type": "string",
              "description": "The currency code of the initial transaction",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/RewardWebhook",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Your server returns this code if it accepts the call.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.sandbox.tripleup.dev/reward_webhook_url \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"reward_status\": \"\",\n     \"transaction_timestamp\": \"\",\n     \"transaction_amount\": \"\"\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"reward_status\": \"\",\n   \"transaction_timestamp\": \"\",\n   \"transaction_amount\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.sandbox.tripleup.dev/reward_webhook_url\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.sandbox.tripleup.dev/reward_webhook_url\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"reward_status\": \"\",\n   \"transaction_timestamp\": \"\",\n   \"transaction_amount\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.sandbox.tripleup.dev/reward_webhook_url\"\n\npayload = json.dumps({\n   \"reward_status\": \"\",\n   \"transaction_timestamp\": \"\",\n   \"transaction_amount\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Your server returns this code if it accepts the call.\n"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "BoAsamdpL6uDUyJqzwBkF",
      "type": "paragraph",
      "children": [
        {
          "text": "Note: This is not a valid triple API endpoint."
        }
      ]
    },
    {
      "id": "FQmyiXWrHc4mLLb7ec8gV",
      "type": "paragraph",
      "children": [
        {
          "text": "If a Publisher or Portfolio Manager subscribes to receive notifications\nwe will send reward status messages to the registered endpoint.\nThis describes what our outbound webhook call will provide to the triple partner."
        }
      ]
    },
    {
      "id": "VaEv9d-CTNZFWl7RmLKkf",
      "type": "paragraph",
      "children": [
        {
          "text": "The payload is contained as a string within the "
        },
        {
          "text": "Message",
          "highlight": true
        },
        {
          "text": " key sent by AWS SNS."
        }
      ]
    },
    {
      "id": "DvxWMqeUuseUBQJg_NeRJ",
      "type": "paragraph",
      "children": [
        {
          "text": "The "
        },
        {
          "text": "transaction_amount",
          "highlight": true
        },
        {
          "text": " and "
        },
        {
          "text": "reward_amount",
          "highlight": true
        },
        {
          "text": " fields are passed as\nstrings but always contain decimal numerics."
        }
      ]
    }
  ]
}