POST
/
proxy
Proxy
curl --request POST \
  --url https://sandbox.hyperswitch.io/proxy \
  --header 'Content-Type: application/json' \
  --header 'X-Profile-Id: <x-profile-id>' \
  --header 'api-key: <api-key>' \
  --data '{
  "destination_url": "https://api.example.com/payments",
  "headers": {
    "Authorization": "Bearer sk_test_example",
    "Content-Type": "application/json"
  },
  "method": "POST",
  "request_body": {
    "amount": 6540,
    "capture": true,
    "currency": "USD",
    "reference": "ORD-5023-4E89",
    "source": {
      "billing_address": {
        "address_line1": "123 High St.",
        "city": "London",
        "country": "GB"
      },
      "expiry_month": "{{$card_exp_month}}",
      "expiry_year": "{{$card_exp_year}}",
      "number": "{{$card_number}}",
      "type": "card"
    }
  },
  "token": "pm_0196ea5a42a67583863d5b1253d62931",
  "token_type": "PaymentMethodId"
}'
{
  "response": "<any>",
  "status_code": 1,
  "response_headers": {}
}

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

Body

application/json

Response

200
application/json

Proxy request

The response is of type object.