Skip to main content
POST
/
payments
/
{payment_id}
/
update_metadata
Payments - Update Metadata
curl --request POST \
  --url https://sandbox.hyperswitch.io/payments/{payment_id}/update_metadata \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "metadata": {},
  "feature_metadata": {
    "redirect_response": {
      "param": "<string>",
      "json_payload": {}
    },
    "search_tags": [
      "<string>"
    ],
    "apple_pay_recurring_details": {
      "payment_description": "<string>",
      "regular_billing": {
        "label": "<string>",
        "recurring_payment_start_date": "2023-09-10T23:59:59Z",
        "recurring_payment_end_date": "2023-09-10T23:59:59Z",
        "recurring_payment_interval_unit": "year",
        "recurring_payment_interval_count": 123
      },
      "management_url": "https://hyperswitch.io",
      "billing_agreement": "<string>"
    },
    "pix_additional_details": {
      "immediate": {
        "time": 1,
        "pix_key": {
          "type": "cpf",
          "value": "<string>"
        }
      }
    },
    "boleto_additional_details": {
      "due_date": "2026-12-31",
      "document_kind": "commercial_invoice",
      "payment_type": "fixed_amount",
      "covenant_code": "3568253",
      "pix_key": {
        "type": "cpf",
        "value": "<string>"
      }
    }
  }
}
'
{
  "payment_id": "<string>",
  "status": "requires_confirmation",
  "metadata": {},
  "feature_metadata": {
    "redirect_response": {
      "param": "<string>",
      "json_payload": {}
    },
    "search_tags": [
      "<string>"
    ],
    "apple_pay_recurring_details": {
      "payment_description": "<string>",
      "regular_billing": {
        "label": "<string>",
        "recurring_payment_start_date": "2023-09-10T23:59:59Z",
        "recurring_payment_end_date": "2023-09-10T23:59:59Z",
        "recurring_payment_interval_unit": "year",
        "recurring_payment_interval_count": 123
      },
      "management_url": "https://hyperswitch.io",
      "billing_agreement": "<string>"
    },
    "pix_additional_details": {
      "immediate": {
        "time": 1,
        "pix_key": {
          "type": "cpf",
          "value": "<string>"
        }
      }
    },
    "boleto_additional_details": {
      "due_date": "2026-12-31",
      "document_kind": "commercial_invoice",
      "payment_type": "fixed_amount",
      "covenant_code": "3568253",
      "pix_key": {
        "type": "cpf",
        "value": "<string>"
      }
    }
  }
}

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.

Path Parameters

payment_id
string
required

The identifier for payment

Body

application/json
metadata
object
required

Metadata is useful for storing additional, unstructured information on an object.

feature_metadata
object

additional data that might be required by hyperswitch

Response

Metadata updated successfully

payment_id
string
required

The identifier for the payment

status
enum<string>
default:requires_confirmation
required

Represents the overall status of a payment intent. The status transitions through various states depending on the payment method, confirmation, capture method, and any subsequent actions (like customer authentication or manual capture).

Available options:
succeeded,
failed,
cancelled,
cancelled_post_capture,
processing,
requires_customer_action,
requires_merchant_action,
requires_payment_method,
requires_confirmation,
requires_capture,
partially_captured,
partially_captured_and_capturable,
partially_authorized_and_requires_capture,
partially_captured_and_processing,
conflicted,
expired
metadata
object

Metadata is useful for storing additional, unstructured information on an object.

feature_metadata
object

additional data that might be required by hyperswitch