# Payment refund

**POST** `/{phone_number_id}/messages`

Product: [WhatsApp](https://devdocs.pinnacle.in/docs/whatsapp.md)  
Version: [3.0](https://devdocs.pinnacle.in/docs/whatsapp/3-0.md)

This API is used by the business to initiate a refund for an order.

## Request

URL: `https://partnersv1.pinbot.ai/v3/{phone_number_id}/messages`

Authentication location: `header`

Authentication name: `apikey`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "speed": {
      "type": "string"
    },
    "amount": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "offset": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        }
      }
    },
    "reference_id": {
      "type": "string"
    },
    "payment_config_id": {
      "type": "string"
    }
  }
}
```

### Request example


```json
{
  "speed": "normal",
  "amount": {
    "value": "100",
    "offset": "100",
    "currency": "INR"
  },
  "reference_id": "{{reference_id}}",
  "payment_config_id": "{{payment_config_id}}"
}
```

## Response schema


```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "speed_processed": {
      "type": "string"
    }
  }
}
```

## Response examples


```json
{
  "200": {
    "id": "refund-id",
    "status": "pending",
    "speed_processed": "normal"
  }
}
```

## Status codes


```json
[
  {
    "code": 200,
    "description": "The request was successful."
  },
  {
    "code": 400,
    "description": "Bad request or invalid parameters."
  },
  {
    "code": 401,
    "description": "API key is missing or invalid."
  },
  {
    "code": 403,
    "description": "The request is not authorized for this resource."
  },
  {
    "code": 404,
    "description": "The requested resource was not found."
  },
  {
    "code": 500,
    "description": "The server encountered an error."
  }
]
```
