### Zibal Callback JSON Example Source: https://help.zibal.ir/ipg This is an example of the JSON payload received by the callback URL upon a transaction. ```json { "success": "1", "trackId": "15966442233311", "orderId": "1234", "status": null, "cardNumber": "62741****44", "hashedCardNumber": "432DA439OSD345" } ``` -------------------------------- ### Start Payment Source: https://help.zibal.ir/ipg Use this endpoint to display the payment page and initiate the payment process. ```APIDOC ## GET /start/{trackId} ### Description Initiates the payment process by displaying the payment page for a given tracking ID. ### Method GET ### Endpoint /start/{trackId} ### Parameters #### Path Parameters - **trackId** (string) - Required - The tracking ID obtained from the payment request. ``` -------------------------------- ### Callback Example Source: https://help.zibal.ir/ipg Illustrates how Zibal sends payment information to the callback URL via query string parameters upon status change. ```url https://yourcallbackurl.com/callback?trackId=9900&success=1&status=2&orderId=1 ``` -------------------------------- ### Payment Request Response Source: https://help.zibal.ir/ipg Example of a successful response after initiating a payment request, containing tracking and result information. ```json { "trackId": 15966442233311, "result": 100, "message": "success" } ``` -------------------------------- ### Send Payment Request Source: https://help.zibal.ir/ipg Use this endpoint to send order information and register it in the Zibal system. It returns a `trackId` for payment tracking. ```shell curl https://gateway.zibal.ir/v1/request \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "merchant": "zibal", "amount": 160000, "callbackUrl": "http://yourapiurl.com/callback.php", "description": "Hello World!", "orderId": "ZBL-7799", "mobile": "09123456789" }' ``` -------------------------------- ### Integrate Zibal Trust Script in Next.js Source: https://help.zibal.ir/ipg For Next.js projects, use the `next/script` component to load the Zibal trust script. This ensures proper script handling within the Next.js environment. ```javascript import Script from "next/script";
``` -------------------------------- ### Inquire Payment Source: https://help.zibal.ir/ipg Use this endpoint to inquire about a payment and retrieve payment session reports. ```APIDOC ## POST /v1/inquiry ### Description Retrieves payment session details and reports. ### Method POST ### Endpoint /v1/inquiry ``` -------------------------------- ### Verify Payment Source: https://help.zibal.ir/ipg Use this endpoint to confirm the success of a payment and end a payment session. ```APIDOC ## POST /v1/verify ### Description Confirms a successful payment and terminates the payment session. ### Method POST ### Endpoint /v1/verify ``` -------------------------------- ### Integrate Zibal Trust Badge Source: https://help.zibal.ir/ipg Include this script in your website's footer to display the Zibal trust badge and inform customers about secure payment processing. ```html ``` -------------------------------- ### Zibal Payment Transaction Request (JSON Body) Source: https://help.zibal.ir/ipg This is the JSON body structure for initiating a payment transaction request to the Zibal gateway. Ensure all fields are correctly populated. ```json { "merchant": "zibal", "amount": 160000, "callbackUrl": "http://yourapiurl.com/callback.php", "description": "Hello World!", "orderId": "ZBL-7799", "mobile": "09123456789" } ``` -------------------------------- ### Display Zibal Trust Logo (HTML Only) Source: https://help.zibal.ir/ipg Use this HTML code to display the Zibal trust logo without any JavaScript. This is useful for static implementations where script execution is not desired. ```html
``` -------------------------------- ### Zibal Trust Symbol (HTML) Source: https://help.zibal.ir/ipg Displays the Zibal trust symbol using plain HTML. This allows users to link to a verification page. ```APIDOC ## Display Zibal Trust Symbol (HTML) ### Description Displays the Zibal trust symbol using plain HTML. This allows users to link to a verification page. ### HTML Structure ```html
``` ### Parameters - **{SiteName}** (string) - Required - Your Zibal site name, to be included in the `href` attribute. ``` -------------------------------- ### Lazy Verify Payment Source: https://help.zibal.ir/ipg Used for the lazy payment method's verification process. ```APIDOC ## POST /verify (Lazy Method) ### Description Verifies a payment within the lazy payment method flow. ### Method POST ### Endpoint /verify ``` -------------------------------- ### Display Zibal Trust Logo with Custom Dimensions Source: https://help.zibal.ir/ipg Use this HTML snippet to display the Zibal trust logo. Adjust the 'height' property in the CSS to control the logo's size. ```html Document
``` -------------------------------- ### Lazy Request Payment Source: https://help.zibal.ir/ipg Used for the lazy payment method, involving different parameters and responses compared to the standard method. ```APIDOC ## POST /request/lazy ### Description Initiates a payment request using the lazy method. This method has different request and response parameters compared to the standard payment request. ### Method POST ### Endpoint /request/lazy ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.