Tutorial: Create a Merchant API Key and Make a First Capabilities Read
Backend developers starting a GridZen merchant integration must establish secure access before integrating specific identity or phone check products. This guide explains how to use the merchant console to create a named API key and verify it with a read-only request to the capabilities endpoint, ensuring your server environment is correctly configured.
Bài này hiện bằng tiếng Anh; bản dịch đang chờ cập nhật.
curl -I https://gridzen.ai/help/api/Prerequisites for API Entry
Before generating a key, you must sign in to a verified merchant account. The most critical security requirement is that you store your API key privately on your server. It must never be exposed in frontend code or committed to version control systems like Git. Accessing the key management interface is done through the merchant console at the /console/#/keys entry point. This environment allows you to manage the credentials that will eventually authorize your identity and verification workflows.
Creating and Securing Your Named Key
Inside the API Keys section, you will begin by choosing a unique name for your key. You must also decide between 'read' or 'read/write' access levels for this specific credential. Once the key is created, you are shown the full string only once; you must save it immediately to your secure server storage. If the key is lost, the console will not display it again. In such cases, the documented procedure is to revoke the lost key and replace it with a new one. The persistent list in the console only displays the name, a prefix, and the access level for identification.
Executing the First Capabilities Read
To confirm that your server can communicate with the API, perform a read-only request to /console/api/capabilities. This request requires an 'Authorization: Bearer' header followed by your GridZen key. A successful operation returns an HTTP 200 status and a payload containing your current merchant capabilities. It is important to note that a successful read does not signify production approval or automatically enable every live product. It is a connectivity and authorization check, not a grant of universal service access.
Inspecting the OpenAPI and Schema
Once connectivity is established, you should review the current merchant OpenAPI documentation. This source defines the target schema, required permissions, and specific fields for quotes and idempotency. When building your integration, pay close attention to how sandbox versus live environments are identified. If you encounter an uncertain task state, the guide instructs you to keep the ID and payload unchanged during retries to allow for original-result lookup without creating duplicate records.
Optional Project Measurement Setup
For developers who require project-level tracking, the API supports an optional measurement registration. Using a write-capable key, you can send a POST request with the body {"consent":true} to /console/api/measurement/projects. Saving the resulting project_id allows you to include the X-GridZen-Project header on subsequent bank-check requests. This registration does not perform a payment or a check; it simply enables internal organization of tasks. Only bound original tasks with official evidence contribute to your usage metrics.
Handling Common API Errors
During your first integration steps, you may encounter standard HTTP error codes. A 401 Unauthorized response indicates a need to verify your key and Bearer syntax. A 403 Forbidden error suggests a mismatch in access levels or eligibility for the specific endpoint. Finally, a 429 Too Many Requests response means you have exceeded the technical rate limit and must adjust your request frequency. These signals help ensure your backend is adhering to the documented merchant contract.
Inspect the documented workflow
https://gridzen.ai/help/api/ · Read the prerequisites, permissions, steps and completion checks. This article does not execute a verification or activate a service.
Sources and scope
https://gridzen.ai/help/api/ https://gridzen.ai/guides/current-capabilities/ Based on published operating instructions; no service execution or live availability was tested. Based on the checked source snapshot; proposed application rules are design advice, not proven production behavior. Written with AI assistance and reviewed independently.
Thử riêng ba kết quả sandbox Tạo tài khoản để tiếp tục tích hợp
Tải xuống không chứng minh đã chạy thành công. Ví dụ cục bộ và sandbox trực tuyến được thử riêng.