Skip to main content

Redirect

Using our Prebuilt or you can call it the redirect Integration is the fastest way to go live
As we are going to handle the payment process instead of you.

Before start

  • Make sure to follow the steps here
  • It will show you how to set up your account and get the merchat_key and the password.

Checkout process

checkout process

Make an Authentication request

Authentication request is the main request by making this request you will receive the redirect url that you will redirecdt your customer to to continue the payment process . Once you are ready to create a transaction

  1. Create an Authentication object as json
  2. send a POST reqeust to https://checkout.dineropay.com/api/v1/session
  3. In the response get the redirect_url
  4. Redirect the customer to the checkout page
  5. once the customer finish the payment process he will be redirected to success_url upon success or cancel_url upon failure payments.
  6. Receive the response via callback_notification to update the transaction status .
info

The list of the fields that will be dipslayed on the Checkout page depends on the request parameters and the specified payment method. For more details check the section below.

sample purchase reqeust

{
"merchant_key": "1d903ea0-e8dc-11ed-bbba-d60e6b1bd8d8",
"operation": "purchase",
"methods": ["card"],
"order": {
"number": "order-1234",
"amount": "1.00",
"currency": "SAR",
"description": "gift"
},
"cancel_url": "https://example.com/cancel",
"success_url": "https://example.com/success",
"hash": "416830ec3be6ac7c6ca539a4e9dbdd5c8971097d"
}

The above request only contain the mandatory parameters for more info go here

caution

Always make the API request from your server side to follow best practices


Fields on the checkout page

In the checkout page there will be some fields based on the acquirer requirements
however your customer will not see fields that the bank dose not need
For example, if an alternative payment method is specified such as stcpay, the card data is not displayed on the Checkout page.

As well, pay attention to the conditional fields such as e-mail or billing address. If the e-mail and billing address (data object) parameters are specified in the request, the Checkout page will not contain them.

Additional fields can also be displayed if a payment method is selected that requests additional data from the Customer.

The Checkout page has the fields validation. In case of the invalid data the error message will be shown and the field will be highlighted.

General fields and possible errors

FieldsTypeLimiationErrorDisplay
Card numberIntLun algorithm, length 14-19 numbersInvalid card numberDisplayed in the checkout page
Expiry dateDate2-2 numbers (in the format mm-yy),after today's dateThe expiration date of card is expiredand not valid.Displayed in the checkout page
Security codeIntUp to 4 charactersInvalid security codeDisplayed in the checkout page
Name on the cardStringUp to 22 characters (min - 2 characters)The name on card field must have at least 2 characters.It will take customer name if it's exist in request body
CountryList2-letters codeCountry is required Please enter a valid CountryIt will take the Country passed on the billing address object if it's exist
State/RegionStringIt will take the State passed on the billing address object if it's exist
CityStringUp to 32 charactersCity is required . Please enter a valid cityIt will take the City passed on the billing address object if it's exist
Address lineStringUp to 32 charactersAddress line is requiredIt will take the address passed on the billing address object if it's exist
Zip codeStringUp to 32 charactersZip code is required. Please enter a valid Zip codeIt will take the zip code passed on the billing address object if it's exist
Phone numberStringUp to 32 charactersPhone number is required. Please enter a valid Phone numberIt will take the phone number passed on the billing address object if it's exist

As we stated above the fields shown in the checkout page will depand on the payment method , and the data sent in the request body
you can decide what fields need to be shown by refereing to the table above and send in the request body the fields that you don't want it to be shown to the customer .

Hosted page Customization

We give you the option to customaize the payment page with the preferences of the merchant . The action is available for the authorized users only.

To customize the payment page you need:

  • From the dashboard click the “Configuration → Branding” item on the menu bar. The settings are displayed in the work area.
  • Select a page template to make changes.
  • Change the settings:
    • login icon selection
    • color selection for:
      • heading
      • background
      • buttons
  • Click the “Submit” button to apply the settings. The selected settings will be displayed to the Customers on the Checkout page.