HSRCPAY Dökümantasyon
API v1

List routing plans

Lists routing plans for an account. Query pagination keys are accepted for forward compatibility; the handler may return a full list.

GET
/routing-plans/

Authorization

bearerAuth
AuthorizationBearer <token>

Use Authorization: Bearer <token>. The same header supports: (1) JWT access token from the configured auth provider; (2) secret API key whose value contains sk_ within the first 32 characters (e.g. sk_live_…, sk_test_…); (3) publishable key containing pk_. Sandbox keys typically include _test_ in the string; the server resolves repositories from that.

In: header

Query Parameters

account_id?Account ID
include_attempts?Include attempts
include_charges?Include charges
include_payment?Include payment
page?Page
Range0 < value
limit?Limit
Range0 < value

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.hsrcpay.com/v1/routing-plans/"
{
  "message": "success",
  "success": true,
  "data": [
    {
      "object": "routing_plan",
      "id": "string",
      "account_id": "string",
      "payment_id": "string",
      "request_id": "string",
      "trace_id": "string",
      "current_index": 0,
      "routing_origin": "MERCHANT_DIRECT",
      "candidates": null,
      "metadata": null,
      "created_at": null,
      "updated_at": null,
      "charges": [
        {
          "object": "charge",
          "id": "string",
          "payment_id": "string",
          "payment_method_id": "string",
          "customer_id": "string",
          "account_id": "string",
          "status": "CREATED",
          "amount": 0,
          "authorized_amount": 0,
          "captured_amount": 0,
          "refunded_amount": 0,
          "currency": "USD",
          "installments": 0,
          "security": {
            "property1": null,
            "property2": null
          },
          "transaction": {
            "property1": null,
            "property2": null
          },
          "exchanges": [
            null
          ],
          "details": {
            "property1": null,
            "property2": null
          },
          "performance": {
            "duration": 0,
            "property1": null,
            "property2": null
          },
          "metadata": {
            "property1": null,
            "property2": null
          },
          "routing_plan_id": "string",
          "routing_origin": "MERCHANT_DIRECT",
          "attempt_no": 0,
          "payment_provider_id": "string",
          "payment_provider_method_id": "string",
          "payment_provider_config_snapshot": {
            "property1": null,
            "property2": null
          },
          "created_at": null,
          "updated_at": null,
          "property1": null,
          "property2": null
        }
      ],
      "payment": {
        "object": "payment",
        "id": "string",
        "account_id": "string",
        "customer_id": "string",
        "amount": 0,
        "currency": "USD",
        "status": "CREATED",
        "metadata": {
          "property1": null,
          "property2": null
        },
        "created_at": null,
        "updated_at": null,
        "checkout_session_id": "string",
        "installments": 0,
        "routing_origin": "MERCHANT_DIRECT",
        "charges": [
          {
            "object": "charge",
            "id": "string",
            "payment_id": "string",
            "payment_method_id": "string",
            "customer_id": "string",
            "account_id": "string",
            "status": "CREATED",
            "amount": 0,
            "authorized_amount": 0,
            "captured_amount": 0,
            "refunded_amount": 0,
            "currency": "USD",
            "installments": 0,
            "security": {
              "property1": null,
              "property2": null
            },
            "transaction": {
              "property1": null,
              "property2": null
            },
            "exchanges": [
              null
            ],
            "details": {
              "property1": null,
              "property2": null
            },
            "performance": {
              "duration": 0,
              "property1": null,
              "property2": null
            },
            "metadata": {
              "property1": null,
              "property2": null
            },
            "routing_plan_id": "string",
            "routing_origin": "MERCHANT_DIRECT",
            "attempt_no": 0,
            "payment_provider_id": "string",
            "payment_provider_method_id": "string",
            "payment_provider_config_snapshot": {
              "property1": null,
              "property2": null
            },
            "created_at": null,
            "updated_at": null,
            "property1": null,
            "property2": null
          }
        ],
        "customer": {
          "object": "customer",
          "id": "string",
          "account_id": "string",
          "name": "string",
          "email": "string",
          "phone": "string",
          "country": "string",
          "alternate_emails": [
            "user@example.com"
          ],
          "is_guest": true,
          "deleted": true,
          "metadata": {
            "property1": null,
            "property2": null
          },
          "created_at": null,
          "updated_at": null,
          "addresses": [
            {
              "object": "customer_address",
              "id": "string",
              "customer_id": "string",
              "type": "BILLING",
              "is_default": true,
              "label": "string",
              "country": "string",
              "city": "string",
              "state": "string",
              "line1": "string",
              "line2": "string",
              "zip": "string",
              "created_at": null,
              "updated_at": null,
              "property1": null,
              "property2": null
            }
          ],
          "payment_methods": [
            {
              "id": "string",
              "property1": null,
              "property2": null
            }
          ],
          "property1": null,
          "property2": null
        },
        "routing_plans": [
          {
            "object": "routing_plan",
            "id": "string",
            "account_id": "string",
            "payment_id": "string",
            "request_id": "string",
            "trace_id": "string",
            "current_index": 0,
            "routing_origin": "MERCHANT_DIRECT",
            "candidates": null,
            "metadata": null,
            "created_at": null,
            "updated_at": null,
            "property1": null,
            "property2": null
          }
        ],
        "events": [
          {
            "object": "event",
            "id": "string",
            "event": "string",
            "account_id": "string",
            "workspace_id": "string",
            "data": null,
            "version": 0,
            "request_id": "string",
            "trace_id": "string",
            "region": "string",
            "subject_type": "string",
            "subject_id": "string",
            "payment_id": "string",
            "charge_id": "string",
            "refund_id": "string",
            "checkout_session_id": "string",
            "actor_type": "string",
            "actor_id": "string",
            "api_key_id": "string",
            "service": "string",
            "routing_plan_id": "string",
            "attempt_id": "string",
            "created_at": null,
            "property1": null,
            "property2": null
          }
        ],
        "property1": null,
        "property2": null
      },
      "property1": null,
      "property2": null
    }
  ],
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}