NAV Navbar
Logo

Before Starting the Integration section in the API:

Step 1: Access your test account
You have to make sure that you get access to a test account, it’s a full test environment allow you to simulate and process simulation transactions. You can contact support@payfort.com to get your test account.

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 in every section in the API documentation.

Step 3: Create the transaction request
Process a 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 each payment processed, PayFort returns the transaction’s 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 requires to test your integration before going live to verify the integration and make sure it’s implemented properly.

Verify Service Command

Verify API provides several methods that you can use to determine if a particular card account is valid and in good standing. The ability to pre-validate a credit card (Visa, MasterCard and Amex) increases the probability of a successful, seamless transaction flow and more valid card registration.

Before Starting

Before start integrating this service you need to know the below:
• This service command is applicable on two channels only; where you have to configure the channel you want to add this service to it from the FORT back-office:
    1. Merchant page.
    2. Trusted.
• This service command is only applicable on “MOTO” E-commerce indicator.
• You need to add the amount to be Authorized/ Captured from the customer for the verification.
• This Authorized/ Captured amount will be Voided/ Refunded after checking the card validity.
• The verification transactions will be recorded under one report “Card Verification Report” in the back-office.

Verify Service Command on Trusted 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.

Verify Service Command on Trusted - 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: VERIFY_CARD
Special characters: _
access_code
Alphanumeric
Mandatory
max: 20
Merchant account Access Code.
Example: zx0IPmPy5jp1vAz8Kpg7
merchant_identifier
Alphanumeric
Mandatory
max: 20
FORT Merchant Account identifier.
Example: CycHZxVj
merchant_reference
Alphanumeric
Mandatory
max: 40
The Merchant’s unique reference for a specific request.
Example: XYZ9239-yu898
Special characters: _ - .
currency
Alpha
Mandatory
Max: 3
The currency of the transaction’s amount in ISO code 3.
Example: AED
language
Alpha
Mandatory
Max: 2
The checkout page and messages language.
Possible/ expected values: en/ ar
expiry_date
Numeric
Mandatory
max: 4
The card’s expiry date.
Example: 2105
card_number
Numeric
Mandatory
max: 16
The clear credit card’s number.
Example: 4005550000000001
signature
Alphanumeric
Mandatory
max: 200
A string hashed using the Secure Hash Algorithm. (Please refer to section Signature for more details).
Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a
settlement_reference
Alphanumeric
Optional
max: 34
The Merchant submits this value to the FORT. The value is then passed to the Acquiring bank and displayed to the merchant in the Acquirer settlement file.
Example: example
Special characters: _ - .

Verify Service Command on Trusted Request Example

Verify Service Command on Trusted - Response

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

ATTRIBUTES Description
service_command
Alpha
max: 20
Command.
Possible/ expected values: VERIFY_CARD
Special characters: _
access_code
Alphanumeric
max: 20
Merchant account Access Code.
Example: zx0IPmPy5jp1vAz8Kpg7
merchant_identifier
Alphanumeric
max: 20
FORT Merchant Account identifier.
Example: CycHZxVj
merchant_reference
Alphanumeric
max: 40
The Merchant’s unique reference for a specific request.
Example: XYZ9239-yu898
Special characters: _ - .
currency
Alpha
Max: 3
The currency of the transaction’s amount in ISO code 3.
Example: AED
language
Alpha
Max: 2
The checkout page and messages language.
Possible/ expected values: en/ ar
expiry_date
Numeric
max: 4
The card’s expiry date.
Example: 2105
card_number
Numeric
max: 16
The masked credit card’s number.
Example: 400555******0001
signature
Alphanumeric
max: 200
A string hashed using the Secure Hash Algorithm. (Please refer to section Signature for more details).
Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a
language
Alpha
max: 2
The checkout page and messages language.
Possible/ expected values: en / ar
response_message
Alphanumeric
max: 150
Message description of the response code. It returns according to the request language.
Example: Insufficient Funds
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: 80000
status
Numeric
max: 2
A two-digit numeric value that indicates the status of the transaction
Possible/ expected values: (Please refer to section statuses).
settlement_reference
Alphanumeric
max: 34
The Merchant submits this value to the FORT. The value is then passed to the Acquiring bank and displayed to the merchant in the Acquirer settlement file.
Example: example

Verify Service Command on Trusted Response Example

Check Status for Verify Service Command

This feature allows the Merchants to easily check the actual status of the “Verify card command” results through this API.

Check Status for Verify Service Command 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.

Check Status for Verify Service - Request

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

ATTRIBUTES Description
query_command
Alpha
Mandatory
max: 50
Query operations command.
Possible/ expected values: CHECK_VERIFY_CARD_STATUS
Special characters: _
access_code
Alphanumeric
Mandatory
max: 20
Access Code.
Example: zx0IPmPy5jp1vAz8Kpg7
merchant_identifier
Alphanumeric
Mandatory
max: 20
The ID of the Merchant.
Example: CycHZxVj
merchant_reference
Alphanumeric
Mandatory
max: 40
The Merchant’s unique number. *Please, use the same merchant reference you used in the “generate report” request.
Example: XYZ9239-yu898
language
Alpha
Mandatory
Max: 2
The checkout page and messages language.
Possible/ expected values: en/ ar
signature
Alphanumeric
Mandatory
max: 200
A string hashed using the Secure Hash Algorithm. (Please refer to section Signature for more details).
Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a

Check Status on Verify Service Command Request Example

Check Status for Verify Service Command - Response

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

ATTRIBUTES Description
query_command
Alpha
max: 50
Query operations command.
Possible/ expected values: CHECK_VERIFY_CARD_STATUS
access_code
Alphanumeric
max: 20
Access Code.
Example: zx0IPmPy5jp1vAz8Kpg7
merchant_identifier
Alphanumeric
max: 20
The ID of the Merchant.
Example: CycHZxVj
merchant_reference
Alphanumeric
max: 40
The Merchant’s unique reference for a specific request.
Example: XYZ9239-yu898
language
Alpha
Max: 2
The checkout page and messages language.
Possible/ expected values: en/ ar
signature
Alphanumeric
max: 200
A string hashed using the Secure Hash Algorithm. (Please refer to section Signature for more details).
Example: 7cad05f0212ed933c9a5d5dffa31661acf2c827a
response_message
Alphanumeric
max: 150
Message description of the response code. It returns according to the request language.
Example: Insufficient Funds
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: 56000
status
Numeric
max: 2
A two-digit numeric value that indicates the status of the transaction
Possible/ expected values: (Please refer to section statuses).
transaction_status
Numeric
max: 2
The status of the last verify operation performed on a specific card.
Possible/ expected values: (Please refer to section statuses).
transaction_message
Alphanumeric
Max: 150
The message returned for the last verify operation performed on a specific card.
Example: success

Check Status on Verify Service Command Response Example

FORT Transaction Feedback

Overview

The FORT transaction Feedback system provides Merchants with two types of configurable notifications:
1. Direct Transaction Feedback, PayFort will send Merchants HTTPs notifications that inform Merchants of the transaction’s final status whenever a transaction is processed.
2. Notification Transaction Feedback, PayFort will send Merchants HTTPs notifications that inform Merchants of the transaction’s final status whenever a transaction status is updated.

Registering Transaction Feedback URLs

1. Log in to your back-office account.
2. Select the active channel under Integration Settings > Technical Settings.
3. Enter your Direct Transaction Feedback URL and Notification Transaction Feedback URL.
4. Click “Save Changes” button.

Transaction Feedback submission

The FORT will send Transaction Feedback data as form POST Parameters to the Merchant’s Transaction Feedback URLs.
However if you want to change the submission type to JSON or XML, you can contact us on integration@payfort.com.
This configuration can be enabled by internal PayFort team only
The specifics of the data will differ based upon the financial operation that has been processed.
Please refer to the FORT integration guide for more details.

Responding to FORT Transaction Feedback

Beyond whatever your Transaction Feedback URL does with the data received, it must also return a 2xx (like 200 , 201 , etc…) or 302 HTTP status code to tell the FORT that the notification was received. If your URL does not return 2xx or 302, the FORT will continue to retry the notification until it’s properly acknowledged.
In case the FORT does not receive 200 or 302 HTTP status code it will attempt to send the notification for 10 times with 10 seconds in between.
This configuration is editable as well, if you want to change the grace period or the time interval between the retries please contact us on integration@payfort.com.