MacellanMacellan SuperApp
Webhook

Harcama İadesi

Header Parameters

Signature*string

Webhook imzası

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

event?string
Default"payment_refund"
user?
waas_user_mapping?
data?
{
  "event": "payment_refund",
  "user": {
    "id": 1,
    "uuid": "a08a39ed-78c5-43dc-ae5c-161e50a634fd",
    "region": "TR",
    "locale": "tr",
    "first_name": "Macellan",
    "last_name": "Superapp",
    "full_name": "Macellan SuperApp",
    "email": "[email protected]",
    "phone": 905231113344,
    "details": {
      "subscribe_sms": false,
      "subscribe_email": false,
      "gender": "male",
      "id_number": 11111111111
    }
  },
  "waas_user_mapping": {
    "id": "a08a39ed-78c5-43dc-ae5c-161e50a634fd",
    "is_active": true,
    "created_at": "2019-08-24T14:15:22Z"
  },
  "data": {
    "id": 1,
    "type": "full_refund",
    "amount": 1,
    "point": 1,
    "final_total": 1,
    "payment": {
      "id": 1,
      "paid_price": 1,
      "point": 1,
      "final_total": 1,
      "discounted_total_amount": 1,
      "discount_point": 0,
      "refund_amount": 0,
      "reference_code": 123456,
      "order_id": 1405321795,
      "created_at": "2019-08-24T14:15:22Z",
      "gateway": "terminal",
      "branch": {
        "id": 1,
        "name": "İstanbul",
        "allow_point_usage": true,
        "phone": "+905231113344",
        "code": 12345,
        "description": "İstanbul şubesi"
      },
      "transaction_code": "V4SBUQG3PMNLCR0",
      "extra": [],
      "external_id": "string",
      "payment_time": "2019-08-24T14:15:22Z",
      "point_histories": [
        {
          "id": 1,
          "type": "usage",
          "amount": 1,
          "payment_id": 1,
          "created_at": "2019-08-24T14:15:22Z",
          "point": {
            "id": 1,
            "type": "campaign",
            "created_at": "2019-08-24T14:15:22Z",
            "campaign": {
              "id": 1,
              "name": "Yaz Kampanyası",
              "type": "deposit_gift",
              "code": "SUMMER2026"
            }
          }
        }
      ]
    },
    "created_at": "2019-08-24T14:15:22Z"
  }
}

Response Body

Example Requests

POST/paymentRefund