POST
/
relay
Relay - Create
curl --request POST \
  --url https://sandbox.hyperswitch.io/relay \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency-Key: <x-idempotency-key>' \
  --header 'X-Profile-Id: <x-profile-id>' \
  --header 'api-key: <api-key>' \
  --data '{
  "connector_id": "mca_5apGeP94tMts6rg3U3kR",
  "connector_resource_id": "7256228702616471803954",
  "data": {
    "refund": {
      "amount": 6540,
      "currency": "USD"
    }
  },
  "type": "refund"
}'
{
  "id": "relay_mbabizu24mvu3mela5njyhpit4",
  "status": "created",
  "connector_resource_id": "pi_3MKEivSFNglxLpam0ZaL98q9",
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "connector_reference_id": "re_3QY4TnEOqOywnAIx1Mm1p7GQ",
  "connector_id": "mca_5apGeP94tMts6rg3U3kR",
  "profile_id": "pro_abcdefghijklmnopqrstuvwxyz",
  "type": "refund",
  "data": {
    "refund": {
      "amount": 6540,
      "currency": "AED",
      "reason": "Customer returned the product"
    }
  }
}

Authorizations

api-key
string
header
required

Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.

Headers

X-Profile-Id
string
required

Profile ID for authentication

X-Idempotency-Key
string
required

Idempotency Key for relay request

Body

application/json

Response

200
application/json

Relay request

The response is of type object.