NAV Navbar
Logo

Before Starting the Integration

These are the steps you need to know; to start building an integration with PayFort:

Step 1: Access your test account
You have to make sure that you have an access to a test account, its a full test environment allow you to simulate and process simulation transactions.

Step 2: make sure that you are using the correct integration type
Before building the integration, you need to make sure that you are selecting and using the proper parameters in the API calls as per the required integration type.

All the mandatory parameters mentioned under every section in the API document.

Step 3: Create the transaction request
Process the valid API request depends on transaction parameters included, you need to check the documentation and read every parameter possible values in order to reduce the errors in processing the transaction.

Step 4: Process the transaction response
After every payment, PayFort return the transaction response on the URL configured in your account under Technical Settings channel configuration.

You can find more details in the API documentation section Direct Transaction Feedback.

You need to validate the response parameters returned on this URL by calculating the signature for the response parameters using the SHA Response Phrase configured in your account under Security Settings.

Step 5: Test and Go Live You can use our testing cards to test your integration and simulate your test cases.

PayFort team may require to test your integration before going live to assure your application integration.

Bill Presentment

This service allows the Merchant to generate a unique bill numbers for Customer’s orders using the FORT API. The Merchant displays or sends the unique bill number to the Customer. The Customer presents the unique bill number to PayFort’s payment partners to pay for his order.

Bill Presentment URLs

Test Environment URL:

https://sbpaymentservices.PayFort.com/FortAPI/paymentApi

Production Environment URL:

https://paymentservices.PayFort.com/FortAPI/paymentApi

Parameters Submission Type

REST POST request using JSON.

Bill Presentment - Request

Include the following parameters in the Request you will send to PayFort:

ATTRIBUTES Description
service_command
Alpha
Mandatory
max: 20
Command.
Possible/ expected values: BILL_PRESENTMENT
Special characters: _
access_code
Alphanumeric
Mandatory
max: 20
Access code.
Example: zx0IPmPy5jp1vAz
merchant_identifier
Alphanumeric
Mandatory
max: 20
The ID of the Merchant.
Example: CycHZxVj
merchant_reference
Alphanumeric
Mandatory
max: 40
The Merchant’s unique order number.
Example: XYZ2939-yu898
Special characters: - _ .
amount
Numeric
Mandatory
max: 10
The transaction’s amount. *Each currency has predefined allowed decimal points that should be taken into consideration when sending the amount.
Example: 10000
currency
Alpha
Mandatory
max: 3
The currency of the transaction’s amount in ISO code 3.
Possible/ expected values: EGP
language
Alpha
Mandatory
max: 2
The checkout page and messages language.
Possible/ expected values: en / ar
request_expiry_date
Alphanumeric
Mandatory
max: 25
The date when the bill expires.*The merchant will hold the item till the expiry date. If the customer didn’t pay, the holding will be canceled.
Example: 2017-12-20T15:36:55+03:00
Special characters: - + :
payment_partner
Alpha
Mandatory
max: 5
A financial corporation that generate bills to the customer.
Possible/ expected values: FAWRY
signature
Alphanumeric
Mandatory
max: 200
A string hashed using the Secure Hash Algorithm. (Please refer to section Signature for more details).
Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a
customer_name
Alpha
Optional
Max: 40
The customer’s name.
Example: John Smith
Special characters: _ \ / - . ' Space
customer_email
Alphanumeric
Optional
Max: 254
The customer’s email.
Example: customer@domain.com
Special characters: _ - . @ +

Bill Presentment - Response

The following parameters will be returned in PayFort’s Response:

ATTRIBUTES Description
service_command
Alpha
max: 20
Command.
Possible/ expected values: BILL_PRESENTMENT
access_code
Alphanumeric
max: 20
Access code.
Possible/ expected Example: zx0IPmPy5jp1vAz
merchant_identifier
Alphanumeric
max: 20
The ID of the Merchant.
Example: CycHZxVj
merchant_reference
Alphanumeric
max: 40
The Merchant’s unique order number.
Example: XYZ2939-yu898
amount
Numeric
max: 10
The transaction’s amount.
Example: 10000
currency
Alpha
max: 3
The currency of the transaction’s amount in ISO code 3.
Possible/ expected values: EGP
language
Alpha
max: 2
The checkout page and messages language.
Possible/ expected values: en / ar
bill_number
Numeric
max: 14
A unique number generated by PayFort to pay bills.
Example: 14823285500005
request_expiry_date
Alphanumeric
max: 25
The date when the bill expires.*The merchant will hold the item till the expiry date. If the customer didn’t pay, the holding will be canceled.
Example: 2017-12-20T15:36:55+03:00
payment_partner
Alpha
max: 5
A financial corporation that generate bills to the customer.
Possible/ expected values: FAWRY
signature
Alphanumeric
max: 200
A string hashed using the Secure Hash Algorithm. (Please refer to section Signature for more details).
Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a
customer_name
Alpha
Max: 40
The customer’s name.
Example: John Smith
customer_email
Alphanumeric
Max: 254
The customer’s email.
Example: customer1@domain.com
response_message
Alphanumeric
max: 150
Message description of the response code. It returns according to the request language.
Possible/ expected values: Please refer to section messages
response_code
Numeric
Max: 5
Response Code carries the value of our system’s response. *The code consists of five digits, the first 2 digits represent the response status, and the last 3 digits represent the response messages.
Example: 46000
status
Numeric
Max: 2
A two-digit numeric value that indicates the status of the transaction.
Possible/ expected values: (Please refer to section statuses).