0% found this document useful (0 votes)
23 views

ARB Payment Gateway REST API Integration Doc_V1.26

The Al Rajhi Payment Gateway Merchant Integration Guide provides detailed procedures for integrating the payment gateway into merchant applications using REST APIs. It includes technical integration details, best practices, and a comprehensive transaction flow. The document is intended for partner integration teams, project managers, developers, and testers, ensuring a secure and compliant integration process.

Uploaded by

maigamigo13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

ARB Payment Gateway REST API Integration Doc_V1.26

The Al Rajhi Payment Gateway Merchant Integration Guide provides detailed procedures for integrating the payment gateway into merchant applications using REST APIs. It includes technical integration details, best practices, and a comprehensive transaction flow. The document is intended for partner integration teams, project managers, developers, and testers, ensuring a secure and compliant integration process.

Uploaded by

maigamigo13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 288

AL RAJHI PAYMENT GATEWAY

MERCHANT INTEGRATION GUIDE - REST API’S

Version 1.26

This document explains the step-by-step procedures to integrate Al Rajhi


payment gateway in merchants’ application.

Publishing Date: October 2021

API Guide

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Version History

Version History

The following table displays the version history of this document:

Version Created or
Created or Updated By Reason for Change
No. Updated on
1.23 AlRajhi Bank 3DS 2.0 Parameters 13 October, 2021
URPAY Wallet as Payment
1.24 AlRajhi Bank 16 June, 2022
Option
Card Number Masking, Expiry
1.25 AlRajhi Bank 02 August, 2022
Date
Processing – Manual Refund
1.26 AlRajhi Bank 10 Nov, 2023
Result Code

© 2021 AlRajhi Bank API Guide Page 2 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Table of Contents

Table of Contents

CHAPTER 1 INTRODUCTION ................................................................................... 7

PURPOSE OF THE DOCUMENT ............................................................................................. 8


TARGET AUDIENCE ......................................................................................................... 8

CHAPTER 2 GETTING STARTED ............................................................................... 9

START BUILDING WITH ARB PAYMENT GATEWAY .................................................................... 10


BASIC UNDERSTANDING OF ARB PAYMENT GATEWAY ............................................................... 11
BASICS OF COLLECTING PAYMENTS WITH ARB PAYMENT GATEWAY ............................................... 12
INTEGRATION GUIDELINES .............................................................................................. 13
TEST INSTRUMENTS ...................................................................................................... 13

CHAPTER 3 TRANSACTION FLOW ......................................................................... 14

BANK HOSTED INTEGRATION ........................................................................................... 15


Request - Payment Token Generation API ............................................................. 17
MADA Mandatory Parameters ........................................................................... 20
Split Payment or Payout. .................................................................................. 22
SADAD .......................................................................................................... 23
Airline............................................................................................................ 24
Initial Response - Payment ID and Payment Page URL ............................................ 26
Framing Payment URL ........................................................................................ 27
Final Response – Transaction Status ..................................................................... 28
BANK HOSTED INTEGRATION (FASTER CHECKOUT) ................................................................. 32
Request - Payment Token Generation API ............................................................. 34
Payout Future ................................................................................................. 37
SADAD .......................................................................................................... 38
Airline............................................................................................................ 39
Initial Response - Payment ID and Payment Page URL ............................................ 41
Framing Payment URL ........................................................................................ 42
Final Response – Transaction Status ..................................................................... 43
BANK HOSTED INTEGRATION (IFRAME) ............................................................................... 47
Request - Payment Token Generation API ............................................................. 49
Payout Future ................................................................................................. 52
SADAD .......................................................................................................... 53
Airline............................................................................................................ 54
Initial Response - Payment ID and Payment Page URL ............................................ 56
Framing Payment URL ........................................................................................ 58
Final Response – Transaction Status ..................................................................... 60

© 2021 AlRajhi Bank API Guide Page 3 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Table of Contents

MERCHANT HOSTED TRANSACTION (3D SECURE) ................................................................... 64


Request - Payment Token Generation API ............................................................. 66
Credit Card Installment Transactions ................................................................. 70
Payout Future ................................................................................................. 71
SADAD .......................................................................................................... 72
Airline............................................................................................................ 73
Initial Response - Payment ID and Payment Processing Page URL ............................ 75
Framing Payment URL ........................................................................................ 76
Final Response – Transaction Status ..................................................................... 77
MERCHANT HOSTED TRANSACTION (NON 3D SECURE)............................................................. 82
Request - Payment Token Generation API ............................................................. 84
Payout Future ................................................................................................. 87
SADAD .......................................................................................................... 88
Airline............................................................................................................ 89
Final Response – Transaction Status ..................................................................... 91
MERCHANT HOSTED CARD ON FILE TRANSACTIONS (3D SECURE) ................................................ 95
Saving Cards During Transaction (Card Registration) .............................................. 97
Request - Payment Token Generation API ........................................................... 102
Initial Response - Payment ID and Payment Page URL .......................................... 107
Framing Payment URL ...................................................................................... 108
Final Response – Transaction Status ................................................................... 109
MERCHANT HOSTED CARD ON FILE TRANSACTIONS (NON-3D SECURE) ....................................... 113
Saving Cards During Transaction (Card Registration) ............................................ 114
Request - Payment Token Generation API ........................................................... 117
Final Response – Transaction Status ................................................................... 120
MERCHANT HOSTED CARD ON FILE REGISTRATIONS (WITHOUT TRANSACTION) ............................... 124
Request – Card Registration Token Generation API ............................................... 125
Response – Card Registration Status .................................................................. 127
MERCHANT HOSTED CARD ON FILE DEREGISTRATION............................................................. 128
Request – Card Deregistration Token Generation API ............................................ 129
Response – Card Deregistration Status ............................................................... 131
MERCHANT HOSTED TRANSACTION FLOW (INQUIRY, VOID, REFUND, CAPTURE TRANSACTIONS) .......... 132
Request .......................................................................................................... 133
Response ........................................................................................................ 136
BANK HOSTED INTEGRATION FLOW (APPLE PAY) .................................................................. 140
Request - Payment Token Generation API ........................................................... 142
MADA Mandatory Parameters ......................................................................... 145
Split Payment or Payout. ................................................................................ 147
SADAD ........................................................................................................ 148
Airline.......................................................................................................... 149
Initial Response - Payment ID and Payment Page URL .......................................... 151
Framing Payment URL ...................................................................................... 152
Final Response – Transaction Status ................................................................... 153

© 2021 AlRajhi Bank API Guide Page 4 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Table of Contents

MERCHANT HOSTED TRANSACTION FLOW (APPLE PAY) ........................................................... 157


Request - Payment Token Generation API ........................................................... 159
SADAD ........................................................................................................ 162
Final Response – Transaction Status ................................................................... 163
PRE-AUTHENTICATION TRANSACTIONS (AIRLINE) ................................................................. 167
Request .......................................................................................................... 168
Credit Card Installment Transactions ............................................................... 171
Payout Future ............................................................................................... 171
SADAD ........................................................................................................ 172
Response ........................................................................................................ 174
INVOICE PAYMENT TRANSACTION FLOW ............................................................................. 178
Request - Payment Token Generation API ........................................................... 179
Initial Response - Payment ID and Processing Page URL ....................................... 181
Final Response ................................................................................................. 182
WEBHOOK MERCHANT NOTIFICATION FLOW ........................................................................ 183
MERCHANT NOTIFICATION FLOW FOR BANK HOSTED TRANSACTIONS........................................... 192
Request - Notification Generation API ................................................................. 193
Response - Acknowledgement ........................................................................... 196
Final response to merchant ............................................................................... 197
Response – No Acknowledgement ...................................................................... 199
ISSUER COUNTRY API (CARD BIN CHECK) ......................................................................... 200
Response from PG to Merchant .......................................................................... 201
BANK HOSTED RECURRING TRANSACTION FLOW (3D SECURE) ................................................. 203
Request - Payment Token Generation API ........................................................... 203
Split Payment or Payout. ................................................................................ 206
SADAD ........................................................................................................ 207
Initial Response - Payment ID and Payment Page URL .......................................... 208
Framing Payment URL ...................................................................................... 209
Final Response – Transaction Status ................................................................... 210
MERCHANT HOSTED RECURRING TRANSACTION FLOW (3D SECURE)........................................... 214
Request - Payment Token Generation API ........................................................... 214
Credit Card Installment Transactions ............................................................... 218
Payout Future ............................................................................................... 218
SADAD ........................................................................................................ 219
Initial Response - Payment ID and Payment Page URL .......................................... 221
Framing Payment URL ...................................................................................... 222
Final Response – Transaction Status ................................................................... 223
RECURRING PAYMENT FOR MADA – MERCHANT INITIATED INITIAL RESPONSE - PAYMENT ID AND PAYMENT
PAGE URL ............................................................................................................... 227
Request .......................................................................................................... 227
Credit Card Installment Transactions ............................................................... 230
Response ........................................................................................................ 231
JS WIDGET INTEGRATION ........................................................................................... 235

© 2021 AlRajhi Bank API Guide Page 5 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Table of Contents

Integration Process .......................................................................................... 235


JS Plug-in URL ................................................................................................. 236
Integrate JS plug-in with merchant page ............................................................. 237
Code snippet for Integration ........................................................................... 237
Loading payment page in merchant ................................................................. 243
Final Response.............................................................................................. 243
Sample Demo page Navigation .......................................................................... 249
Best Practices: ................................................................................................. 251
PRIVATE AND PUBLIC KEY ............................................................................................. 253
SETTING UP YOUR SERVER ........................................................................................... 254
APPLE PAY PROCESS FOR MERCHANT REGISTRATION AND CERTIFICATES........................................ 257
COMMANDS TO GENERATE MERCHANT IDENTITY CERTIFICATE AND PAYMENT PROCESSING CERTIFICATE .. 260
MERCHANT HOSTED URPAY INTEGRATION ......................................................................... 263
FAQ'S ON INTEGRATION PROCESS ................................................................................... 268
SAMPLE ENCRYPTION AND DECRYPTION CODE FOR JAVA ........................................................ 270
SAMPLE ENCRYPTION AND DECRYPTION CODE FOR JAVASCRIPT .............................................. 273
SAMPLE ENCRYPTION AND DECRYPTION CODE FOR PHP.......................................................... 275

CHAPTER 4 TROUBLESHOOTING ......................................................................... 277

KNOWN ERROR CODES ................................................................................................ 277


HANDLING FINAL RESPONSE FROM PAYMENT GATEWAY ........................................................... 286

INDEX 287

© 2021 AlRajhi Bank API Guide Page 6 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Introduction

Chapter 1 INTRODUCTION

This chapter provides the purpose of this document and its details.

PURPOSE OF THE DOCUMENT .................................................................................................. 8


TARGET AUDIENCE .............................................................................................................. 8
SUPPORT ............................................................................... ERROR! BOOKMARK NOT DEFINED.

© 2021 AlRajhi Bank API Guide Page 7 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Introduction

Purpose of the Document

The Payment Gateway follows industry standards and norms as prescribed by Master-Card and
Visa International as well in conformity with Payment Card Industry – Data Security Standards
commonly referred to as PCI – DSS.

In order that the AL Rajhi Bank merchants are integrated in a secure and mandated manner, this
reference document is being shared. The expectation being that the merchant’s system integrator
or auditor can refer to a document while performing integration as well as post integration. It
contains the technical integration details including message formats to be used in communicating
to the Payment Gateway irrespective of the merchant platform being used. The document also
shares the best practices and recommendations the merchant should follow during the integration
with Payment Gateway.

Target Audience

This document is intended for Partner integration teams, project managers, developers, and
testers.

© 2021 AlRajhi Bank API Guide Page 8 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Getting Started

Chapter 2 GETTING STARTED

This chapter contains detailed instructions of building merchant application with ARB Payment
Gateway.

START BUILDING WITH ARB PAYMENT GATEWAY ......................................................................... 10


BASIC UNDERSTANDING OF ARB PAYMENT GATEWAY .................................................................... 11
BASICS OF COLLECTING PAYMENTS WITH ARB PAYMENT GATEWAY .................................................... 12
INTEGRATION GUIDELINES ................................................................................................... 13
TEST INSTRUMENTS ........................................................................................................... 13

© 2021 AlRajhi Bank API Guide Page 9 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Getting Started

Start Building with ARB Payment Gateway

Alrajhi Payment Gateway offers a secure, PCI-DSS compliant approach to save Debit card, Credit
card, Net-Banking, UPI and Wallet payments from the merchants.

1. Once the Merchant on-boarded on ARB payment gateway, merchant would be provided with
Payment gateway application URL and login credentials.

Notes: Generate your staging account credentials. These are required to explore
ARB Payment Gateway integration solutions.

2. Merchant to logs in to ARB payment gateway merchant portal and download the following:
 Tranportal ID & Tranportal password
- Tranportal ID and Tranportal password are unique values provided by ARB
Payment Gateway via registered mail as well.
- The details are required for integration with ARB payment gateway.
 Resource Key
- Resource key is a unique secret key used for secure encryption and decryption of
every request.
- This should not be shared with anyone.

© 2021 AlRajhi Bank API Guide Page 10 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Getting Started

Basic understanding of ARB Payment Gateway

The ARB payment gateway’s merchant application is a well secured interface that captures
payment related data between the merchant and the customer:

Some of the features are :

 View payments received from your customers


 View transactions ARB PG makes into your account
 Initiate and track the refund
 Generate and download all kinds of transaction reports

© 2021 AlRajhi Bank API Guide Page 11 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Getting Started

Basics of collecting payments with ARB Payment


Gateway

1. A user adds goods & services in cart and clicks the Alrajhi Payment Gateway button
in your application (the merchant’s application).
2. A checkout form is shown where the user fills in the payment details and authorizes
the payment.
There are two ways of processing the payment with ARB payment gateway with API
integration:
 Bank Hosted setup
 Merchant Hosted setup

3. After completion of a transaction, Alrajhi Payment Gateway posts the response


(success or failed) on a Callback URL defined by you (the merchant).
4. Based on the response received, you display the order status to the customer.
5. See a real-time summary of payments received and other detail in the merchant portal
URL:

https://digitalpayments.alrajhibank.com.sa/mrchptl/merchant.htm

Navigation to transaction detail report in merchant portal is as below :


Merchant Portal ->Reports->Transaction Reports->Transaction Detail Report

6. Receive payments collected from customers in your bank account on the next business
day.

© 2021 AlRajhi Bank API Guide Page 12 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Getting Started

Integration Guidelines

Mandatory steps to be followed by Merchant Integration Team:

1. Verify the endpoints by sending request in postman application.


2. Frame the Json request of Plain Trandata with request parameters as specified in the
document
3. Encrypt the plain json request with the Resource Key received in the mail.
4. Frame the encrypted request and send it to ARB Payment Gateway endpoint URL
shared via mail.
5. After receiving the response from ARB Payment Gateway, decrypt the encrypted
trandata using the resource key received in the mail.
6. Process the plain trandata - response message.

Test Instruments

ARB PG APIs are complete RESTFUL API’s; Merchants can test the API’s on sandbox setup before
testing on Live environment.

Test Card details.

Card type Card Number Expiry Date CVV


Credit 4012001037141112 12/2027 212
Credit 5297412201764352 01/2022 999

© 2021 AlRajhi Bank API Guide Page 13 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Chapter 3 TRANSACTION FLOW

This chapter illustrates various transaction flows of payment gateway integrate on merchants’
application.

BANK HOSTED INTEGRATION ................................................................................................ 15


BANK HOSTED INTEGRATION (FASTER CHECKOUT) ...................................................................... 32
BANK HOSTED INTEGRATION (IFRAME) .................................................................................... 47
MERCHANT HOSTED TRANSACTION (3D SECURE) ........................................................................ 64
MERCHANT HOSTED TRANSACTION (NON 3D SECURE).................................................................. 82
MERCHANT HOSTED CARD ON FILE TRANSACTIONS (3D SECURE) ..................................................... 95
MERCHANT HOSTED CARD ON FILE TRANSACTIONS (NON-3D SECURE) .............................................113
MERCHANT HOSTED CARD ON FILE REGISTRATIONS (WITHOUT TRANSACTION) .....................................124
MERCHANT HOSTED CARD ON FILE DEREGISTRATION...................................................................128
MERCHANT HOSTED TRANSACTION FLOW (INQUIRY, VOID, REFUND, CAPTURE TRANSACTIONS) ................132
BANK HOSTED INTEGRATION FLOW (APPLE PAY) ........................................................................140
MERCHANT HOSTED TRANSACTION FLOW (APPLE PAY) .................................................................157
PRE-AUTHENTICATION TRANSACTIONS (AIRLINE) .......................................................................167
INVOICE PAYMENT TRANSACTION FLOW ...................................................................................178
WEBHOOK MERCHANT NOTIFICATION FLOW ..............................................................................183
MERCHANT NOTIFICATION FLOW FOR BANK HOSTED TRANSACTIONS.................................................192
ISSUER COUNTRY API (CARD BIN CHECK) ...............................................................................200
BANK HOSTED RECURRING TRANSACTION FLOW (3D SECURE) .......................................................203
MERCHANT HOSTED RECURRING TRANSACTION FLOW (3D SECURE).................................................214
RECURRING PAYMENT FOR MADA – MERCHANT INITIATED INITIAL RESPONSE - PAYMENT ID AND PAYMENT PAGE
URL ............................................................................................................................227
JS WIDGET INTEGRATION .................................................................................................235
PRIVATE AND PUBLIC KEY ...................................................................................................253
SETTING UP YOUR SERVER .................................................................................................254
APPLE PAY PROCESS FOR MERCHANT REGISTRATION AND CERTIFICATES..............................................257
COMMANDS TO GENERATE MERCHANT IDENTITY CERTIFICATE AND PAYMENT PROCESSING CERTIFICATE ........260
FAQ'S ON INTEGRATION PROCESS .........................................................................................268
SAMPLE ENCRYPTION AND DECRYPTION CODE FOR JAVA ..............................................................270
SAMPLE ENCRYPTION AND DECRYPTION CODE FOR JAVASCRIPT ....................................................273
SAMPLE ENCRYPTION AND DECRYPTION CODE FOR PHP................................................................275

© 2021 AlRajhi Bank API Guide Page 14 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Bank Hosted Integration

This section illustrates how you can integrate the bank hosted flow on your website application.

© 2021 AlRajhi Bank API Guide Page 15 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

1. User visits the merchant application and creates order.


2. Merchant application backend server calls Payment Token Generation API to get the
transaction token.
3. ARB Payment gateway internally validates the request.

 In case of successful validation, ARB PG provides Payment ID and Payment Page


URL in the response.
- Merchant needs to frame the payment page URL with Payment ID, Hence the ARB
payment page is displayed.
 In case of failure, ARB PG provides Error Code and Description.

Note: If merchant notification is disabled, then ARB Payment gateway will provide the final
response in URL redirection.

4. User enters the payment details and authorizes the transaction on the ARB PG bank’s
page.
5. The ARB PG application process the transaction and returns the transaction response to
the merchant site.
6. Merchant server calls the transaction status API to verify the transaction response.
7. Finally, the merchant application displays the transaction status to user.

© 2021 AlRajhi Bank API Guide Page 16 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the


1 id M Alphanum
Tranportal id from Merchant portal
All the below request parameters
2 trandata M Alphanum encrypted and pass the encrypted value in
trandata.
responseUR The merchant success URL where Payment
3 M Alphanum
L Gateway send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization: 4

Tranportal password. Merchant


3 password M Alphanum
download the same in merchant portal.

Tranportal ID. Merchant download the


4 id M Alphanum
same in merchant portal

currencyC
5 M Numeric 3-digit currency code of KSA. Ex:682
ode

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
7 udf1 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

© 2021 AlRajhi Bank API Guide Page 17 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

S. No Fields M/C/O Field Type Description

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
8 udf2 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
9 udf3 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
10 udf4 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
11 udf5 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The merchant success URL where


response
12 M Alphanum Payment Gateway send the notification
URL
request.

The merchant error URL where Payment


13 errorURL M Alphanum Gateway send the response in case any
error while processing the transaction.

Language ID . Based on language ID


arabic language will be displayed on
14 langid O Alphabetic
payment page. Value should be 'ar' or
'AR' for arabic language.

© 2021 AlRajhi Bank API Guide Page 18 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata> ”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata:

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource Key.

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

© 2021 AlRajhi Bank API Guide Page 19 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

"langid":"ar",

}]

MADA Mandatory Parameters

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization : 4

Alphanu Tranportal password. Merchant download the same


3 password M
m in merchant portal.

Alphanu Tranportal ID. Merchant download the same in


4 id M
m merchant portal

5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field


data is passed along with a transaction request and
Alphanu
7 udf1 O then returned in the transaction response.
m
Merchant should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these fields. The field


data is passed along with a transaction request and
Alphanu
8 udf2 O then returned in the transaction response.
m
Merchant should ensure that field is left blank
when no data needs to be passed.

Alphanu The user (merchant) defines these fields. The field


9 udf3 O
m data is passed along with a transaction request and

© 2021 AlRajhi Bank API Guide Page 20 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

then returned in the transaction response.


Merchant should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these fields. The field


data is passed along with a transaction request and
Alphanu
10 udf5 O then returned in the transaction response.
m
Merchant should ensure that field is left blank
when no data needs to be passed.

Alphanu The merchant success URL where Payment


11 responseURL M
m Gateway send the notification request.

The merchant error URL where Payment Gateway


Alphanu
12 errorURL M send the response in case any error while
m
Processing the transaction.

Sample JSON request - Request from Merchant to ARB PG

//MADA Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 2 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

© 2021 AlRajhi Bank API Guide Page 21 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

”udf5”:”udf5text”,

"langid":"ar",

}]

Split Payment or Payout.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

JSON Conditional if Merchant Opted for Payout future.


1 accountDetails C
Array Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//Conditional if Merchant Opted for Split Payment or Payout.

"accountDetails":[

{"bankIdCode":"12345d6f","iBanNum": "567896743281926354276254",

"benificiaryName":"AlRajhi Bank Services",

"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode":"1234ret3","iBanNum": "987656743281926354276254",

© 2021 AlRajhi Bank API Guide Page 22 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

"benificiaryName":"DIGITAL CO",

"serviceAmount":"300.00","valueDate":"20201231" }] ,

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY' 'PAY_SAVE'
'ADVANCE' 'PARTIAL_PAYMENT' 'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in advance -
POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"POSTP
AID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

},

© 2021 AlRajhi Bank API Guide Page 23 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Airline

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 airline C JSON Object Conditional - for Airline Merchant

1.1 bookingReferenc C Alphanum The booking reference number


e

1.1.1 itinerary C JSON Object Conditional - for Airline Merchant

1.1.1.1 leg C JSON Array Conditional - for Airline Merchant

1.1.1.1.1 carrierCode C Alphanum The carrier code for the leg

1.1.1.1.2 departureAirport C Alphanum The departure airport for the passenger


1.1.1.1.3 departureDate C Alphanum The departure date for the leg
1.1.1.1.4 departureTime C Alphanum The departure airport for the passenger
1.1.1.1.5 destinationAirpo C Alphanum The destination airport for the leg
rt
1.1.1.1.6 destinationArriva C Alphanum The arrival date for the leg
lDate
1.1.1.1.7 destinationArriva C Alphanum The arrival time for the leg
lTime
1.1.1.1.8 fareBasis C Alphanum The fare basis for the leg
1.1.1.1.9 flightNumber C Alphanum The flight number for the leg
1.1.1.1.10 travelClass C Alphanum The class of service for the leg
1.1.1.2 numberInParty C Alphanum
1.1.1.3 originCountry C Alphanum The origin Country of the itinerary
1.1.2 passenger C JSON Array Conditional - for airline merchant
1.1.2.1 firstName C Alphanum The passenger first name
1.1.2.2 lastName C Alphanum The passenger last name
1.1.3 ticket C JSON Object Conditional - for airline merchant
1.1.3.1 issue C JSON Object Conditional - for airline merchant
1.1.3.1.1 carrierCode C Alphanum Code of the airline that issuing the ticket
1.1.3.1.2 carrierName C Alphanum Name of the airline that is issuing the ticket.
1.1.3.1.3 travelAgentCode C Alphanum Code of the Travel Agent that issuing the ticket
1.1.3.1.4 travelAgentNam C Alphanum Name of the Travel Agent that issuing the ticket
e
1.1.3.2 totalFare C Numeric Ticket Total Fare

© 2021 AlRajhi Bank API Guide Page 24 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

1.1.3.3 totalFees C Numeric Total fee for the ticket.


1.1.3.4 totalTaxes C Numeric Tax portion of the order amount.

Sample JSON request - Request from Merchant to ARB PG

//conditional - for airline merchant

{ "airline": { "bookingReference": "5WPU68", "itinerary": { "leg": [ { "carrierCode":


"MH", "departureAirport": "MNL", "departureDate": "2021-05-11", "departureTime":
"06:50:00Z", "destinationAirport": "KUL", "destinationArrivalDate": "2021-05-11",
"destinationArrivalTime": "10:35:00Z", "fareBasis": "BOWMPH6", "flightNumber":
"0805", "travelClass": "B" }, { "carrierCode": "UL", "departureAirport": "KUL",
"departureDate": "2021-05-11", "departureTime": "15:00:00Z", "destinationAirport":
"CMB", "destinationArrivalDate": "2021-05-11", "destinationArrivalTime":
"16:05:00Z", "fareBasis": "BOWMPH6", "flightNumber": "0315", "travelClass": "B" } ],
"numberInParty": "1", "originCountry": "PHL" }, "passenger": [ { "firstName": "KAI
MR", "lastName": "QIAN" } ], "ticket": { "issue": { "carrierCode": "UL",
"carrierName": "SRILANKANAIRLINES", "travelAgentCode": "91401483",
"travelAgentName": "MANUL08AE" }, "totalFare": "54918.00", "totalFees": "59518.00",
"totalTaxes": "4600.00" } } }

}]

© 2021 AlRajhi Bank API Guide Page 25 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Initial Response - Payment ID and Payment Page URL

Attributes - Initial Response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then


status will be ‘1’. If the validation failed,
then status will be ‘2’
2 result C Alphanum It contains payment ID and Payment URL if
the validation success else this will be null
3 error C Alphanum If validation failed, then Payment gateway
will provide the respective error code
4 errorText C Alphanum If validation failed, then Payment gateway
will provide the respective error description

Sample JSON Response - Initial Response from ARB PG to Merchant

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response in case of successful validation, if failure then error code and
description will be provided. The below response will be in plain format and there is no
encryption for the below. Merchant can directly parse the response-based status and result
fields as mentioned below.

Success:

[{

"status": "1",

"result":"100201931620827468:https://securepayments.alrajhibank.com.sa/pg/p
aymentpage.htm", //Payment ID:Paymentpage URL

“error”: null,

“errorText”: null }]

© 2021 AlRajhi Bank API Guide Page 26 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

“errorText”: ”Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL

After Initial Response from ARB PG, merchant needs to frame the payment page URL like the
below sample.

https://securepayments.alrajhibank.com.sa/pg/paymentpage.htm?PaymentID=1002019316208
27468

© 2021 AlRajhi Bank API Guide Page 27 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

Final Response – Transaction Status

Attribute - Final URL redirection response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 paymentId M Numeric Unique payment Id generated by PG and
merchant can use this ID to match the
response from PG
2 trandata C Alphanum All the below response parameters
encrypted and send the encrypted value
in trandata
3 error C Alphanum If any error, PG will send the error code

4 errorText C Alphanum If any error, PG will send the error


description

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by payment


gateway. Based on this payment Id
merchant can match the final URL
redirection response
2 result M Alphanum Transaction status . Value will be
'CAPTURED' for purchase successful
and 'APPROVED' for authorization
successful.
3 ref M Numeric Transaction reference number (RRN)

4 transId M Numeric Unique transaction Id generated by


Payment gateway and merchant can
use this id for initiating supported
transactions (Void, refund and
inquiry)
5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these


fields. The field data is passed along

© 2021 AlRajhi Bank API Guide Page 28 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

S. No Fields M/C/O Field Type Description


with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
8 udf2 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
9 udf3 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
10 udf4 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
11 udf5 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
12 amt M Numeric Transaction amount

13 authRespCode M Numeric Auth response code provided by PG

14 authCode M Numeric 6 digit authorization code received


from switch
15 cardType M Alphabetic Card Brand name . Value will be "Visa"
or "MasterCard" or "Mada".
16 actionCode M Alphanume Action code of transaction. Possible
ric Values

© 2021 AlRajhi Bank API Guide Page 29 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

S. No Fields M/C/O Field Type Description


1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
17 card C AlPhanume Card Number used for Performing
ric Transaction
18 expMonth C AlPhanume Expiry Month of the Card
ric
19 expYear C AlPhanume Expiry Year of the Card
ric

Sample JSON Response - Final

If Merchant notification is disabled, then ARB Payment gateway will provide the final response
in URL redirection. Below is the sample response from ARB PG to merchant

[{

//Redirection Parameters

“paymentId”:”100201935166676976”,

“trandata”:”<encrypted trandata>”,

“error”:””,

“errorText”:””

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:”100201935166676976”,

© 2021 AlRajhi Bank API Guide Page 30 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Transaction Flow

”result”: ”CAPTURED”,

”transId”:201935166561122,

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

"expYear":"2024" //2-4 Digits

}]

© 2021 AlRajhi Bank API Guide Page 31 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Bank Hosted Integration (Faster Checkout)

This section illustrates how you can integrate the bank hosted (Faster checkout) flow on your
website application. Faster Checkout functionality is supported for the merchants only when
Faster Checkout flag is enabled at the terminal level.

© 2020 API Guide Page 32 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1. User visits the merchant application and creates order.


2. Merchant application backend server calls Payment Token Generation API to get
the transaction token.
3. ARB Payment gateway internally validates the request.

 In case of successful validation, ARB PG provides Payment ID and Payment Page


URL in the response.
- Merchant needs to frame the payment page URL with Payment ID, Hence the
ARB payment page is displayed.
 In case of failure, ARB PG provides Error Code and Description.

Note: If merchant notification is disabled, then ARB Payment gateway will provide the
final response in URL redirection.

4. Select the payment details already stored in the bank’s database. (Faster checkout)
Or
User enters the payment details and authorizes the transaction on the ARB PG bank’s
page. (Standard checkout)
5. The ARB PG application process the transaction and returns the transaction response
to the merchant site.
6. Merchant server calls the transaction status API to verify the transaction response.
7. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 33 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the


1 id M Alphanum
Tranportal id from Merchant portal
All the below request parameters
2 trandata M Alphanum encrypted and pass the encrypted value in
trandata.
responseUR The merchant success URL where Payment
3 M Alphanum
L Gateway send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization : 4

Tranportal password. Merchant


3 password M Alphanum
download the same in merchant portal.

Tranportal ID. Merchant download the


4 id M Alphanum
same in merchant portal

currencyC
5 M Numeric 3-digit currency code of KSA. Ex:682
ode

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
7 udf1 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

© 2020 API Guide Page 34 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
8 udf2 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
9 udf3 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
10 udf4 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
11 udf5 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The merchant success URL where


response
12 M Alphanum Payment Gateway send the notification
URL
request.

The merchant error URL where Payment


13 errorURL M Alphanum Gateway send the response in case any
error while processing the transaction.

Language ID . Based on language ID


arabic language will be displayed on
14 langid O Alphabetic
payment page. Value should be 'ar' or
'AR' for arabic language .

15 custid M Numeric Unique Customer ID generated on faster


checkout registration.

16 cust_card O Alphabetic Cardholder Name


HolderNa
me

© 2020 API Guide Page 35 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

17 cust_mobi O Numeric Customer Mobile Number


le_numbe
r:

18 cust_emai O Alphanum Customer E-mail ID


lId

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata> ”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata:

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource Key.

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

© 2020 API Guide Page 36 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

"langid":"ar",

//conditional if Merchant opted for Faster Checkout.

"custid":"201936122890007",

"cust_cardHolderName":"Test",

"cust_mobile_number":"7788667755",

"cust_emailId":”[email protected]

}]

Payout Future

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

Conditional if Merchant Opted for Payout


JSON future.
1 accountDetails C
Array
Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

© 2020 API Guide Page 37 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//conditional if Merchant opted for Payout Future.

"accountDetails":[

{"bankIdCode": "12345d6f", "iBanNum":


"567896743281926354276254","benificiaryName":"AlRajhi Bank Services",
"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode": "1234ret3", "iBanNum":


"987656743281926354276254","benificiaryName":"DIGITAL CO",
"serviceAmount":"300.00","valueDate":"20201231" }],

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY'
'PAY_SAVE' 'ADVANCE' 'PARTIAL_PAYMENT'
'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in
advance - POSTPAID : Paid at the end

© 2020 API Guide Page 38 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

Airline

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 airline C JSON Object Conditional - for Airline Merchant

1.1 bookingReferenc C Alphanum The booking reference number


e

1.1.1 itinerary C JSON Object Conditional - for Airline Merchant

1.1.1.1 leg C JSON Array Conditional - for Airline Merchant

1.1.1.1.1 carrierCode C Alphanum The carrier code for the leg

1.1.1.1.2 departureAirport C Alphanum The departure airport for the passenger


1.1.1.1.3 departureDate C Alphanum The departure date for the leg
1.1.1.1.4 departureTime C Alphanum The departure airport for the passenger
1.1.1.1.5 destinationAirpo C Alphanum The destination airport for the leg
rt
1.1.1.1.6 destinationArriva C Alphanum The arrival date for the leg
lDate

© 2020 API Guide Page 39 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1.1.1.1.7 destinationArriva C Alphanum The arrival time for the leg


lTime
1.1.1.1.8 fareBasis C Alphanum The fare basis for the leg
1.1.1.1.9 flightNumber C Alphanum The flight number for the leg
1.1.1.1.10 travelClass C Alphanum The class of service for the leg
1.1.1.2 numberInParty C Alphanum
1.1.1.3 originCountry C Alphanum The origin Country of the itinerary
1.1.2 passenger C JSON Array Conditional - for airline merchant
1.1.2.1 firstName C Alphanum The passenger first name
1.1.2.2 lastName C Alphanum The passenger last name
1.1.3 ticket C JSON Object Conditional - for airline merchant
1.1.3.1 issue C JSON Object Conditional - for airline merchant
1.1.3.1.1 carrierCode C Alphanum Code of the airline that issuing the ticket
1.1.3.1.2 carrierName C Alphanum Name of the airline that is issuing the ticket.
1.1.3.1.3 travelAgentCode C Alphanum Code of the Travel Agent that issuing the ticket
1.1.3.1.4 travelAgentNam C Alphanum Name of the Travel Agent that issuing the
e ticket
1.1.3.2 totalFare C Numeric Ticket Total Fare
1.1.3.3 totalFees C Numeric Total fee for the ticket.
1.1.3.4 totalTaxes C Numeric Tax portion of the order amount.

Sample JSON request - Request from Merchant to ARB PG

//conditional - for airline merchant

{ "airline": { "bookingReference": "5WPU68", "itinerary": { "leg": [ {


"carrierCode": "MH", "departureAirport": "MNL", "departureDate": "2021-05-11",
"departureTime": "06:50:00Z", "destinationAirport": "KUL",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "10:35:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0805", "travelClass": "B" }, {
"carrierCode": "UL", "departureAirport": "KUL", "departureDate": "2021-05-11",
"departureTime": "15:00:00Z", "destinationAirport": "CMB",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "16:05:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0315", "travelClass": "B" } ],
"numberInParty": "1", "originCountry": "PHL" }, "passenger": [ { "firstName":
"KAI MR", "lastName": "QIAN" } ], "ticket": { "issue": { "carrierCode": "UL",
"carrierName": "SRILANKANAIRLINES", "travelAgentCode": "91401483",
"travelAgentName": "MANUL08AE" }, "totalFare": "54918.00", "totalFees":
"59518.00", "totalTaxes": "4600.00" } } }

}]

© 2020 API Guide Page 40 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Page URL

Attributes - Initial Response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then


status will be ‘1’. If the validation failed,
then status will be ‘2’
2 result C Alphanum It contains payment ID and Payment URL if
the validation success else this will be null
3 error C Alphanum If validation failed, then Payment gateway
will provide the respective error code
4 errorText C Alphanum If validation failed, then Payment gateway
will provide the respective error description

Sample JSON Response - Initial Response from ARB PG to Merchant

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response in case of successful validation, if failure then error code and
description will be provided. The below response will be in plain format and there is no
encryption for the below. Merchant can directly parse the response-based status and result
fields as mentioned below.

Success:

[{

"status": "1",

"result":"100201931620827468:https://securepayments.alrajhibank.com.sa/pg/pa
ymentpage.htm", //Payment ID:Paymentpage URL

“error”: null,

“errorText”: null }]

Failure:

[{

"status": "2",

© 2020 API Guide Page 41 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"error":" IPAY0100124”,

“errorText”: ”Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL

After Initial Response from ARB PG, merchant needs to frame the payment page URL like the
below sample.

https://securepayments.alrajhibank.com.sa/pg/paymentpage.htm?PaymentID=1002019316
20827468

© 2020 API Guide Page 42 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Attribute - Final URL redirection response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 paymentId M Numeric Unique payment Id generated by PG and
merchant can use this ID to match the
response from PG
2 trandata C Alphanum All the below response parameters
encrypted and send the encrypted value
in trandata
3 error C Alphanum If any error, PG will send the error code

4 errorText C Alphanum If any error, PG will send the error


description

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by payment


gateway. Based on this payment Id
merchant can match the final URL
redirection response
2 result M Alphanum Transaction status . Value will be
'CAPTURED' for purchase successful
and 'APPROVED' for authorization
successful.
3 ref M Numeric Transaction reference number (RRN)

Unique Customer ID generated on


4 fcCustId M Numeric
faster checkout registration.
5 transId M Numeric Unique transaction Id generated by
Payment gateway and merchant can
use this id for initiating supported
transactions (Void, refund and
inquiry)
6 date M Numeric Transaction date and time

7 trackId M Numeric Merchant unique reference no

© 2020 API Guide Page 43 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

8 udf1 O Alphanum The user (merchant) defines these


fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
9 udf2 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
10 udf3 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
11 udf4 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
12 udf5 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
13 amt M Numeric Transaction amount

14 authRespCode M Numeric Auth response code provided by PG

15 authCode M Numeric 6 digit authorization code received


from switch
16 cardType M Alphabetic Card Brand name . Value will be "Visa"
or "MasterCard" or "Mada".

© 2020 API Guide Page 44 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

17 actionCode M Alphanume Action code of transaction. Possible


ric Values
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
18 card C AlPhanume Card Number used for Performing
ric Transaction
19 expMonth C AlPhanume Expiry Month of the Card
ric
20 expYear C AlPhanume Expiry Year of the Card
ric
Sample JSON Response - Final

If Merchant notification is disabled, then ARB Payment gateway will provide the final
response in URL redirection. Below is the sample response from ARB PG to merchant

[{

//Redirection Parameters

“paymentId”:”100201935166676976”,

“trandata”:”<encrypted trandata>”,

“error”:””,

“errorText”:””

}]

Plain Trandata:

[{

“paymentId”:”100201935166676976”,

”result”:”CAPTURED”,

© 2020 API Guide Page 45 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”transId”:”201935166561122”,

"fcCustId":"201936122890007",

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

“actionCode”:”1” ,

"card":"506968XXXXXX1063",

"expMonth":"06",

"expYear":"2024" //2-4 Digits

}]

© 2020 API Guide Page 46 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Bank Hosted Integration (Iframe)

Payment gateway shall support Iframe integration to enable merchants to accept online
payments on their own checkout page without having to be a PCI compliant. Instead of
being redirected to ARB Payment page, customers will remain on merchant website to make
payments. However, at the back end, ARB PG will securely collect the payment information
and get it authorized.

© 2020 API Guide Page 47 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1. User visits the merchant application and creates order.


2. Merchant application backend server calls Payment Token Generation API to get the
transaction token.
3. ARB Payment gateway internally validates the request.
 In case of successful validation, ARB PG provides Payment ID and Payment Page
URL in the response.
- Merchant needs to frame the payment page URL with Payment ID, Hence the
ARB payment page is displayed.
- Merchant needs to add the code snippet to load the payment page in an iframe
window.
 In case of failure, ARB PG provides Error Code and Description.

Note: If merchant notification is disabled, then ARB Payment gateway will provide the
final response in URL redirection.

4. Select the payment details already stored in the bank’s database. (For faster checkout)
Or
User enters the payment details and authorizes the transaction on the ARB PG bank’s
page.
5. The ARB PG application process the transaction and returns the transaction response
to the merchant site.
6. Merchant server calls the transaction status API to verify the transaction response.
7. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 48 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the


1 id M Alphanum
Tranportal id from Merchant portal
All the below request parameters
2 trandata M Alphanum encrypted and pass the encrypted value in
trandata.
responseUR The merchant success URL where Payment
3 M Alphanum
L Gateway send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization : 4

Tranportal password. Merchant


3 password M Alphanum
download the same in merchant portal.

Tranportal ID. Merchant download the


4 id M Alphanum
same in merchant portal

currencyC
5 M Numeric 3-digit currency code of KSA. Ex:682
ode

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
7 udf1 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

© 2020 API Guide Page 49 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
8 udf2 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

Merchant needs to send value 'iframe' in


9 udf3 M Alphanum
the UDF3 field.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
10 udf4 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
11 udf5 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The merchant success URL where


response
12 M Alphanum Payment Gateway send the notification
URL
request.

The merchant error URL where Payment


13 errorURL M Alphanum Gateway send the response in case any
error while Processing the transaction.

Language ID . Based on language ID


arabic language will be displayed on
14 langid O Alphabetic
payment page. Value should be 'ar' or
'AR' for arabic language .

15 custid M Numeric Unique Customer ID generated on faster


checkout registration.

16 cust_card O Alphabetic Cardholder Name


HolderNa
me

17 cust_mobi O Numeric Customer Mobile Number


le_numbe
r:

© 2020 API Guide Page 50 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

18 cust_emai O Alphanum Customer E-mail ID


lId

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata> ”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata:

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource Key.

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”,

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

”udf3”:”iframe”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

© 2020 API Guide Page 51 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”errorURL”: ”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

"langid":"ar",

}]

Payout Future

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

Conditional if Merchant Opted for Payout


JSON future.
1 accountDetails C
Array
Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

© 2020 API Guide Page 52 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample JSON request - Request from Merchant to ARB PG

//conditional if Merchant opted for Payout Future.

"accountDetails":[

{"bankIdCode": "12345d6f", "iBanNum":


"567896743281926354276254","benificiaryName":"AlRajhi Bank Services",
"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode": "1234ret3", "iBanNum":


"987656743281926354276254","benificiaryName":"DIGITAL CO",
"serviceAmount":"300.00","valueDate":"20201231" }],

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY'
'PAY_SAVE' 'ADVANCE' 'PARTIAL_PAYMENT'
'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in
advance - POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

© 2020 API Guide Page 53 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

Airline

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 airline C JSON Object Conditional - for Airline Merchant

1.1 bookingReferenc C Alphanum The booking reference number


e

1.1.1 itinerary C JSON Object Conditional - for Airline Merchant

1.1.1.1 leg C JSON Array Conditional - for Airline Merchant

1.1.1.1.1 carrierCode C Alphanum The carrier code for the leg

1.1.1.1.2 departureAirport C Alphanum The departure airport for the passenger


1.1.1.1.3 departureDate C Alphanum The departure date for the leg
1.1.1.1.4 departureTime C Alphanum The departure airport for the passenger
1.1.1.1.5 destinationAirpo C Alphanum The destination airport for the leg
rt
1.1.1.1.6 destinationArriva C Alphanum The arrival date for the leg
lDate
1.1.1.1.7 destinationArriva C Alphanum The arrival time for the leg
lTime
1.1.1.1.8 fareBasis C Alphanum The fare basis for the leg
1.1.1.1.9 flightNumber C Alphanum The flight number for the leg
1.1.1.1.10 travelClass C Alphanum The class of service for the leg
1.1.1.2 numberInParty C Alphanum
1.1.1.3 originCountry C Alphanum The origin Country of the itinerary
1.1.2 passenger C JSON Array Conditional - for airline merchant
1.1.2.1 firstName C Alphanum The passenger first name

© 2020 API Guide Page 54 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1.1.2.2 lastName C Alphanum The passenger last name


1.1.3 ticket C JSON Object Conditional - for airline merchant
1.1.3.1 issue C JSON Object Conditional - for airline merchant
1.1.3.1.1 carrierCode C Alphanum Code of the airline that issuing the ticket
1.1.3.1.2 carrierName C Alphanum Name of the airline that is issuing the ticket.
1.1.3.1.3 travelAgentCode C Alphanum Code of the Travel Agent that issuing the ticket
1.1.3.1.4 travelAgentNam C Alphanum Name of the Travel Agent that issuing the
e ticket
1.1.3.2 totalFare C Numeric Ticket Total Fare
1.1.3.3 totalFees C Numeric Total fee for the ticket.
1.1.3.4 totalTaxes C Numeric Tax portion of the order amount.

Sample JSON request - Request from Merchant to ARB PG

//conditional - for airline merchant

{ "airline": { "bookingReference": "5WPU68", "itinerary": { "leg": [ {


"carrierCode": "MH", "departureAirport": "MNL", "departureDate": "2021-05-11",
"departureTime": "06:50:00Z", "destinationAirport": "KUL",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "10:35:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0805", "travelClass": "B" }, {
"carrierCode": "UL", "departureAirport": "KUL", "departureDate": "2021-05-11",
"departureTime": "15:00:00Z", "destinationAirport": "CMB",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "16:05:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0315", "travelClass": "B" } ],
"numberInParty": "1", "originCountry": "PHL" }, "passenger": [ { "firstName":
"KAI MR", "lastName": "QIAN" } ], "ticket": { "issue": { "carrierCode": "UL",
"carrierName": "SRILANKANAIRLINES", "travelAgentCode": "91401483",
"travelAgentName": "MANUL08AE" }, "totalFare": "54918.00", "totalFees":
"59518.00", "totalTaxes": "4600.00" } } }

}]

© 2020 API Guide Page 55 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Page URL

Attributes - Initial Response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then


status will be ‘1’. If the validation failed,
then status will be ‘2’
2 result C Alphanum It contains payment ID and Payment URL if
the validation success else this will be null
3 error C Alphanum If validation failed, then Payment gateway
will provide the respective error code
4 errorText C Alphanum If validation failed, then Payment gateway
will provide the respective error description

Sample JSON Response - Initial Response from ARB PG to Merchant

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response in case of successful validation, if failure then error code and
description will be provided. The below response will be in plain format and there is no
encryption for the below. Merchant can directly parse the response-based status and result
fields as mentioned below.

Success:

[{

"status": "1",

"result":"100201931620827468:https://securepayments.alrajhibank.com.sa/pg/pa
ymentpage.htm", //Payment ID:Paymentpage URL

“error”: null,

“errorText”: null }]

Failure:

[{

"status": "2",

© 2020 API Guide Page 56 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"error":" IPAY0100124”,

“errorText”: ”Problem occurred while validating transaction data”,

“result”: null

}]

© 2020 API Guide Page 57 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Framing Payment URL

After Initial Response from ARB PG, merchant needs to frame the payment page URL like the
below sample.

https://securepayments.alrajhibank.com.sa/pg/paymentpage.htm?PaymentID=1002019316
20827468

Merchant needs to add the following code snippet to load the payment page in an iframe
window:

Code Snippet

if("iframe".equals(pipe.getUdf3()))

%>

<script>

if(window.parent.document.getElementById("iframe")!=null)

var division=document.createElement("div");

division.setAttribute("id", "payframe");

division.setAttribute("style", "min-height: 100%; position:


fixed; top: 0px; left: 0px; width: 100%; height: 100%; background: rgba(0,
0, 0, 0); padding-right: 0px; padding-left: 0px;padding-top: 0px;");

division.innerHTML ='<div style="position: absolute;right:


0px;top: 0px;cursor: pointer;font-size: 24px;opacity: .6;width:
100%;text-align: center;line-height: 0px;z-index: 1;" class="close"
id="F" onclick="javascript:
window.parent.document.getElementById(\'iframe\').parentNode.removeChil
d(window.parent.document.getElementById(\'iframe\'));window.parent.docu
ment.getElementById(\'payframe\').parentNode.removeChild(window.parent.
document.getElementById(\'payframe\'));">x</div><iframe id="iframe"
style="opacity: 7; height: 100%; position: relative; background: none;
display: block; border: 0px none transparent; margin-left: 0%; padding:
0px; z-index: 2; width: 100%; margin-top: 0%" allowtransparency="true"
frameborder="0" allowpaymentrequest="true"
src="<%=pipe.getWebAddress()%>"></iframe>';

© 2020 API Guide Page 58 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

document.body.appendChild(division);

else

var division=document.createElement("div");

division.setAttribute("id", "payframe");

division.setAttribute("style", "min-height: 100%;


transition: all 0.3s ease-out 0s; position: fixed; top: 0px; left: 0px;
width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); padding-right:
10px; padding-left: 250px;padding-top: 0px;");

division.innerHTML ='<div style="position: absolute;right:


0px;top: 0px;cursor: pointer;font-size: 24px;opacity: .6;width:
24px;text-align: center;line-height: 0px;z-index: 1;" class="close"
id="F" onclick="javascript:
window.parent.document.getElementById(\'iframe\').parentNode.removeChil
d(window.parent.document.getElementById(\'iframe\'));window.parent.docu
ment.getElementById(\'payframe\').parentNode.removeChild(window.parent.
document.getElementById(\'payframe\'));">x</div><iframe id="iframe"
style="opacity: 7; height: 100%; position: relative; background: none;
display: block; border: 0px none transparent; margin-left: 7%; padding:
0px; z-index: 2; width: 65%; margin-top: 0%" allowtransparency="true"
frameborder="0" allowpaymentrequest="true"
src="<%=pipe.getWebAddress()%>"></iframe>';

document.body.appendChild(division);

</script>

else

response.sendRedirect(pipe.getWebAddress());

© 2020 API Guide Page 59 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Attribute - Final URL redirection response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 paymentId M Numeric Unique payment Id generated by PG and
merchant can use this ID to match the
response from PG
2 trandata C Alphanum All the below response parameters
encrypted and send the encrypted value
in trandata
3 error C Alphanum If any error, PG will send the error code

4 errorText C Alphanum If any error, PG will send the error


description

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by payment


gateway. Based on this payment Id
merchant can match the final URL
redirection response
2 result M Alphanum Transaction status . Value will be
'CAPTURED' for purchase successful
and 'APPROVED' for authorization
successful.
3 ref M Numeric Transaction reference number (RRN)

Unique Customer ID generated on


4 fcCustId M Numeric
faster checkout registration.
5 transId M Numeric Unique transaction Id generated by
Payment gateway and merchant can
use this id for initiating supported
transactions (Void, refund and
inquiry)
6 date M Numeric Transaction date and time

7 trackId M Numeric Merchant unique reference no

© 2020 API Guide Page 60 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

8 udf1 O Alphanum The user (merchant) defines these


fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
9 udf2 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
10 udf3 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
11 udf4 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
12 udf5 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
13 amt M Numeric Transaction amount

14 authRespCode M Numeric Auth response code provided by PG

15 authCode M Numeric 6 digit authorization code received


from switch
16 actionCode M Alphanume Action code of transaction. Possible
ric Values

© 2020 API Guide Page 61 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
17 card C AlPhanume Card Number used for Performing
ric Transaction
18 expMonth C AlPhanume Expiry Month of the Card
ric
19 expYear C AlPhanume Expiry Year of the Card
ric

Sample JSON Response - Final

If Merchant notification is disabled, then ARB Payment gateway will provide the final
response in URL redirection. Below is the sample response from ARB PG to merchant

[{

//Redirection Parameters

“paymentId”:”100201935166676976”,

“trandata”:”<encrypted trandata>”,

“error”:””,

“errorText”:””

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:”100201935166676976”,

© 2020 API Guide Page 62 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”result”:”CAPTURED”,

”transId”:”201935166561122”,

"fcCustId":"201936122890007",

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 63 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Transaction (3D Secure)

The merchant will collect the customer’s card details on their own website hence, the customer
will not be redirected to the ARB payment gateway payment page, as the payment option and
card details are already received by merchant. The card details are later posted to ARB
payment gateway.

© 2020 API Guide Page 64 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

This section illustrates how you can integrate the merchant hosted flow on your website
application.

1. User visits the merchant application and creates order.


2. User enters the payment details.
3. Merchant application backend server calls Payment Token Generation API to get
the transaction token.
4. ARB Payment gateway internally validates the request.

 In case of successful validation, ARB PG provides Payment ID and Payment


Processing Page URL in the response.
- Merchant needs to frame the payment processing page URL with Payment ID,
Hence the ARB payment processing page is displayed.
 In case of failure, ARB PG provides Error Code and Description.

5. Upon authorization, the customer redirects to ARB Payment gateway.

The flow takes the user to the login ACS page of the bank, where the user needs to
complete the transaction by using the OTP sent by the bank to the registered mobile
number. PG then process for authorization with the respective schemes. Once payment
response received from respective scheme, then ARB Payment gateway returns the
response to merchant. This is URL redirection.

6. After authorization, the ARB PG application process the transaction and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
7. Merchant server calls the transaction status API to verify the transaction response.
8. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 65 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the


1 id M Alphanum
Tranportal id from Merchant portal
All the below request parameters
2 trandata M Alphanum encrypted and pass the encrypted value in
trandata.
responseUR The merchant success URL where Payment
3 M Alphanum
L Gateway send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4

3 password M Alphanum Tranportal password. Merchant


download the same in merchant portal.

4 id M Alphanum Tranportal ID. Merchant download the


same in merchant portal

5 currencyC M Numeric 3-digit currency code of KSA. Ex:682


ode

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these


fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field left blank when
no data needs to be passed.

© 2020 API Guide Page 66 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

8 udf2 O Alphanum The user (merchant) defines these


fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field left blank when
no data needs to be passed.

9 udf4 O Alphanum The user (merchant) defines these


fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field left blank when
no data needs to be passed.

10 udf3 O Alphanum The user (merchant) defines these


fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field left blank when
no data needs to be passed.

11 udf5 O Alphanum The user (merchant) defines these


fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

12 response M Alphanum The merchant success URL where


URL Payment Gateway send the notification
request.

13 errorURL M Alphanum The merchant error URL where Payment


Gateway send the response in case any
error while Processing the transaction.

14 expYear M Numeric Expiry year of card

15 expMonth M Numeric Expiry month of card

16 member M Alphanum Card holder name

17 cvv2 M Numeric CVV of the card

18 cardNo M Numeric Cardholders card number

19 cardType M Alphanum Card type Ex : Credit card – C, Debit Card –


D

© 2020 API Guide Page 67 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

20 browserLa M Alphanum Value representing the browser language


nguage Returned from "navigator.language"
property. Length 1 to 8 characters.

21 browserCol M Alphanum Value representing the bit depth of the colour


orDepth palette for displaying images, in bits per
pixel. Obtained from Cardholder browser
using the "screen.colorDepth" property.
Length 1 to 2 characters.

Values Accepted :

1 = 1 bit
4 = 4 bits
8 = 8 bits
15 = 15 bits
16 = 16 bits
24 = 24 bits
32 = 32 bits
48 = 48 bits

22 browserScr M Alphanum Total height of the Cardholder’s screen in


eenHeight pixels. Value is returned from the
screen.height property. Length 1 to 6
characters.

23 browserScr M Alphanum Total width of the cardholder’s screen in


eenWidth pixels. Value is returned from the
screen.width property. Length 1 to 6
characters.

24 browserJav M Alphanum Value is returned from the


aEnabled navigator.javaEnabled property. Boolean
value.

25 browserTZ M Alphanum Time difference between UTC time and the


Cardholder browser local time, in minutes.
Value is returned from the
getTimezoneOffset() method. Length 1 to 5
characters.

26 jsEnabled M Alphanum Value whether the java script is enabled in


browser or not.

Sample JSON request - Request from Merchant to ARB PG

[{

© 2020 API Guide Page 68 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata:

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource key.

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

© 2020 API Guide Page 69 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

"browserJavaEnabled":"true",

"browserLanguage":"en",

"browserColorDepth":"48",

"browserScreenHeight":"400",

"browserScreenWidth":"600",

"browserTZ":"0",

"jsEnabled":"true",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

}]

Credit Card Installment Transactions

Detailed description of Plain Trandata request parameters

S.No Fields M/C Field Type Description


/O
1 udf6 C Alphanum Credit Card Installment Short Code

2 udf7 C Alphanum Credit Card Installment Type

Sample JSON request - Request from Merchant to ARB PG

© 2020 API Guide Page 70 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

//conditional - Credit Card Installment Transactions

"udf6":"12345",

"udf7":"C",

Payout Future

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

Conditional if Merchant Opted for Payout


JSON future.
1 accountDetails C
Array
Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//conditional if Merchant opted for Payout Future.

"accountDetails":[

{"bankIdCode": "12345d6f", "iBanNum":


"567896743281926354276254","benificiaryName":"AlRajhi Bank Services",
"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode": "1234ret3", "iBanNum":


"987656743281926354276254","benificiaryName":"DIGITAL CO",
"serviceAmount":"300.00","valueDate":"20201231" }],

© 2020 API Guide Page 71 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY'
'PAY_SAVE' 'ADVANCE' 'PARTIAL_PAYMENT'
'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in
advance - POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

© 2020 API Guide Page 72 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Airline

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 airline C JSON Object Conditional - for Airline Merchant

1.1 bookingReferenc C Alphanum The booking reference number


e

1.1.1 itinerary C JSON Object Conditional - for Airline Merchant

1.1.1.1 leg C JSON Array Conditional - for Airline Merchant

1.1.1.1.1 carrierCode C Alphanum The carrier code for the leg

1.1.1.1.2 departureAirport C Alphanum The departure airport for the passenger


1.1.1.1.3 departureDate C Alphanum The departure date for the leg
1.1.1.1.4 departureTime C Alphanum The departure airport for the passenger
1.1.1.1.5 destinationAirpo C Alphanum The destination airport for the leg
rt
1.1.1.1.6 destinationArriva C Alphanum The arrival date for the leg
lDate
1.1.1.1.7 destinationArriva C Alphanum The arrival time for the leg
lTime
1.1.1.1.8 fareBasis C Alphanum The fare basis for the leg
1.1.1.1.9 flightNumber C Alphanum The flight number for the leg
1.1.1.1.10 travelClass C Alphanum The class of service for the leg
1.1.1.2 numberInParty C Alphanum
1.1.1.3 originCountry C Alphanum The origin Country of the itinerary
1.1.2 passenger C JSON Array Conditional - for airline merchant
1.1.2.1 firstName C Alphanum The passenger first name
1.1.2.2 lastName C Alphanum The passenger last name
1.1.3 ticket C JSON Object Conditional - for airline merchant
1.1.3.1 issue C JSON Object Conditional - for airline merchant
1.1.3.1.1 carrierCode C Alphanum Code of the airline that issuing the ticket
1.1.3.1.2 carrierName C Alphanum Name of the airline that is issuing the ticket.
1.1.3.1.3 travelAgentCode C Alphanum Code of the Travel Agent that issuing the ticket
1.1.3.1.4 travelAgentNam C Alphanum Name of the Travel Agent that issuing the
e ticket
1.1.3.2 totalFare C Numeric Ticket Total Fare

© 2020 API Guide Page 73 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1.1.3.3 totalFees C Numeric Total fee for the ticket.


1.1.3.4 totalTaxes C Numeric Tax portion of the order amount.

Sample JSON request - Request from Merchant to ARB PG

//conditional - for airline merchant

{ "airline": { "bookingReference": "5WPU68", "itinerary": { "leg": [ {


"carrierCode": "MH", "departureAirport": "MNL", "departureDate": "2021-05-11",
"departureTime": "06:50:00Z", "destinationAirport": "KUL",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "10:35:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0805", "travelClass": "B" }, {
"carrierCode": "UL", "departureAirport": "KUL", "departureDate": "2021-05-11",
"departureTime": "15:00:00Z", "destinationAirport": "CMB",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "16:05:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0315", "travelClass": "B" } ],
"numberInParty": "1", "originCountry": "PHL" }, "passenger": [ { "firstName":
"KAI MR", "lastName": "QIAN" } ], "ticket": { "issue": { "carrierCode": "UL",
"carrierName": "SRILANKANAIRLINES", "travelAgentCode": "91401483",
"travelAgentName": "MANUL08AE" }, "totalFare": "54918.00", "totalFees":
"59518.00", "totalTaxes": "4600.00" } } }

}]

© 2020 API Guide Page 74 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Processing


Page URL

Attributes - Initial Response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then


status will be ‘1’. If the validation failed,
then status will be ‘2’
2 result C Alphanum It contains payment ID and Payment URL if
the validation success else this will be null
3 error C Alphanum If validation failed, then Payment gateway
will provide the respective error code
4 errorText C Alphanum If validation failed, then Payment gateway
will provide the respective error description

Sample JSON Response - Initial Response from ARB PG to Merchant

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response in case of successful validation, if failure then error code and
description will be provided.

Success:

[{

"status": "1",

"result":"700212030953264091:https://securepayments.alrajhibank.com.sa/p
g/TranportalVbv.htm?paymentId=700212030953264091&id=r9Ht8R4U6g9dYtY",
//Payment ID:Payment URL

“error”:null,

“errorText”: null

}]

© 2020 API Guide Page 75 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

“errorText”: ”Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL

After Initial Response from ARB PG, merchant needs to frame the payment page URL like the
below sample.

https://securepayments.alrajhibank.com.sa/pg/TranportalVbv.htm?paymentId=700112030
953264091&id=r9Ht8R4U6g9dYtYg

© 2020 API Guide Page 76 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Merchant needs to redirects the customer to ARB Payment gateway.

The flow takes the user to the login ACS page of the bank, where the user needs to
complete the transaction by using the OTP sent by the bank to the registered mobile
number. PG then process for authorization with the respective schemes. Once payment
response received from respective scheme, then ARB Payment gateway returns the
response to merchant. This is URL redirection.

Attribute - Final URL redirection response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 paymentId M Numeric Unique ID generated by Payment gateway.
Merchant can store the payment ID to match
the final URL redirection response
2 trandata C Alphanum All the below response parameters
encrypted and send the encrypted value in
trandata
Ex:
[{“paymentId”:1002019351666769
76,”result”:”CAPTURED”,”ref”:”
935110000001”,”transId”:201935
166561122,”date”:1217,”trackId
”:”1003383844”,”udf1”:””,”udf2
”:””,”udf3”:”8870091137”,”udf4
”:”FC”,”udf5”:”Tidal5”,”amt”:”
70.0,”authRespCode”,”00”}]

3 Error C Numeric If any error, PG will provide the error code

4 ErrorText C Alphanum PG will provide the error description if any


transaction declined.

© 2020 API Guide Page 77 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description


Unique ID generated by payment
gateway. Based on this payment
1 paymentId M Numeric
Id merchant can match the final
URL redirection response
Transaction status . Value will be
'CAPTURED' for purchase
2 result M Alphanum
successful and 'APPROVED' for
authorization successful.
Transaction reference number
3 ref M Numeric
(RRN)
Unique transaction Id generated
by Payment gateway and
4 transId M Numeric merchant can use this id for
initiating supported transactions
(Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines


these fields. The field data is
passed along with a transaction
request and then returned in the
7 udf1 O Alphanum
transaction response. Merchant
should ensure that field is left
blank when no data needs to be
passed.
The user (merchant) defines
these fields. The field data is
passed along with a transaction
request and then returned in the
8 udf2 O Alphanum
transaction response. Merchant
should ensure that field is left
blank when no data needs to be
passed.
The user (merchant) defines
these fields. The field data is
passed along with a transaction
request and then returned in the
9 udf3 O Alphanum
transaction response. Merchant
should ensure that field is left
blank when no data needs to be
passed.

© 2020 API Guide Page 78 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


The user (merchant) defines
these fields. The field data is
passed along with a transaction
request and then returned in the
10 udf4 O Alphanum
transaction response. Merchant
should ensure that field is left
blank when no data needs to be
passed.
The user (merchant) defines
these fields. The field data is
passed along with a transaction
request and then returned in the
11 udf5 O Alphanum
transaction response. Merchant
should ensure that field is left
blank when no data needs to be
passed.

12 amt M Numeric Transaction amount

Auth response code provided by


13 authRespCode M Numeric
PG
6 digit authorization code
14 authCode M Numeric
received from switch
Card Brand name . Value will be
15 cardType M Alphabetic "Visa" or "MasterCard" or
"Mada".

16 actionCode M Alphanume Action code of transaction.


ric Possible Values
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization
Extension(MADA)
17 card C AlPhanume Card Number used for
ric Performing Transaction
18 expMonth C AlPhanume Expiry Month of the Card
ric
19 expYear C AlPhanume Expiry Year of the Card
ric

© 2020 API Guide Page 79 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample JSON Response - Final

If Merchant notification is disabled, then ARB Payment gateway will provide the final
response in URL redirection. Below is the sample response from ARB PG to merchant

[{

“paymentId”:”100201935044735860”,

"trandata": "<encrypted trandata>",

“Error”:””,

“ErrorText”:””

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:”100201935166676976”,

”result”: ”CAPTURED”,

”transId”:201935166561122,

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

© 2020 API Guide Page 80 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 81 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Transaction (Non 3D Secure)

This section illustrates how you can integrate the merchant hosted flow (Non 3D Secure) on
your website application.

© 2020 API Guide Page 82 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1. User visits the merchant application and creates order.


2. User enters the payment details.
3. Merchant application backend server calls Payment Token Generation API to get
the transaction token and to process payment via Alrajhi Payment gateway
4. After authorization, the ARB PG application process the transaction and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
5. Merchant server calls the transaction status API to verify the transaction response.
6. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 83 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

1 id M Alphanum Tranportal ID. Merchant can download the


Tranportal id from Merchant portal
2 trandata M Alphanum All the below request parameters
encrypted and pass the encrypted value in
trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanum Tranportal password. Merchant download
the same in merchant portal.
4 id M Alphanum Tranportal ID. Merchant download the same
in merchant portal
5 currencyC M Numeric 3-digit currency code of KSA. Ex:682
ode
6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these fields.


The field data is passed along with a
transaction request and then returned in the
transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
8 udf2 O Alphanum The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in the
transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
9 udf3 O Alphanum The user (merchant) defines these fields.
The field data is passed along with a

© 2020 API Guide Page 84 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

transaction request and then returned in the


transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
10 udf4 O Alphanum The user (merchant) defines these
fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field left blank when
no data needs to be passed.
11 udf5 O Alphanum The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in the
transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
12 expYear M Numeric Expiry year of card

13 expMonth M Numeric Expiry month of card

14 member M Alphanum Card holder name

15 cvv2 M Numeric CVV of the card

16 cardNo M Numeric Cardholders card number

17 cardType M Alphanum Card type Ex : Credit card – C, Debit Card -


D

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

Plain Trandata:

[{

© 2020 API Guide Page 85 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

}]

© 2020 API Guide Page 86 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Payout Future

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

Conditional if Merchant Opted for Payout


JSON future.
1 accountDetails C
Array
Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//conditional if Merchant opted for Payout Future.

"accountDetails":[

{"bankIdCode": "12345d6f", "iBanNum":


"567896743281926354276254","benificiaryName":"AlRajhi Bank Services",
"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode": "1234ret3", "iBanNum":


"987656743281926354276254","benificiaryName":"DIGITAL CO",
"serviceAmount":"300.00","valueDate":"20201231" }],

© 2020 API Guide Page 87 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY'
'PAY_SAVE' 'ADVANCE' 'PARTIAL_PAYMENT'
'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in
advance - POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

© 2020 API Guide Page 88 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Airline

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 airline C JSON Object Conditional - for Airline Merchant

1.1 bookingReferenc C Alphanum The booking reference number


e

1.1.1 itinerary C JSON Object Conditional - for Airline Merchant

1.1.1.1 leg C JSON Array Conditional - for Airline Merchant

1.1.1.1.1 carrierCode C Alphanum The carrier code for the leg

1.1.1.1.2 departureAirport C Alphanum The departure airport for the passenger


1.1.1.1.3 departureDate C Alphanum The departure date for the leg
1.1.1.1.4 departureTime C Alphanum The departure airport for the passenger
1.1.1.1.5 destinationAirpo C Alphanum The destination airport for the leg
rt
1.1.1.1.6 destinationArriva C Alphanum The arrival date for the leg
lDate
1.1.1.1.7 destinationArriva C Alphanum The arrival time for the leg
lTime
1.1.1.1.8 fareBasis C Alphanum The fare basis for the leg
1.1.1.1.9 flightNumber C Alphanum The flight number for the leg
1.1.1.1.10 travelClass C Alphanum The class of service for the leg
1.1.1.2 numberInParty C Alphanum
1.1.1.3 originCountry C Alphanum The origin Country of the itinerary
1.1.2 passenger C JSON Array Conditional - for airline merchant
1.1.2.1 firstName C Alphanum The passenger first name
1.1.2.2 lastName C Alphanum The passenger last name
1.1.3 ticket C JSON Object Conditional - for airline merchant
1.1.3.1 issue C JSON Object Conditional - for airline merchant
1.1.3.1.1 carrierCode C Alphanum Code of the airline that issuing the ticket
1.1.3.1.2 carrierName C Alphanum Name of the airline that is issuing the ticket.
1.1.3.1.3 travelAgentCode C Alphanum Code of the Travel Agent that issuing the ticket
1.1.3.1.4 travelAgentNam C Alphanum Name of the Travel Agent that issuing the
e ticket
1.1.3.2 totalFare C Numeric Ticket Total Fare

© 2020 API Guide Page 89 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1.1.3.3 totalFees C Numeric Total fee for the ticket.


1.1.3.4 totalTaxes C Numeric Tax portion of the order amount.

Sample JSON request - Request from Merchant to ARB PG

//conditional - for airline merchant

{ "airline": { "bookingReference": "5WPU68", "itinerary": { "leg": [ {


"carrierCode": "MH", "departureAirport": "MNL", "departureDate": "2021-05-11",
"departureTime": "06:50:00Z", "destinationAirport": "KUL",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "10:35:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0805", "travelClass": "B" }, {
"carrierCode": "UL", "departureAirport": "KUL", "departureDate": "2021-05-11",
"departureTime": "15:00:00Z", "destinationAirport": "CMB",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "16:05:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0315", "travelClass": "B" } ],
"numberInParty": "1", "originCountry": "PHL" }, "passenger": [ { "firstName":
"KAI MR", "lastName": "QIAN" } ], "ticket": { "issue": { "carrierCode": "UL",
"carrierName": "SRILANKANAIRLINES", "travelAgentCode": "91401483",
"travelAgentName": "MANUL08AE" }, "totalFare": "54918.00", "totalFees":
"59518.00", "totalTaxes": "4600.00" } } }

}]

© 2020 API Guide Page 90 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

The ARB payment gateway verifies the transaction and returns the response to the same
request.

Attribute - Final response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 trandata M AlphaNum All the below response parameters will be
provided in trandata field
2 error C Alphanum If any error during processing, PG will
provide the error code
3 errorText C Alphanum If any error during processing, PG will
provide the error description
4 status M Alphanum If transaction success 1.
If transaction failure 2.

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description


Unique ID generated by payment gateway.
1 paymentId M Numeric Based on this payment Id merchant can
match the final URL redirection response
Transaction status . Value will be
2 result M Alphanum 'CAPTURED' for purchase successful and
'APPROVED' for authorization successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by


Payment gateway and merchant can use
4 transId M Numeric
this id for initiating supported transactions
(Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields.


The field data is passed along with a
transaction request and then returned in
7 udf1 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.

© 2020 API Guide Page 91 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
8 udf2 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
9 udf3 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
10 udf4 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
11 udf5 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.

12 amt M Numeric Transaction amount

13 authRespCode M Numeric Auth response code provided by PG

6 digit authorization code received from


14 authCode M Numeric
switch
Card Brand name . Value will be "Visa" or
15 cardType M Alphabetic
"MasterCard" or "Mada".

16 actionCode M Alphanume Action code of transaction. Possible


ric Values
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)

© 2020 API Guide Page 92 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

17 card C AlPhanume Card Number used for Performing


ric Transaction
18 expMonth C AlPhanume Expiry Month of the Card
ric
19 expYear C AlPhanume Expiry Year of the Card
ric

Sample JSON Response - Final

The ARB payment gateway verifies the transaction and returns the response to the same
request.

[{

“tranid”: “201931951332346”,

"trandata": "<encrypted trandata>",

“status”:”1”, //1 for success transaction, 2 for failure transaction

“error”:null,

“errorText”: null

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:-1,

”result”:”CAPTURED”,

”amt”:”10.55”,

”date”:”1221”,

”ref”:”935110000001”,

”udf1”:”udf1text”,

© 2020 API Guide Page 93 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234”,

“authRespCode”:”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1”

}]

© 2020 API Guide Page 94 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Card on File Transactions (3D


secure)

© 2020 API Guide Page 95 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1. User visits the merchant application and creates order.


2. User enters the payment card details.
3. The card details are saved as token with the merchant as well the card registration
information is later posted to PG.
4. The Merchant application backend server calls Payment Token Generation API to
get the transaction token.
5. ARB Payment gateway internally validates the request.

 In case of successful validation, ARB PG provides Payment ID and Payment


Processing Page URL in the response.
- Merchant needs to frame the payment processing page URL with Payment ID,
Hence the ARB payment processing page is displayed.
 In case of failure, ARB PG provides Error Code and Description.

6. Upon authorization, the customer redirects to ARB Payment gateway.

The flow takes the user to the login ACS page of the bank, where the user needs to
complete the transaction by using the OTP sent by the bank to the registered mobile
number. PG then process for authorization with the respective schemes. Once payment
response received from respective scheme, then ARB Payment gateway returns the
response to merchant. This is URL redirection.

7. After authorization, the ARB PG application process the transaction and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
8. Merchant server calls the transaction status API to verify the transaction response.
9. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 96 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Saving Cards During Transaction (Card Registration)

When the merchant hosted transaction is in progress, the sensitive card information entered
by the customer is saved as token in the PCI compliant merchant’s database as well the
information is later posted to PG. The next time the customer makes any transactions, the
customer can pay directly by entering the CVV of the card and OTP received.

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanum Tranportal ID. Merchant can download the Tranportal


id from Merchant portal
2 trandata M Alphanum All the below request parameters encrypted and pass
the encrypted value in trandata.
3 responseURL M Alphanum The merchant success URL where Payment Gateway
send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain trandata request parameters

S.No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanum Tranportal password. Merchant download the same in
merchant portal.
4 id M Alphanum Tranportal ID. Merchant download the same in
merchant portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field left blank when no data needs to be
passed.
8 udf2 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field left blank when no data needs to be
passed.

© 2020 API Guide Page 97 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Fields M/C/O Field Type Description

9 udf3 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field left blank when no data needs to be
passed.
10 udf5 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
11 responseURL M Alphanum The merchant success URL where Payment Gateway
send the notification request.
12 errorURL M Alphanum The merchant error URL where Payment Gateway send
the response in case any error while Processing the
transaction.
13 expYear M Numeric Expiry year of card

14 expMonth M Numeric Expiry month of card

15 member M Alphanum Card holder name

16 cvv2 M Numeric CVV of the card

17 cardNo M Numeric Cardholders card number

18 cardType M Alphanum Card type Ex : Credit card – C, Debit Card – D

Card on File action .Mandatory field for Card On File.


cardOnFileAct
19 M Alphanum Value should be "transaction" for Card On File
ion
transactions.
Card on File Token . Unique token ID (customer ID)
generated by PG per customer when customer saves
cardOnFileTok
20 C Numeric the first card . Merchant needs to send this field only
en
for saving subsequent cards for the customer and for
transaction using saved cards.
21 browserLangu M Alphanu Value representing the browser language Returned
age m from "navigator.language" property. Length 1 to 8
characters.
22 browserColor M Alphanu Value representing the bit depth of the colour palette for
Depth m displaying images, in bits per pixel. Obtained from
Cardholder browser using the "screen.colorDepth"
property. Length 1 to 2 characters.

Values Accepted :

© 2020 API Guide Page 98 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Fields M/C/O Field Type Description

1 = 1 bit
4 = 4 bits
8 = 8 bits
15 = 15 bits
16 = 16 bits
24 = 24 bits
32 = 32 bits
48 = 48 bits
23 browserScree M Alphanu Total height of the Cardholder’s screen in pixels. Value
nHeight m is returned from the screen.height property. Length 1 to
6 characters.
24 browserScree M Alphanu Total width of the cardholder’s screen in pixels. Value is
nWidth m returned from the screen.width property. Length 1 to 6
characters.
25 browserJavaE M Alphanu Value is returned from the navigator.javaEnabled
nabled m property. Boolean value.

26 browserTZ M Alphanu Time difference between UTC time and the Cardholder
m browser local time, in minutes. Value is returned from
the getTimezoneOffset() method. Length 1 to 5
characters.
27 jsEnabled M Alphanu Value whether the java script is enabled in browser or
m not.

Request from Merchant to ARB Payment gateway:

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata

© 2020 API Guide Page 99 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource key.

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

"cardOnFileAction":"transaction",

"browserJavaEnabled":"true",

"browserLanguage":"en",

"browserColorDepth":"48",

"browserScreenHeight":"400",

"browserScreenWidth":"600",

"browserTZ":"0",

© 2020 API Guide Page 100 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"jsEnabled":"true",

//Conditional - To be excluded when a customer saves first card. Required


for saving subsequent cards for a customer.

"cardOnFileToken":"201936122890007",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”

}]

© 2020 API Guide Page 101 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanum Tranportal ID. Merchant can download the Tranportal id


from Merchant portal
2 trandata M Alphanum All the below request parameters encrypted and pass
the encrypted value in trandata.
3 responseURL M Alphanum The merchant success URL where Payment Gateway
send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain trandata request parameters

S.No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanum Tranportal password. Merchant download the same in
merchant portal.
4 id M Alphanum Tranportal ID. Merchant download the same in
merchant portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field left blank when no data needs to be
passed.
8 udf2 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field left blank when no data needs to be
passed.
9 udf3 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field left blank when no data needs to be
passed.

© 2020 API Guide Page 102 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Fields M/C/O Field Type Description

10 udf5 O Alphanum The user (merchant) defines these fields. The field data
passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
11 responseURL M Alphanum The merchant success URL where Payment Gateway
send the notification request.
12 errorURL M Alphanum The merchant error URL where Payment Gateway send
the response in case any error while Processing the
transaction.
13 member M Alphanum Card holder name

14 cvv2 M Numeric CVV of the card

15 cardType M Alphanum Card type Ex : Credit card – C, Debit Card – D

Card on File action .Mandatory field for Card On File.


cardOnFileAct
16 M Alphanum Value should be "transaction" for Card On File
ion
transactions
Card on File Token . Unique token ID (customer ID)
cardOnFileTok
17 M Numeric generated by PG per customer when customer saves
en
the first card .
maskedCardN Masked card number for card on file . First 6 and last 4
18 M Alphanum
o digits visible.
19 browserLangu M Alphanu Value representing the browser language Returned
age m from "navigator.language" property. Length 1 to 8
characters.
20 browserColor M Alphanu Value representing the bit depth of the colour palette for
Depth m displaying images, in bits per pixel. Obtained from
Cardholder browser using the "screen.colorDepth"
property. Length 1 to 2 characters.

Values Accepted :

1 = 1 bit
4 = 4 bits
8 = 8 bits
15 = 15 bits
16 = 16 bits
24 = 24 bits
32 = 32 bits
48 = 48 bits

© 2020 API Guide Page 103 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Fields M/C/O Field Type Description

21 browserScree M Alphanu Total height of the Cardholder’s screen in pixels. Value


nHeight m is returned from the screen.height property. Length 1 to
6 characters.
22 browserScree M Alphanu Total width of the cardholder’s screen in pixels. Value is
nWidth m returned from the screen.width property. Length 1 to 6
characters.
23 browserJavaE M Alphanu Value is returned from the navigator.javaEnabled
nabled m property. Boolean value.

24 browserTZ M Alphanu Time difference between UTC time and the Cardholder
m browser local time, in minutes. Value is returned from
the getTimezoneOffset() method. Length 1 to 5
characters.
25 jsEnabled M Alphanu Value whether the java script is enabled in browser or
m not.

Request from Merchant to ARB Payment gateway:

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource key.

[{ //Mandatory Parameters

“amt”:”12.00”,

© 2020 API Guide Page 104 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardType”:”C”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

"cardOnFileAction":"transaction",

"cardOnFileToken":"201936122890007",

"maskedCardNo":"545301******5539",

"browserJavaEnabled":"true",

"browserLanguage":"en",

"browserColorDepth":"48",

"browserScreenHeight":"400",

"browserScreenWidth":"600",

"browserTZ":"0",

"jsEnabled":"true",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

© 2020 API Guide Page 105 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”udf4”:”udf4text”,

”udf5”:”udf5text”

}]

© 2020 API Guide Page 106 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Page URL

Initial Response from PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then status will be ‘1’.
If the validation failed, then status will be ‘2’
2 result C Alphanu It contains payment ID and Payment URL if the
m validation success else this will be null
3 error C Alphanu If validation failed, then Payment gateway will provide
m the respective error code
4 errorText C Alphanu If validation failed, then Payment gateway will provide
m the respective error description

Plain Response:

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response if the validation success. If failure then, Error code and
description will be provided.

Success:

[{

"status": "1",

"result":"700212030953264091:https://securepayments.alrajhibank.com.sa/pg/
TranportalVbv.htm?paymentId=700212030953264091&id=r9Ht8R4U6g9dYtY",
//Payment ID:Payment URL

“error”:null,

“errorText”: null

}]

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

© 2020 API Guide Page 107 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

“errorText”:” Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL

Merchant needs to frame the URL like the below sample

https://securepayments.alrajhibank.com.sa/pg/TranportalVbv.htm?paymentId=700112030
953264091&id=r9Ht8R4U6g9dYtYg

© 2020 API Guide Page 108 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Merchant needs to redirects the customer to ARB Payment gateway.

Customer browser will redirect to ACS page and will complete the authentication. PG then process for
authorization with the respective schemes. Once payment response received from respective scheme,
then ARB Payment gateway returns the response to merchant. This is URL redirection. Below is sample
response from ARB PG to merchant,

Final Response from ARB payment gateway to Merchant

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by Payment gateway. Merchant can


store the payment ID to match the final URL redirection
response
2 trandata C Alphanu All the response parameters encrypted and sent in
m encrypted value in trandata
3 Error C Numeric If any error, PG will provide the error code
4 ErrorText C Alphanu PG will provide the error description if any transaction
m declined.

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description

Unique ID generated by payment gateway. Based on this


1 paymentId M Numeric payment Id merchant can match the final URL
redirection response
Transaction status . Value will be 'CAPTURED' for
Alphanu
2 result M purchase successful and 'APPROVED' for authorization
m
successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by Payment gateway


4 transId M Numeric and merchant can use this id for initiating supported
transactions (Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
7 udf1 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 109 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
8 udf2 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
9 udf3 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
10 udf5 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

11 amt M Numeric Transaction amount

authRespCod
12 M Numeric Auth response code provided by PG
e

13 authCode M Numeric 6 digit authorization code received from switch

14 cardType M Alphabet Card Brand name . Value will be "Visa" or "MasterCard"


ic or "Mada".
Unique token ID (customer ID) generated by PG per
cardOnFileTok customer when customer saves the first card . This
15 M Numeric
en should be sent in merchant request when the customer
saves the subsequent cards next time.
maskedCardN AlphaNu Masked card number for card on file transactions. First
16 M
o m 6 digits and last 4 digits will be visible.
17 actionCode M Alphanu Action code of transaction. Possible Values
meric
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
18 card C AlPhanu Card Number used for Performing Transaction
meric
19 expMonth C AlPhanu Expiry Month of the Card
meric
20 expYear C AlPhanu Expiry Year of the Card
meric

© 2020 API Guide Page 110 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample JSON Response - Final

Redirection Parameters

[{

“paymentId”:”100201935044735860”,

"trandata": "<encrypted trandata>",

“Error”:””,

“ErrorText”:””

}]

Plain Trandata

[{“paymentId”:”100201935044735860”,

”result”: ”CAPTURED”,

”amt”:”10.55”,

”date”:1221,

”ref”:”935110000001”,

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234",

“authRespCode”:”00”,

"authCode":"000000",

© 2020 API Guide Page 111 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"cardType":"Visa",

"cardOnFileToken":"201936122890007",

"maskedCardNo":"545301******5539"

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 112 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Card on File Transactions


(Non-3D secure)

1. User visits the merchant application and creates order.


2. User enters the payment card details.
3. The card details are saved as card registration token and posted to PG.
4. Merchant application backend server calls Payment Token Generation API to get
the transaction token and to process payment via Alrajhi Payment gateway
5. After authorization, the ARB PG application process the transaction and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
6. Merchant server calls the transaction status API to verify the transaction response.
7. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 113 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Saving Cards During Transaction (Card Registration)

When the merchant hosted transaction is in progress, the sensitive card information entered
by the customer is saved as token in the PCI compliant merchant’s database as well the
information is later posted to PG. The next time the customer makes any transactions, the
customer can pay directly by entering the CVV of the card.

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanu Tranportal ID. Merchant can download the Tranportal id


m from Merchant portal
2 trandata M Alphanu All the below request parameters encrypted and pass the
m encrypted value in trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanu Tranportal password. Merchant download the same in
m merchant portal.
4 id M Alphanu Tranportal ID. Merchant download the same in merchant
m portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
8 udf2 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 114 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

9 udf3 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
10 udf5 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
11 expYear M Numeric Expiry year of card

12 expMonth M Numeric Expiry month of card

13 member M Alphanu Card holder name


m
14 cvv2 M Numeric CVV of the card

15 cardNo M Numeric Cardholders card number

16 cardType M Alphanu Card type Ex : Credit card – C, Debit Card - D


m
Card on File action .Mandatory field for Card On File.
cardOnFileAct Alphanu
17 M Value should be "transaction" for Card On File
ion m
transactions
Card on File Token . Unique token ID (customer ID)
generated by PG per customer when customer saves the
cardOnFileTok
18 C Numeric first card . Merchant needs to send this field only for
en
saving subsequent cards for the customer and for
transaction using saved cards.

Below is the sample encrypted request from Merchant to PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

© 2020 API Guide Page 115 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Below are the plain Trandata request

[{

//Mandatory Parameters
“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization


”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C",

"cardOnFileAction":"transaction",

//Conditional - To be excluded for saving first card for a customer .


Required for saving subsequent cards for the customer.
"cardOnFileToken":"201936122890007",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”

}]

© 2020 API Guide Page 116 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanu Tranportal ID. Merchant can download the Tranportal id


m from Merchant portal
2 trandata M Alphanu All the below request parameters encrypted and pass the
m encrypted value in trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanu Tranportal password. Merchant download the same in
m merchant portal.
4 id M Alphanu Tranportal ID. Merchant download the same in
m merchant portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
8 udf2 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
9 udf3 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 117 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

10 udf5 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
11 member M Alphanu Card holder name
m
12 cvv2 M Numeric CVV of the card

13 cardType M Alphanu Card type Ex : Credit card – C, Debit Card - D


m
Card on File action .Mandatory field for Card On File.
cardOnFileAct Alphanu
14 M Value should be "transaction" for Card On File
ion m
transactions
Card on File Token . Unique token ID (customer ID)
cardOnFileTok
15 M Numeric generated by PG per customer when customer saves
en
the first card .
maskedCardN Alphanu Masked card number for card on file. First 6 and last 4
16 M
o m digits visible.

Below is the sample encrypted request from Merchant to PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

Below are the plain Trandata request

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

© 2020 API Guide Page 118 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardType”:”C",

"cardOnFileAction":"transaction",

"cardOnFileToken":"201936122890007",

"maskedCardNo":"545301******5539",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”

}]

© 2020 API Guide Page 119 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Once ARB payment gateway verifies the transaction and returns the response to the same request.

Response from ARB Payment Gateway to Merchant

S. No Fields M/C/O Field Type Description

1 trandata M AlphaNu All the response parameters will be provided in trandata


m field
2 error C Alphanu If any error during processing, PG will provide the error
m code
3 errorText C Alphanu If any error during processing, PG will provide the error
m description
4 status M Alphanu If transaction success 1.
m If transaction failure 2.

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description

Unique ID generated by payment gateway. Based on this


1 paymentId M Numeric payment Id merchant can match the final URL
redirection response
Transaction status . Value will be 'CAPTURED' for
Alphanu
2 result M purchase successful and 'APPROVED' for authorization
m
successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by Payment gateway


4 transId M Numeric and merchant can use this id for initiating supported
transactions (Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
7 udf1 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
8 udf2 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 120 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
9 udf3 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
10 udf5 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

11 amt M Numeric Transaction amount

authRespCod
12 M Numeric Auth response code provided by PG
e

13 authCode M Numeric 6 digit authorization code received from switch

14 cardType M Alphabet Card Brand name . Value will be "Visa" or "MasterCard"


ic or "Mada".
Unique token ID (customer ID) generated by PG per
cardOnFileTok customer when customer saves the first card . This
15 M Numeric
en should be sent in merchant request when the customer
saves the subsequent cards next time.
maskedCardN AlphaNu Masked card number for card on file transactions. First
16 M
o m 6 digits and last 4 digits will be visible.
17 actionCode M Alphanu Action code of transaction. Possible Values
meric
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
18 card C AlPhanu Card Number used for Performing Transaction
meric
19 expMonth C AlPhanu Expiry Month of the Card
meric
20 expYear C AlPhanu Expiry Year of the Card
meric

Below is the sample encrypted response from PG to Merchant

[{

© 2020 API Guide Page 121 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

“tranid”: “201931951332346”,

"trandata": "<encrypted trandata>",

“status”:”1”, //1 for success transaction, 2 for failure transaction

“error”:null,

“errorText”: null

}]

Plain trandata in response

[{

“paymentId”:-1,

”result”:”CAPTURED”,

”amt”:”10.55”,

”date”:”1221”,

”ref”:”935110000001”,

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234”,

“authRespCode”:”00”,

© 2020 API Guide Page 122 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"authCode":"000000",

"cardType":"Visa",

"cardOnFileToken":"201936122890007",

"maskedCardNo":"545301******5539"

“actionCode”:”1”

}]

© 2020 API Guide Page 123 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Card on File Registrations


(without transaction)

1. User visits the merchant application and click card registration option.
2. Merchant application backend server calls Card Registration Token Generation API
to get the token and to register the card details in Alrajhi Payment gateway
3. After authorization, the ARB PG application saves the card details and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
4. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 124 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request – Card Registration Token Generation API

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanu Tranportal ID. Merchant can download the Tranportal id


m from Merchant portal
2 trandata M Alphanu All the below request parameters encrypted and pass the
m encrypted value in trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 password M Alphanu Tranportal password. Merchant download the same in


m merchant portal.
2 id M Alphanu Tranportal ID. Merchant download the same in
m merchant portal
3 expYear M Numeric Expiry year of card

4 expMonth M Numeric Expiry month of card

5 cardNo M Numeric Cardholders card number

cardOnFileAct Alphanu Card on File action . Value should be "registration" for


6 M
ion m registration without transaction.
Card on File Token . Unique token ID (customer ID)
cardOnFileTok generated by PG per customer when customer saves
7 C Numeric
en the first card . Merchant needs to send this field only
for saving subsequent cards for the customer.

© 2020 API Guide Page 125 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Below is the sample encrypted request from Merchant to PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

Below are the plain Trandata request

[{

//Mandatory Parameters

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”expYear”:”2022”,

”expMonth”:”12”,

”cardNo”,”5453********5539”,

"cardOnFileAction":"registration",

//conditional Parameter - To be excluded for saving first card for a


customer. Required for saving subsequent cards for the customer.

"cardOnFileToken":"201936122890007"

}]

© 2020 API Guide Page 126 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response – Card Registration Status

Response from ARB payment gateway to Merchant

S. No Fields M/C/O Field Type Description

1 trandata C Alphanu All the below response parameters encrypted and send
m the encrypted value in trandata
2 error C Numeric If any error, PG will provide the error code
3 errorText C Alphanu PG will provide the error description if registration fails.
m
4 status M Numeric 1 for registration success case, 2 for failure case

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description

Card on File Token . Unique token ID (customer ID)


cardOnFileTok
1 M Numeric generated by PG per customer when customer saves
en
the first card .
maskedCardN AlphaNu
2 M Masked card number for card on file.
o m

Below is the sample encrypted response from PG to Merchant

[{ "trandata": "<encrypted trandata>",

“status”:”1”, //1 for registration success case, 2 for failure case

“error”:””,

“errorText”:””

}]

Plain Trandata for PG response to Merchant

[{

"cardOnFileToken":"201936122890007",

"maskedCardNo":"545301******5539"

}]

© 2020 API Guide Page 127 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Card on File Deregistration

1. User visits the merchant application and click card deregistration option.
2. Merchant application backend server calls Card Deregistration Token Generation
API to get the token and to deregister the card details in Alrajhi Payment gateway
3. After authorization, the ARB PG application deletes the card details and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
4. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 128 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request – Card Deregistration Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

1 id M Alphanu Tranportal ID. Merchant can download the Tranportal id


m from Merchant portal
2 trandata M Alphanu All the below request parameters encrypted and pass the
m encrypted value in trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 password M Alphanu Tranportal password. Merchant download the same in


m merchant portal.
2 id M Alphanu Tranportal ID. Merchant download the same in
m merchant portal
cardOnFileAct Alphanu Card on File action. Value should be "deregistration"
3 M
ion m for deregistration of Card on File.
cardOnFileTok Card on File Token. Unique token ID (customer ID)
4 M Numeric
en generated by PG per customer.
maskedCardN Alphanu Card on File masked card number. First 6 digits and
5 M
o m last 4 digits to be visible.

Below is the sample encrypted request from Merchant to PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

© 2020 API Guide Page 129 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Below are the plain Trandata request

[{

//Mandatory Parameters

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

"cardOnFileAction":"deregistration",

"cardOnFileToken":"201936122890007",

"maskedCardNo":"545301******5539"

}]

© 2020 API Guide Page 130 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response – Card Deregistration Status

Response from ARB payment gateway to Merchant

S. No Fields M/C/O Field Type Description

1 error C Numeric If any error, PG will provide the error code


2 errorText C Alphanu PG will provide the error description if deregistration
m fails.
3 status M Numeric 1 for deregistration success case, 2 for failure case

Below is the sample response from PG to Merchant

[{

“status”:”1”, //1 for deregistration success case, 2 for failure case

“error”:””,

“errorText”:””

}]

© 2020 API Guide Page 131 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Transaction Flow (Inquiry,


Void, Refund, Capture Transactions)

 Inquiry Transactions: As an added security measure ARB Payment Gateway allows merchants to
do an inquiry of already completed transaction by passing certain details of the payment message,
ARB Payment Gateway provides response to this request with appropriate fields in the response;
the merchant is expected to verify the relevant fields like Transaction amount, transaction status
and other transaction fields.
 Refund Transactions: Merchant collects the cancellation request and initiate the transaction using
Refund API. Merchant may initiate refund for full amount or partial amount; Payment Gateway will
allow amount until it reached to original transaction amount.
 Authorization Extension Transactions (MADA): As per the current functionality, only MADA is
supporting Authorization Extension. Authorization Extension is nothing but extending the
Authorization period not the Authorized amount.

Transaction Type Action Code


Inquiry 8
void 3
refund 2
capture 5
Void Authorization Transactions (MADA) 9
Authorization Extension transactions (MADA) 14

Note: Capture transactions need to be performed within 7 days.


Auth Extension and refund needs to be performed within 14 days

© 2020 API Guide Page 132 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request

Request from Merchant to ARB Payment Gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanu Tranportal ID. Merchant can download the Tranportal id from


m Merchant portal
2 trandat M Alphanu All the below request parameters encrypted and pass the
a m encrypted value in trandata.

Detailed description of Plain Tran data request parameters

S. No Fields M/C/O Field Type Description

1 id M AlphaNu Unique Tranportal ID.


m
2 password M Alphanu Tranportal password.
m
3 action M Numeric Transaction action
Ex: “2” for Refund
“3” for Void purchase
“8” for Inquiry
'"5" for Capture
“9” for Void Auth – only MADA
“14” for Auth Extension – only MADA
4 amt M Numeric Transaction amount

5 currencyCode M Numeric Currency code of merchant

6 trackId O Numeric A unique tracking id issued by the merchant's system

7 udf5 M Alphanu When merchant want to perform refund/Void/Inquiry/


m Void Auth / Auth Extension based on PaymentID /
TransID / TrackID then merchant need to pass, a word
PaymentID / TRANID/ TrackID in Udf5 field.
8 Customer ID 0 Alphanu When Merchant required to perform Preatuh for
m unschedule transaction
9 transId M Numeric When merchant want to perform refund/Void/Inquiry/
Void Auth/ Auth Extension based on PaymentID /
TransID / TrackID then merchant need to pass the value
of, PaymentID / TRANID/ TrackID in this field

© 2020 API Guide Page 133 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

10 udf10 O Alphanu Applicable only for MADA :


m Need to mention whether the transaction is partial
capture or Full Capture in case of MADA transactions.
Udf10 fields needs to be set as below,

PARTIALCAPTURE for Partial Capture


FINALCAPTURE for Final Capture

Below is the sample encrypted request from Merchant to PG

[{

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

Below are the plain trandata request

Based on TransID (Payment Gateway Transaction ID):

[{

"amt":"70.00",

"action":"<action code>",

"password":"q@a68O$27@JLkcK",

"id":"IPAYlCR6qZF7q6w",

"currencyCode":"682",

"trackId":"696921377",

"udf5":"TRANID",

"transId":"201931951332346",

“udf10”:”FULLCAPTURE” //Applicable only for MADA capture transactions

}]

© 2020 API Guide Page 134 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Based on Payment ID (Payment ID):

[{

"amt":"70.00",

"action":"<action code>",

"password":"q@a68O$27@JLkcK",

"id":"IPAYlCR6qZF7q6w",

"currencyCode":"682",

"trackId":"696921377",

"udf5":"PaymentID",

"transId":"100201931948635783",

“udf10”:”FULLCAPTURE” //Applicable only for MADA capture transactions

}]

Based on TrackID (Merchant Transaction ID/Track ID):

[{

"amt":"70.00",

"action":"<action code>",

"password":"q@a68O$27@JLkcK",

"id":"IPAYlCR6qZF7q6w",

"currencyCode":"682",

"trackId":"696921377",

"udf5":"TrackID",

"transId":"696921377",

“udf10”:”FULLCAPTURE” //Applicable only for MADA capture transactions

}]

© 2020 API Guide Page 135 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response

Response from ARB Payment Gateway to Merchant

S. No Fields M/C/O Field Type Description

1 trandat M AlphaNu All the below response parameters will be provided in trandata
a m field
2 error C Alphanu If any error during processing, PG will provide the error code
m
3 errorTe C Alphanu If any error during processing, PG will provide the error
xt m description
4 Status M Alphanu If transaction success 1.
m If transaction failure 2.

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description


Unique ID generated by payment gateway.
1 paymentId M Numeric Based on this payment Id merchant can
match the final URL redirection response
Transaction status, Value will be
“CAPTURED” for Refund Successful and

“NOT CAPTURED” for Refund Failure and


“VOIDED” for Void Purchase / Void
Authorization Successful and “NOT
VOIDED” for Void Purchase / Void
Authorization Failure
2 result M Alphanum
For MADA : If Refund request is initiated
after one Month and declined with response
code “199” then PG will internally initiate
the manual Refund if it is accepted then the
result is “PROCESSING” otherwise “NOT
PROCESSED”

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by


Payment gateway and merchant can use
4 transId M Numeric
this id for initiating supported transactions
(Void, refund and inquiry)

© 2020 API Guide Page 136 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields.


The field data is passed along with a
transaction request and then returned in
7 udf1 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
8 udf2 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
9 udf3 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
10 udf4 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
11 udf5 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.

12 amt M Numeric Transaction amount

13 authRespCode M Numeric Auth response code provided by PG

6 digit authorization code received from


14 authCode M Numeric
switch
Card Brand name . Value will be "Visa" or
15 cardType M Alphabetic
"MasterCard" or "Mada".

16 actionCode M Alphanume Action code of transaction. Possible


ric Values
1-Purchase

© 2020 API Guide Page 137 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
17 origTransactionI C Alphanume It is applicable only for Supporting
D ric Transactions action code like 2,3,5,9
and 14. It refers to the “transId” of the
Source/Original transaction
18 card C AlPhanume Card Number used for Performing
ric Transaction
19 expMonth C AlPhanume Expiry Month of the Card
ric
20 expYear C AlPhanume Expiry Year of the Card
ric

Below is the sample encrypted response from PG to Merchant

[{

“tranid”: “201931951332346”,

"trandata": "<encrypted trandata>",

“status”:”1”, //1 for success transaction, 2 for failure transaction

“error”: null,

“errorText”: null

}]

Plain trandata in response

[{

“paymentId”:100201934525118923,

”result”:”success”,

© 2020 API Guide Page 138 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”date”:”1221”,

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”PaymentID”,

”trackId”,”3423423”,

”transId”:”201931951332346”,

”ref”:”935110000001”,

”authRespCode”:”00”,

"authCode":"000000",

"cardType":"Visa",

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 139 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Bank Hosted Integration Flow (Apple Pay)

This section illustrates how you can integrate the bank hosted flow on your website
application.

© 2020 API Guide Page 140 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1. User visits the merchant application and creates order.


2. Merchant application backend server calls Payment Token Generation API to get
the transaction token.
3. ARB Payment gateway internally validates the request.

 In case of successful validation, ARB PG provides Payment ID and Payment Page


URL in the response.
- Merchant needs to frame the payment page URL with Payment ID, Hence the
ARB payment page is displayed with Apple Pay button.
 In case of failure, ARB PG provides Error Code and Description.

Note: If merchant notification is disabled, then ARB Payment gateway will provide the
final response in URL redirection.

4. User click the Apple Pay button and selects the required card details from apple wallet
and performs apple authorization.
5. The ARB PG application process the transaction and returns the transaction response
to the merchant site.
6. Merchant server calls the transaction status API to verify the transaction response.
7. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 141 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the


1 id M Alphanum
Tranportal id from Merchant portal
All the below request parameters
2 trandata M Alphanum encrypted and pass the encrypted value in
trandata.
responseUR The merchant success URL where Payment
3 M Alphanum
L Gateway send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization : 4

Tranportal password. Merchant


3 password M Alphanum
download the same in merchant portal.

Tranportal ID. Merchant download the


4 id M Alphanum
same in merchant portal

currencyC
5 M Numeric 3-digit currency code of KSA. Ex:682
ode

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
7 udf1 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

© 2020 API Guide Page 142 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
8 udf2 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
9 udf3 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
10 udf4 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these


fields. The field data is passed along with
a transaction request and then returned
11 udf5 O Alphanum
in the transaction response. Merchant
should ensure that field is left blank
when no data needs to be passed.

The merchant success URL where


response
12 M Alphanum Payment Gateway send the notification
URL
request.

The merchant error URL where Payment


13 errorURL M Alphanum Gateway send the response in case any
error while Processing the transaction.

Language ID . Based on language ID


arabic language will be displayed on
14 langid O Alphabetic
payment page. Value should be 'ar' or
'AR' for arabic language .

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

© 2020 API Guide Page 143 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata> ”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource Key.

Plain Trandata:

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

© 2020 API Guide Page 144 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"langid":"ar",

}]

MADA Mandatory Parameters

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization : 4

Alphanu Tranportal password. Merchant download the same


3 password M
m in merchant portal.

Alphanu Tranportal ID. Merchant download the same in


4 id M
m merchant portal

5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field


data is passed along with a transaction request and
Alphanu
7 udf1 O then returned in the transaction response.
m
Merchant should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these fields. The field


data is passed along with a transaction request and
Alphanu
8 udf2 O then returned in the transaction response.
m
Merchant should ensure that field is left blank
when no data needs to be passed.

The user (merchant) defines these fields. The field


data is passed along with a transaction request and
Alphanu
9 udf3 O then returned in the transaction response.
m
Merchant should ensure that field is left blank
when no data needs to be passed.

Alphanu The user (merchant) defines these fields. The field


10 udf5 O data is passed along with a transaction request and
m
then returned in the transaction response.

© 2020 API Guide Page 145 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant should ensure that field is left blank


when no data needs to be passed.

Alphanu The merchant success URL where Payment


11 responseURL M
m Gateway send the notification request.

The merchant error URL where Payment Gateway


Alphanu
12 errorURL M send the response in case any error while
m
Processing the transaction.

Sample JSON request - Request from Merchant to ARB PG

//MADA Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 2 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

"langid":"ar",

}]

© 2020 API Guide Page 146 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Split Payment or Payout.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

JSON Conditional if Merchant Opted for Payout future.


1 accountDetails C
Array Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//Conditional if Merchant Opted for Split Payment or Payout.

"accountDetails":[

{"bankIdCode":"12345d6f","iBanNum": "567896743281926354276254",

"benificiaryName":"AlRajhi Bank Services",

"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode":"1234ret3","iBanNum": "987656743281926354276254",

"benificiaryName":"DIGITAL CO",

"serviceAmount":"300.00","valueDate":"20201231" }] ,

© 2020 API Guide Page 147 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY' 'PAY_SAVE'
'ADVANCE' 'PARTIAL_PAYMENT' 'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in advance -
POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

},

© 2020 API Guide Page 148 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Airline

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 airline C JSON Object Conditional - for Airline Merchant

1.1 bookingReferenc C Alphanum The booking reference number


e

1.1.1 itinerary C JSON Object Conditional - for Airline Merchant

1.1.1.1 leg C JSON Array Conditional - for Airline Merchant

1.1.1.1.1 carrierCode C Alphanum The carrier code for the leg

1.1.1.1.2 departureAirport C Alphanum The departure airport for the passenger


1.1.1.1.3 departureDate C Alphanum The departure date for the leg
1.1.1.1.4 departureTime C Alphanum The departure airport for the passenger
1.1.1.1.5 destinationAirpo C Alphanum The destination airport for the leg
rt
1.1.1.1.6 destinationArriva C Alphanum The arrival date for the leg
lDate
1.1.1.1.7 destinationArriva C Alphanum The arrival time for the leg
lTime
1.1.1.1.8 fareBasis C Alphanum The fare basis for the leg
1.1.1.1.9 flightNumber C Alphanum The flight number for the leg
1.1.1.1.10 travelClass C Alphanum The class of service for the leg
1.1.1.2 numberInParty C Alphanum
1.1.1.3 originCountry C Alphanum The origin Country of the itinerary
1.1.2 passenger C JSON Array Conditional - for airline merchant
1.1.2.1 firstName C Alphanum The passenger first name
1.1.2.2 lastName C Alphanum The passenger last name
1.1.3 ticket C JSON Object Conditional - for airline merchant
1.1.3.1 issue C JSON Object Conditional - for airline merchant
1.1.3.1.1 carrierCode C Alphanum Code of the airline that issuing the ticket
1.1.3.1.2 carrierName C Alphanum Name of the airline that is issuing the ticket.
1.1.3.1.3 travelAgentCode C Alphanum Code of the Travel Agent that issuing the ticket
1.1.3.1.4 travelAgentNam C Alphanum Name of the Travel Agent that issuing the ticket
e
1.1.3.2 totalFare C Numeric Ticket Total Fare

© 2020 API Guide Page 149 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

1.1.3.3 totalFees C Numeric Total fee for the ticket.


1.1.3.4 totalTaxes C Numeric Tax portion of the order amount.

Sample JSON request - Request from Merchant to ARB PG

//conditional - for airline merchant

{ "airline": { "bookingReference": "5WPU68", "itinerary": { "leg": [ {


"carrierCode": "MH", "departureAirport": "MNL", "departureDate": "2021-05-11",
"departureTime": "06:50:00Z", "destinationAirport": "KUL",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "10:35:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0805", "travelClass": "B" }, {
"carrierCode": "UL", "departureAirport": "KUL", "departureDate": "2021-05-11",
"departureTime": "15:00:00Z", "destinationAirport": "CMB",
"destinationArrivalDate": "2021-05-11", "destinationArrivalTime": "16:05:00Z",
"fareBasis": "BOWMPH6", "flightNumber": "0315", "travelClass": "B" } ],
"numberInParty": "1", "originCountry": "PHL" }, "passenger": [ { "firstName":
"KAI MR", "lastName": "QIAN" } ], "ticket": { "issue": { "carrierCode": "UL",
"carrierName": "SRILANKANAIRLINES", "travelAgentCode": "91401483",
"travelAgentName": "MANUL08AE" }, "totalFare": "54918.00", "totalFees":
"59518.00", "totalTaxes": "4600.00" } } }

}]

© 2020 API Guide Page 150 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Page URL

Attributes - Initial Response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then


status will be ‘1’. If the validation failed,
then status will be ‘2’
2 result C Alphanum It contains payment ID and Payment URL if
the validation success else this will be null
3 error C Alphanum If validation failed, then Payment gateway
will provide the respective error code
4 errorText C Alphanum If validation failed, then Payment gateway
will provide the respective error description

Sample JSON Response - Initial Response from ARB PG to Merchant

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response in case of successful validation, if failure then error code and
description will be provided. The below response will be in plain format and there is no
encryption for the below. Merchant can directly parse the response-based status and result
fields as mentioned below.

Success:

[{

"status": "1",

"result":"100201931620827468:https://securepayments.alrajhibank.com.sa/pg/pa
ymentpage.htm", //Payment ID:Paymentpage URL

“error”: null,

“errorText”: null }]

Failure:

[{

"status": "2",

© 2020 API Guide Page 151 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"error":" IPAY0100124”,

“errorText”: ”Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL

After Initial Response from ARB PG, merchant needs to frame the payment page URL like the
below sample.

https://securepayments.alrajhibank.com.sa/pg/paymentpage.htm?PaymentID=1002019316
20827468

© 2020 API Guide Page 152 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Attribute - Final URL redirection response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 paymentId M Numeric Unique payment Id generated by PG and
merchant can use this ID to match the
response from PG
2 trandata C Alphanum All the below response parameters
encrypted and send the encrypted value
in trandata
3 error C Alphanum If any error, PG will send the error code

4 errorText C Alphanum If any error, PG will send the error


description

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by payment


gateway. Based on this payment Id
merchant can match the final URL
redirection response
2 result M Alphanum Transaction status . Value will be
'CAPTURED' for purchase successful
and 'APPROVED' for authorization
successful.
3 ref M Numeric Transaction reference number (RRN)

4 transId M Numeric Unique transaction Id generated by


Payment gateway and merchant can
use this id for initiating supported
transactions (Void, refund and
inquiry)
5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these


fields. The field data is passed along

© 2020 API Guide Page 153 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
8 udf2 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
9 udf3 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
10 udf4 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
11 udf5 O Alphanum The user (merchant) defines these
fields. The field data is passed along
with a transaction request and then
returned in the transaction response.
Merchant should ensure that field is
left blank when no data needs to be
passed.
12 amt M Numeric Transaction amount

13 authRespCode M Numeric Auth response code provided by PG

14 authCode M Numeric 6 digit authorization code received


from switch
15 cardType M Alphabetic Card Brand name . Value will be "Visa"
or "MasterCard" or "Mada".
16 actionCode M Alphanume Action code of transaction. Possible
ric Values

© 2020 API Guide Page 154 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
17 card C AlPhanume Card Number used for Performing
ric Transaction
18 expMonth C AlPhanume Expiry Month of the Card
ric
19 expYear C AlPhanume Expiry Year of the Card
ric

Sample JSON Response - Final

If Merchant notification is disabled, then ARB Payment gateway will provide the final
response in URL redirection. Below is the sample response from ARB PG to merchant

[{

//Redirection Parameters

“paymentId”:”100201935166676976”,

“trandata”:”<encrypted trandata>”,

“error”:””,

“errorText”:””

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:”100201935166676976”,

© 2020 API Guide Page 155 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”result”: ”CAPTURED”,

”transId”:201935166561122,

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1”

}]

© 2020 API Guide Page 156 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Transaction Flow (Apple


Pay)

This section illustrates how you can integrate the merchant hosted flow (Apple Pay) on your
website application.

1. User visits the merchant application and creates order.


2. In the merchant page, the Apple Pay button is displayed. User clicks the Apple Pay
button and select required card from apple wallet. (The Apple Pay button in merchant
page is handled by the merchants by following the prerequisites steps)

© 2020 API Guide Page 157 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

3. Merchant application backend server calls Payment Token Generation API to get
the transaction token and to process payment via Alrajhi Payment gateway
4. After authorization, the ARB PG application process the transaction and returns the
transaction response to the merchant site. The ARB Payment gateway will provide the
final response in URL redirection.
5. Merchant server calls the transaction status API to verify the transaction response.
6. Finally, the merchant application displays the transaction status to user.

© 2020 API Guide Page 158 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Attributes - Request from Merchant to ARB PG

S. No Fields M/C/O Field Type Description

1 id M Alphanum Tranportal ID. Merchant can download the


Tranportal id from Merchant portal
2 trandata M Alphanum All the below request parameters
encrypted and pass the encrypted value in
trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanum Tranportal password. Merchant download
the same in merchant portal.
4 id M Alphanum Tranportal ID. Merchant download the same
in merchant portal
5 currencyC M Numeric 3-digit currency code of KSA. Ex:682
ode
6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these fields.


The field data is passed along with a
transaction request and then returned in the
transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
8 udf2 O Alphanum The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in the
transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
9 udf3 O Alphanum The user (merchant) defines these fields.
The field data is passed along with a

© 2020 API Guide Page 159 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

transaction request and then returned in the


transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
10 udf4 O Alphanum The user (merchant) defines these
fields. The field data passed along with
a transaction request and then returned
in the transaction response. Merchant
should ensure that field left blank when
no data needs to be passed.
11 udf5 O Alphanum The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in the
transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
12 expYear M Numeric Expiry year of card

13 expMonth M Numeric Expiry month of card

14 member M Alphanum Card holder name

15 cvv2 M Numeric CVV of the card

16 cardNo M Numeric Cardholders card number

17 cardType M Alphanum Card type Ex : Credit card – C, Debit Card -


D

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

© 2020 API Guide Page 160 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Plain Trandata:

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

}]

© 2020 API Guide Page 161 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY' 'PAY_SAVE'
'ADVANCE' 'PARTIAL_PAYMENT' 'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in advance -
POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

},

© 2020 API Guide Page 162 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

The ARB payment gateway verifies the transaction and returns the response to the same
request.

Attribute - Final response from ARB PG to Merchant

S. No Fields M/C/O Field Type Description


1 trandata M AlphaNum All the below response parameters will be
provided in trandata field
2 error C Alphanum If any error during processing, PG will
provide the error code
3 errorText C Alphanum If any error during processing, PG will
provide the error description
4 status M Alphanum If transaction success 1.
If transaction failure 2.

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description


Unique ID generated by payment gateway.
1 paymentId M Numeric Based on this payment Id merchant can
match the final URL redirection response
Transaction status . Value will be
2 result M Alphanum 'CAPTURED' for purchase successful and
'APPROVED' for authorization successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by


Payment gateway and merchant can use
4 transId M Numeric
this id for initiating supported transactions
(Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields.


The field data is passed along with a
transaction request and then returned in
7 udf1 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.

© 2020 API Guide Page 163 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description


The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
8 udf2 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
9 udf3 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
10 udf4 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.
The user (merchant) defines these fields.
The field data is passed along with a
transaction request and then returned in
11 udf5 O Alphanum
the transaction response. Merchant should
ensure that field is left blank when no data
needs to be passed.

12 amt M Numeric Transaction amount

13 authRespCode M Numeric Auth response code provided by PG

6 digit authorization code received from


14 authCode M Numeric
switch
Card Brand name . Value will be "Visa" or
15 cardType M Alphabetic
"MasterCard" or "Mada".

16 actionCode M Alphanume Action code of transaction. Possible


ric Values
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)

© 2020 API Guide Page 164 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

17 Card C AlPhanume Card Number used for Performing


ric Transaction
18 expMonth C AlPhanume Expiry Month of the Card
ric
19 expYear C AlPhanume Expiry Year of the Card
ric

Sample JSON Response - Final

The ARB payment gateway verifies the transaction and returns the response to the same
request.

[{

“tranid”: “201931951332346”,

"trandata": "<encrypted trandata>",

“status”:”1”, //1 for success transaction, 2 for failure transaction

“error”:null,

“errorText”: null

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:-1,

”result”:”CAPTURED”,

”amt”:”10.55”,

”date”:”1221”,

”ref”:”935110000001”,

”udf1”:”udf1text”,

© 2020 API Guide Page 165 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234”,

“authRespCode”:”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 166 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Pre-Authentication Transactions (Airline)

Pre-authorization (pre-auth) is a process of authenticating and temporary blocking of the


certain amount available on the card, based on the card details provided at the time of
booking.

1. User visits the merchant application and creates order.


2. User enters the payment card details.
3. Call the Pre-auth API to block amount from the user's account.
4. Merchant proceed with order/service completion.
5. Once the fulfilment is complete, call Capture API with the final amount to capture the
amount from user's card and then notify the payment status to the user.

© 2020 API Guide Page 167 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanu Tranportal ID. Merchant can download the Tranportal id


m from Merchant portal
2 trandata M Alphanu All the below request parameters encrypted and pass the
m encrypted value in trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanu Tranportal password. Merchant download the same in
m merchant portal.
4 id M Alphanu Tranportal ID. Merchant download the same in
m merchant portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
8 udf2 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
9 udf3 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 168 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

10 udf5 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
11 expYear M Numeric Expiry year of card

12 expMonth M Numeric Expiry month of card

13 member M Alphanu Card holder name


m
14 cvv2 M Numeric CVV of the card

15 cardNo M Numeric Cardholders card number

16 cardType M Alphanu Card type Ex : Credit card – C, Debit Card – D


m
17 eci M Alphanu Electronic commerce indicator received from third Party MPI
m
18 ucaf M Alphanu UCAF received from third Party MPI
m
19 cavv M Alphanu CAVV received from third Party MPI
m

Below is the sample encrypted request from Merchant to PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

Below are the plain Trandata request

[{

//Mandatory Parameters

“amt”:”12.00”,

© 2020 API Guide Page 169 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”action”:”1”,

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C",

"eci":"7",

"ucaf":"1",

"cavv":"JcboZXndOg40CBECC2BGbheAAAA=",

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

© 2020 API Guide Page 170 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Credit Card Installment Transactions

Detailed description of Plain Trandata request parameters

S.No Fields M/C Field Type Description


/O
1 udf6 C Alphanum Credit Card Installment Short Code

2 udf7 C Alphanum Credit Card Installment Type

Sample JSON request - Request from Merchant to ARB PG

//conditional - Credit Card Installment Transactions

"udf6":"12345",

"udf7":"C",

Payout Future

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

Conditional if Merchant Opted for Payout


JSON future.
1 accountDetails C
Array
Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

© 2020 API Guide Page 171 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//conditional if Merchant opted for Payout Future.

"accountDetails":[

{"bankIdCode": "12345d6f", "iBanNum":


"567896743281926354276254","benificiaryName":"AlRajhi Bank Services",
"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode": "1234ret3", "iBanNum":


"987656743281926354276254","benificiaryName":"DIGITAL CO",
"serviceAmount":"300.00","valueDate":"20201231" }],

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY'
'PAY_SAVE' 'ADVANCE' 'PARTIAL_PAYMENT'
'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in
advance - POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

© 2020 API Guide Page 172 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

© 2020 API Guide Page 173 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response

Once ARB payment gateway verifies the transaction and returns the response to the same request.

Response from ARB Payment Gateway to Merchant

S. No Fields M/C/O Field Type Description

1 trandata M AlphaNu All the below response parameters will be provided in


m trandata field
2 error C Alphanu If any error during processing, PG will provide the error
m code
3 errorText C Alphanu If any error during processing, PG will provide the error
m description
4 status M Alphanu If transaction success 1.
m If transaction failure 2.

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description

Unique ID generated by payment gateway. Based on this


1 paymentId M Numeric payment Id merchant can match the final URL
redirection response
Transaction status . Value will be 'CAPTURED' for
Alphanu
2 result M purchase successful and 'APPROVED' for authorization
m
successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by Payment gateway


4 transId M Numeric and merchant can use this id for initiating supported
transactions (Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
7 udf1 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
8 udf2 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 174 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
9 udf3 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
10 udf5 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

11 amt M Numeric Transaction amount

authRespCod
12 M Numeric Auth response code provided by PG
e

13 authCode M Numeric 6 digit authorization code received from switch

14 cardType M Alphabet Card Brand name . Value will be "Visa" or "MasterCard"


ic or "Mada".

15 actionCode M Alphanu Action code of transaction. Possible Values


meric 1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
16 card C AlPhanu Card Number used for Performing Transaction
meric
17 expMonth C AlPhanu Expiry Month of the Card
meric
18 expYear C AlPhanu Expiry Year of the Card
meric

Below is the sample encrypted response from PG to Merchant

[{

“tranid”: “201931951332346”,

"trandata": "<encrypted trandata>",

© 2020 API Guide Page 175 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

“status”:”1”, //1 for success transaction, 2 for failure transaction

“error”:null,

“errorText”: null

}]

Plain trandata in response

[{

“paymentId”:-1,

”result”:”CAPTURED”,

”amt”:”10.55”,

”date”:”1221”,

”ref”:”935110000001”,

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234”,

“authRespCode”:”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

© 2020 API Guide Page 176 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 177 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Invoice Payment Transaction Flow

1. Customer visits the merchant site and selects the merchandise and confirms to pay using the
payment gateway.
2. Merchant redirects the customer with the Invoice transaction data to the payment gateway.
3. Payment Gateway verifies the invoice transaction request from the merchant and generates the
invoice Payment URL based on the invoice type.
4. Payment gateway will provide the response to merchant with invoice Payment URL.
5. Merchant to redirect the Payment URL to Payment Gateway.
 There are two types of invoice transactions namely Dedicated and Open invoice.

a) If the initiated transaction type is dedicated, Merchant need to send the buyer details in the
request.
PG presents the hosted payment page with buyer details to customer and prompts the
customer to enter the card credentials.
b) If the initiated transaction type is open then merchant no need to send buyer details.

6. Payment gateway will get the buyer detail and process the transaction with the respective schemes.
7. Once the transaction complete, PG will send the response to merchant and customer via mail &
SMS.

© 2020 API Guide Page 178 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Payment Token Generation API

Request from Merchant to ARB Payment gateway

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the Tranportal id


1 id M Alphanum
from Merchant portal
trandat All the below request parameters encrypted and pass the
2 M Alphanum
a encrypted value in trandata.

Dedicated Invoice detailed description of Plain Trandata request parameters.

S. No Fields M/C/O Field Type Description

Alphanu Tranportal password. Merchant download the same in


1 password M
m merchant portal.

Alphanu Tranportal ID. Merchant download the same in merchant


2 id M
m portal

currencyCo
3 M Numeric 3-digit currency code of KSA. Ex:682
de

Alphanu
4 invoiceId M 50-digit unique Id.
m

5 Alphanu
itemDesc M 500-digit Item Description.
m

Alphabe 1-digit value ‘’D’’ or ‘’O’’


5 invoiceType M
tic (D-dedicated invoice / O – Open Invoice)

Alphabe
6 buyerName M 50-digit Buyer Name.
tic

7 amt M Numeric Transaction amount.

alphanu
8 email M Buyer mail Id.
m

9 mobile M Numeric Buyer Mobile Number.

Alphanu Expiry Date of the payment Link.


10 expiryDate O
m Date Format: “dd-MM-yyyy hh:mm:ss”

Open Invoice detailed description of Plain Trandata request parameters.

© 2020 API Guide Page 179 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

Alphanu Tranportal password. Merchant download the same


1 password M
m in merchant portal.

Alphanu Tranportal ID. Merchant download the same in


2 id M
m merchant portal

currencyCo
3 M Numeric 3-digit currency code of KSA. Ex: “682”
de

Alphanu
4 invoiceId M 50-digit unique Id.
m

5 Alphanu
itemDesc M 500-digit Item Description
m

Alphabe 1-digit value ‘’D’’ or ‘’O’’


5 invoiceType M
tic (D-dedicated invoice / O – Open Invoice)

7 amt O numeric Transaction amount. Ex: “100.00”

Alphanu Expiry Date of the payment Link.


10 expiryDate O
m Date Format: “dd-MM-yyyy hh:mm:ss”

© 2020 API Guide Page 180 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Processing Page URL

ARB Payment gateway internally validates the request and gives invoice payment page URL in the
response in case of successful validation, if failure then error code and description will be provided. The
below response will be in plain format and there is no encryption for the below. Merchant can directly
parse the response-based on the status and result fields as mentioned below.

Initial Response from PG to Merchant for Dedicated and Open Invoice

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then status will be ‘1’. If the
validation failed, then status will be ‘2’
2 result C Alphanu It contains invoice Payment URL if the validation success
m
3 error C Alphanu If validation failed, then Payment gateway will provide the
m respective error code
4 errorT C Alphanu If validation failed, then Payment gateway will provide the
ext m respective error description

Success:

[{

"status": "1",

"result":"https://securepayments.alrajhibank.com.sa/mrchptl/iP.htm?Id=Y3FT9"
//Invoice Payment Page URL}]

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

“errorText”:” Problem occurred while validating transaction data”

}]

© 2020 API Guide Page 181 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

- If success, Merchant needs to redirect the invoice payment page URL like the below
sample
https://securepayments.alrajhibank.com.sa/mrchptl/iP.htm?Id=Y3FT9

- Once merchant redirects the link, ARB Payment Gateway shows the invoice Payment
Page to customer based on the invoice type.

Final Response

After validating the customer card details then ARB Payment gateway will provide the final
response to merchant and customer via mail & SMS.

© 2020 API Guide Page 182 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Webhook Merchant Notification Flow

For Webhook transactions, ARB PG will send risk based, authentication based or transaction/payment
based notification request to merchant as below :

Detailed Notification Request from PG to Merchant for Webhook

S. No Fields M/C/O Field Type Description

1 type M Alphanum(20) Type of Notification to the Merchant

Payment Status Info.All the Payment Gateway


payLoa
2 M JSON Object related information’s available in the payload fields
d
(Further table below)
Transaction Status - Contains the Transaction status
3 result M JSON Object
for the transaction (table below)
respon
4 M Alphanum Merchant Response URL
seURL

payLoad Detailed Field description

S. No Fields M/C/O Field Type Description

1 paymentId M Alphanum[20] Payment ID -

Unique Id generated by Payment Gateway, this is the same ID


that Payment Gateway had provided along with the
PaymentPage URL for the initial request
2 transId M Alphanum[19] Transaction ID -

Unique Transaction ID generated by Payment Gateway

3 ref M Alphanum[12] RRN - The reference number of the transaction known to


payment scheme. This number or series of letters is used for
referential purposes by some acquiring/issuing
bank/institutions and should be stored properly

4 paymentTimest M Alphanum Timestamp - ARB request initiation Timestamp


amp

5 trackId M Alphanum[255] Merchant Track ID -

Track ID value that was sent by merchant in the Purchase


request

© 2020 API Guide Page 183 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

6 udf1 O Alphanum[255] User Defined Field 1 -

Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

7 udf2 O Alphanum[255] User Defined Field 2 -

Same udf value that merchant has sent in the initial transaction
request to Payment Gateway
8 udf3 O Alpphanum[255] User Defined Field 3

- Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

9 udf4 O Alphanum[255] User Defined Field 4

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

10 udf5 O Alphanum255] User Defined Field 5

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

11 udf6 O Alphanum [255] User Defined Field 6

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

12 udf7 O Alphanum[255] User Defined Field 7

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

13 udf8 O Alphanum[255] User Defined Field 8

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

14 udf9 O Alphanum255] User Defined Field 9

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

15 udf10 O Alphanum[255] User Defined Field 10

-Same udf value that merchant has sent in the initial transaction
request to Payment Gateway

© 2020 API Guide Page 184 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

16 amt M Numeric with Transaction amount -


decimal places -
Max 12 digit with Transaction Amount as sent by merchant in the request
2 digit decimal
places

17 authRespCode O Alphanum[3] Authorization Response Code – Authorization code received


from the issuer bank

18 authCode O Alphanum[6] Authorization Code -

The resulting authorization number of the transaction from the


issuing bank. This number or series of letters is used for
referential purposes by some acquiring/issuing
bank/institutions and should be stored properly

19 actionCode C Alphanumeri Action code of transaction. Possible Values


c
1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)

20 origTransac C Alphanumeri It is applicable only for Supporting


tionID c Transactions action code like 2,3,5,9 and 14.
It refers to the “transId” of the
Source/Original transaction
21 Card C AlPhanumeri Card Number used for Performing Transaction
c

22 expMonth C AlPhanumeri Expiry Month of the Card


c

23 expYear C AlPhanumeri Expiry Year of the Card


c

result Parameter detailed description

© 2020 API Guide Page 185 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

status Alphanum[30] Status of the Payment


1 M

error Alphanum[255] Error code of the transaction


2 M
errorText Alphanum[255] Error description
3 M

Notification Response from Merchant to PG for Webhook

S. No Fields M/C/O Field Type Description

1 status M Numeric Merchant Notification acknowledgment status

Webhook from PG:

PAYMENT

[{"result": [{"status":"CAPTURED"}], "responseURL":


"http://172.22.0.121:9207/MerchDemoREST/NotifyResponse.htm", "payLoad":
[{"date":"0415","authRespCode":"00","authCode":"623666",

"transId":202110527755152,"trackId":"04d26d6c-ca9f-4ac3-b65d-
6c5bff7af1a6", "udf5":"Select",
"udf10":"null","amt":10,"udf3":"null","udf4":"null","udf1":"null","udf2
":"null","ref":"110533003557","udf9":"null","udf8":"null","paymentTimes
tamp":"2021-04-15T02:58:30.448Z",”actionCode”:”1”,
"card":"401200XXXXXX1112","expMonth":"6","expYear":"24"}],
"type":"PAYMENT"}]

PAYMENT FAILURE

[{"result":[{"errorText":"00","error":"IPAY00001","status":"NOT
CAPTURED"}], "responseURL" :
"http://172.22.0.121:9207/MerchDemoREST/NotifyResponse.htm", "payLoad":

© 2020 API Guide Page 186 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

[{"date":"0414","ref":"110423000769","authRespCode":"00","authCode":"54
4377","paymentId":"700202110427042639","transId":202110472940732,"track
Id":"e061c0ec-b32e-456b-9ac2-
8196fb8f16ec","amt":100,"paymentTimestamp":"2021-04-
13T22:48:21.082Z",”actionCode”:”1”,"card":"401200XXXXXX1112","expMonth"
:"6","expYear":"24"}],"type":"PAYMENT FAILURE"}]

Purchase HOST TIME OUT Webhook notification request (Action code will be
Change in payload for each segments as per document.)

[{"result":[{"status":"HOST
TIMEOUT"}],"responseURL":"https://partner.se.com.sa/RESTAdapter/AlRajhi
/PayNotification","payLoad":[{"date":"0527","authRespCode":"000","authC
ode":"163025","trackId":"ec4e181a-16e9-406e-a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"","amt":"5.0","udf3":"null","udf4":"n
ull","udf1":"null","udf2":"null","ref":"214721008795","udf9":"null",pay
mentId":700202214780010325,"udf7":"","udf8":"null","actionCode":"1","pa
ymentTimestamp":"2022-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"6","expYear":"2
4"}],"type":"PAYMENT"}]

RISK FAILURE

[{"result":"[{"errorText":"X","error":"IPAY00002","status":"IPAY0100045
- DENIED BY RISK"}]", "responseURL":
"http://172.22.0.121:9207/MerchDemoREST/NotfiyRsponse.htm" ,"payLoad":
"[{"authRespCode":"X","trackId":"605965227",

"transId":202101752650620,
"udf5":"UDF5","cardType":"Visa","udf6":"UDF6","udf10":"UDF10","amt":35.
0,"udf3":"UDF3","udf4":"UDF4","udf1":"UDF1","udf2":"UDF2","result":"IPA
Y0100045 - DENIED BY
RISK","udf9":"UDF9","paymentId":”600202101747330225”,
"udf7":"UDF7","udf8":"UDF8",”actionCode”:”1”,
"card":"401200XXXXXX1112","expMonth":"6","expYear":"24"}]", "type":"RISK
FAILURE"}]

© 2020 API Guide Page 187 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Refund Webhook notification request

[{"result":[{"status":"CAPTURED"}],"responseURL":"https://partner.se.co
m.sa/RESTAdapter/AlRajhi/PayNotification","payLoad":[{"date":"0527","au
thRespCode":"000","authCode":"163025","trackId":"ec4e181a-16e9-406e-
a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"FINALCAPTURE","amt":"5.0","udf3":"nul
l","udf4":"null","udf1":"null","udf2":"null","ref":"214721008795","udf9
":"null","origTransactionID":"202214779988486","paymentId":700202214780
010325,"udf7":"","udf8":"null","actionCode":"2","paymentTimestamp":"202
2-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"12","expYear":"
36"}],"type":"PAYMENT"}]

Manual Refund Failure

[{"result":[{"status":"NOT
PROCESSED"}],"responseURL":"https://partner.se.co
m.sa/RESTAdapter/AlRajhi/PayNotification","payLoad":[{"date":"0527","au
thRespCode":"124","authCode":"163025","trackId":"ec4e181a-16e9-
406ea132bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardT
ype":"Ma da","udf6":"10018496416","udf10":"","amt":"5.0","udf3":"nul
l","udf4":"null","udf1":"null","udf2":"null","ref":"214721008795","udf9
":"null","origTransactionID":"202214779988486","paymentId":700202214780
010325,"udf7":"","udf8":"null","actionCode":"2","paymentTimestamp":"202
2-05-

27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"12","expYear":"

36"}],"type":"PAYMENT"}]

VOIDED Webhook notification request

© 2020 API Guide Page 188 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

[{"result":[{"status":"VOIDED"}],"responseURL":"https://partner.se.com.
sa/RESTAdapter/AlRajhi/PayNotification","payLoad":[{"date":"0527","auth
RespCode":"000","authCode":"163025","trackId":"ec4e181a-16e9-406e-a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"","amt":"5.0","udf3":"null","udf4":"n
ull","udf1":"null","udf2":"null","ref":"214721008795","udf9":"null","or
igTransactionID":"202214779988486",paymentId":700202214780010325,"udf7"
:"","udf8":"null","actionCode":"3","paymentTimestamp":"2022-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"6","expYear":"2
4"}],"type":"PAYMENT"}]

NOT VOIDED Webhook notification request

[{"result":[{"status":"NOT
VOIDED"}],"responseURL":"https://partner.se.com.sa/RESTAdapter/AlRajhi/
PayNotification","payLoad":[{"date":"0527","authRespCode":"000","authCo
de":"163025","trackId":"ec4e181a-16e9-406e-a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"","amt":"5.0","udf3":"null","udf4":"n
ull","udf1":"null","udf2":"null","ref":"214721008795","udf9":"null","or
igTransactionID":"202214779988486",paymentId":700202214780010325,"udf7"
:"","udf8":"null","actionCode":"3","paymentTimestamp":"2022-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"6","expYear":"2
4"}],"type":"PAYMENT"}]

Auth Webhook notification request

[{"result":[{"status":"APPROVED"}],"responseURL":"https://partner.se.co
m.sa/RESTAdapter/AlRajhi/PayNotification","payLoad":[{"date":"0527","au
thRespCode":"000","authCode":"163025","trackId":"ec4e181a-16e9-406e-
a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"FINALCAPTURE","amt":"5.0","udf3":"nul
l","udf4":"null","udf1":"null","udf2":"null","ref":"214721008795","udf9
":"null","paymentId":700202214780010325,"udf7":"","udf8":"null","action
Code":"4","paymentTimestamp":"2022-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"6","expYear":"2
4"}],"type":"PAYMENT"}]

© 2020 API Guide Page 189 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Auth Webhook notification request

[{"result":[{"status":"NOT
APPROVED"}],"responseURL":"https://partner.se.com.sa/RESTAdapter/AlRajh
i/PayNotification","payLoad":[{"date":"0527","authRespCode":"000","auth
Code":"163025","trackId":"ec4e181a-16e9-406e-a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"FINALCAPTURE","amt":"5.0","udf3":"nul
l","udf4":"null","udf1":"null","udf2":"null","ref":"214721008795","udf9
":"null","paymentId":700202214780010325,"udf7":"","udf8":"null","action
Code":"4","paymentTimestamp":"2022-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"6","expYear":"2
4"}],"type":"PAYMENT"}]

Capture Webhook notification request

[{"result":[{"status":"APPROVED"}],"responseURL":"https://partner.se.co
m.sa/RESTAdapter/AlRajhi/PayNotification","payLoad":[{"date":"0527","au
thRespCode":"000","authCode":"163025","trackId":"ec4e181a-16e9-406e-
a132-
bdfda42e4e91","transId":202214720027040,"udf5":"TrackID","cardType":"Ma
da","udf6":"10018496416","udf10":"FINALCAPTURE","amt":"5.0","udf3":"nul
l","udf4":"null","udf1":"null","udf2":"null","ref":"214721008795","udf9
":"null","origTransactionID":"202214779988486","paymentId":700202214780
010325,"udf7":"","udf8":"null","actionCode":"5","paymentTimestamp":"202
2-05-
27T08:27:34.155Z","card":"401200XXXXXX1112","expMonth":"6","expYear":"2
4"}],"type":"PAYMENT"}]

Note : “origTransactionID”:” 202101747330225” – Condition Parameter

© 2020 API Guide Page 190 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant should send acknowledgment to PG as below:

Merchant Response Sample:

[{

"status": "1"

}]

If PG doesn't receive any acknowledgement from merchant , PG will keep sending the
notification request till the acknowledgement is received .

© 2020 API Guide Page 191 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Notification Flow for Bank Hosted


Transactions

If Notification enabled at Merchant level,

1. Payment gateway will initiate REST call to send the transaction status notification request to
merchant and wait for the acknowledgement.
2. If PG receives the acknowledgment from merchant, then Payment Gateway logs the response
and provides the transaction update to Cortex system for processing the settlement and
Payment Gateway sends the final response to merchant. The final response will be URL
redirection.
3. Merchant displays transaction result to customer.
4. In case, if PG does not receive the acknowledgment from merchant, then PG will initiate the
VOID transaction to respective scheme to reverse the transaction and there is no payment
advise initiated to Cortex.

If Notification disabled at Merchant level,

1. Payment Gateway logs the response and provides the transaction update to Cortex system for
processing the settlement and Payment Gateway sends final response to merchant and this will
be URL redirection.
2. Merchant displays transaction result to customer.

© 2020 API Guide Page 192 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Request - Notification Generation API

Notification request from PG to Merchant

S. No Fields M/C/O Field Type Description

1 payment M Numeric Unique ID generated by Payment gateway. Merchant can store


Id the payment ID to match the final URL redirection response
2 trandata M Alphanu All the below response parameters encrypted and send the
m encrypted value in trandata

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description

Unique ID generated by payment gateway. Based on this


paymentI
1 M Numeric payment Id merchant can match the final URL redirection
d
response
Alphanu
2 result M Transaction status
m

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by Payment gateway and


4 transId M Numeric merchant can use this id for initiating supported transactions
(Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field data is


Alphanu passed along with a transaction request and then returned in
7 udf1 O
m the transaction response. Merchant should ensure that field is
left blank when no data needs to be passed.
The user (merchant) defines these fields. The field data is
Alphanu passed along with a transaction request and then returned in
8 udf2 O
m the transaction response. Merchant should ensure that field is
left blank when no data needs to be passed.
The user (merchant) defines these fields. The field data is
Alphanu passed along with a transaction request and then returned in
9 udf3 O
m the transaction response. Merchant should ensure that field is
left blank when no data needs to be passed.
Alphanu The user (merchant) defines these fields. The field data is
10 udf5 O
m passed along with a transaction request and then returned in

© 2020 API Guide Page 193 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

the transaction response. Merchant should ensure that field is


left blank when no data needs to be passed.

11 amt M Numeric Transaction amount

authResp
12 M Numeric Auth response code provided by PG
Code

13 authCode M Numeric 6 digit authorization code received from switch

14 actionCo C Alphanu Action code of transaction. Possible Values


de meric 1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)

Below is the sample merchant notification request and response,

Notification Request from ARB payment gateway to Merchant:

[{

“paymentId”:100201935044735860,

“trandata”:”<encrypted trandata>”

}]

Plain Trandata:

[{“paymentId”:100201935166676976,

”result”:”CAPTURED”,

”ref”:”935110000001”,

”transId”:”201935166561122”,

“date”:”1217”,

© 2020 API Guide Page 194 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

“actionCode”:”1”,

"card":"401200XXXXXX1112",

"expMonth":"12", // 1 - 2 digits

"expYear":"2036" // 2 - 4 digits

}]

© 2020 API Guide Page 195 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response - Acknowledgement

Notification response from Merchant to ARB Payment gateway

S. No Fields M/C/O Field Type Description

1 stat M Numeric Status should be ‘1’


us
2 resul M Alphanu Merchant response URL for which PG will provide the final URL
t m redirection response

Acknowledgment response from merchant to PG:

[{

"status": "1",

"result":”https://merchant.com/finalresultURL”

}]

© 2020 API Guide Page 196 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final response to merchant

If ARB payment gateway receives the acknowledgement from merchant, PG logs the
response and provide the response back to merchant. This will be URL redirection.

Response from PG to merchant.

[{

“paymentId”:”100201935166676976”,

“trandata”:”<encrypted trandata>”,

“Error”:””,

“ErrorText”:””

}]

Plain Trandata:

[{

“paymentId”:”100201935166676976”,

”result”:”CAPTURED”,

”ref”:”935110000001”,

”transId”:”201935166561122”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

© 2020 API Guide Page 197 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”udf5”:”Tidal5”,

”amt”:”70.0”,

”authRespCode”,”00”,

"authCode":"000000",

“actionCode”:”1”,

"card":"401200XXXXXX1112",

"expMonth":"12", // 1 - 2 digits

"expYear":"2036" // 2 - 4 digits

}]

© 2020 API Guide Page 198 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response – No Acknowledgement

If there is no acknowledgement from Merchant After initiating the merchant notification,


PG will wait for the response based on the configured time and no acknowledgement from
merchant then PG will void the transaction and update the response back to merchant
error URL received in the initial API request.

[{

“paymentId”:”100201935166676976”,

”Result”:”Voided”,

”error”:”IPAY0200025”,

”errorText”:”!ERROR!-IPAY0200025 - Problem occurred while getting


merchant acknowledgement & transaction reversed”,

”trackId”:”123456”,

”amt”:”12.0”

}]

© 2020 API Guide Page 199 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Issuer Country API (Card Bin Check)

Perform a BIN lookup using this API call. Merchant can send card bin number to PG and PG
will respond with card issuer country details.

End Point: https://securepayments.alrajhibank.com.sa/pg/payment/bincheck.htm

Request from Merchant to PG

Detailed description of Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 Bin M Numeric Card Bin First six digits of the card Number

2 Id M Alphanu Tranportal ID. Merchant can download the same


m in merchant portal
Alphanu Tranportal password. Merchant can download
3 Password M
m the same in merchant portal.

Below is the sample request from Merchant to PG

"bin":"515735",

"id":"IPAYAq03cVHHs2q",

"password":"1$Q$VP73S2gycg@"

© 2020 API Guide Page 200 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response from PG to Merchant

Detailed description of Response from ARB payment gateway to Merchant

S. No Fields M/C/O Field Type Description

1 Bin C Numeric Card Bin First six digits of the card Number
2 Bank C Alphanu Bank name for the card bin issuer
m
3 Country C Alphanu Country name for the card bin
m
4 Countryco C Alphanu Country Code for the card bin
de m
5 Card C Alphanu Card Type . Ex : MasterCard /Visa
m
6 errorText C Alphanu If validation failed, then payment gateway will provide the
m with respective error description
special
chars
7 Error C Alphanu If validation failed, then Payment gateway will provide the
m respective error code
8 Status M Numeric If the request validation is success, then status will be ‘1’.
If the validation failed, then status will be ‘2’

Below is the sample response from PG to Merchant (Success Case)

"country":"SAUDI ARABIA",

"bank":"Al Bank Al Saudi Al Fransi",

"bin":"446404",

"countrycode":"SAU",

"card":"MADA",

"status":"1"

© 2020 API Guide Page 201 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Below is the sample response from PG to Merchant (Error Case)

"errorText":"!ERROR!-IPAY0100380-Bin number should be of 6


digits.",

"error":"IPAY0100380",

"status":"2"

© 2020 API Guide Page 202 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Bank Hosted Recurring Transaction Flow (3D


Secure)

Recurring Billing API methods enable merchant user (via payment gateway) to manage
regular subscription payments.

Request - Payment Token Generation API

Request from Merchant to ARB Payment gateway

S. No Fields M/C/O Field Type Description

Tranportal ID. Merchant can download the Tranportal id


1 id M Alphanum
from Merchant portal
All the below request parameters encrypted and pass the
2 trandata M Alphanum
encrypted value in trandata.
responseUR The merchant success URL where Payment Gateway send
3 M Alphanum
L the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric Purchase: 1
Authorization : 4

Alphanu Tranportal password. Merchant download the


3 password M
m same in merchant portal.

Alphanu Tranportal ID. Merchant download the same


4 id M
m in merchant portal

5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

Alphanu The user (merchant) defines these fields. The


7 udf1 O field data is passed along with a transaction
m
request and then returned in the transaction

© 2020 API Guide Page 203 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

response. Merchant should ensure that field is


left blank when no data needs to be passed.

The user (merchant) defines these fields. The


field data is passed along with a transaction
Alphanu
8 udf2 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.

The user (merchant) defines these fields. The


field data is passed along with a transaction
Alphanu
9 udf3 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.

The user (merchant) defines these fields. The


field data is passed along with a transaction
Alphanu
10 udf5 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.

Alphanu The merchant success URL where Payment


11 responseURL M
m Gateway send the notification request.

The merchant error URL where Payment


Alphanu
12 errorURL M Gateway send the response in case any error
m
while Processing the transaction.

Request from Merchant to ARB Payment gateway:

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata> ”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

Plain Trandata:

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource Key

© 2020 API Guide Page 204 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 2 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”12345656789”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

”udf1”:”1”, //To identify Recurring based transactions

”udf2”:”SI”, //To identify Recurring based transactions

//Optional Parameters

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

"langid":"ar",

© 2020 API Guide Page 205 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Split Payment or Payout.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

JSON Conditional if Merchant Opted for Payout future.


1 accountDetails C
Array Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//Conditional if Merchant Opted for Split Payment or Payout.

"accountDetails":[

{"bankIdCode":"12345d6f","iBanNum": "567896743281926354276254",

"benificiaryName":"AlRajhi Bank Services",

"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode":"1234ret3","iBanNum": "987656743281926354276254",

"benificiaryName":"DIGITAL CO",

"serviceAmount":"300.00","valueDate":"20201231" }] ,

© 2020 API Guide Page 206 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m Transaction Type Allowed Values 'PAY' 'PAY_SAVE'
'ADVANCE' 'PARTIAL_PAYMENT' 'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in advance -
POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

},

© 2020 API Guide Page 207 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Page URL

Initial Response from PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then status will be ‘1’.
If the validation failed, then status will be ‘2’
2 result C Alphanum It contains payment ID and Payment URL if the
validation success else this will be null
3 error C Alphanum If validation failed, then Payment gateway will provide
the respective error code
4 errorText C Alphanum If validation failed, then Payment gateway will provide
the respective error description

 ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response in case of successful validation, if failure then error code and
description will be provided. The below response will be in plain format and there is no
encryption for the below. Merchant can directly parse the response-based status and result
fields as mentioned below.

Success:

[{

"status": "1",

"result":"100201931620827468:https://securepayments.alrajhibank.com.sa/pg/pa
ymentpage.htm", //Payment ID:Paymentpage URL

“error”: null,

“errorText”: null }]

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

“errorText”: ”Problem occurred while validating transaction data”,

© 2020 API Guide Page 208 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

“result”: null

}]

Framing Payment URL

 If success, Merchant needs to frame the payment page URL like the below sample

https://securepayments.alrajhibank.com.sa/pg/paymentpage.htm?PaymentID=10020193
1620827468

 If Merchant notification is disabled, then ARB Payment gateway will provide the final response in
URL redirection. Below is the sample response from ARB PG to merchant

© 2020 API Guide Page 209 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Final URL redirection response from ARB payment gateway to Merchant

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique payment Id generated by PG and merchant can use


this ID to match the response from PG
2 trandata C Alphanu All the below response parameters encrypted and send the
m encrypted value in trandata
3 error C Alphanu If any error, PG will send the error code
m
4 errorText C Alphanu If any error, PG will send the error description
m

Detailed description of Plain trandata parameters

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by payment gateway. Based on this


payment Id merchant can match the final URL redirection
response
2 result M Alphanu Transaction status . Value will be 'CAPTURED' for purchase
m successful and 'APPROVED' for authorization successful.
3 ref M Numeric Transaction reference number (RRN)

4 transId M Numeric Unique transaction Id generated by Payment gateway and


merchant can use this id for initiating supported
transactions (Void, refund and inquiry)
5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanu The user (merchant) defines these fields. The field data is
m passed along with a transaction request and then returned
in the transaction response. Merchant should ensure that
field is left blank when no data needs to be passed.
8 udf2 O Alphanu The user (merchant) defines these fields. The field data is
m passed along with a transaction request and then returned
in the transaction response. Merchant should ensure that
field is left blank when no data needs to be passed.

© 2020 API Guide Page 210 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

9 udf3 O Alphanu The user (merchant) defines these fields. The field data is
m passed along with a transaction request and then returned
in the transaction response. Merchant should ensure that
field is left blank when no data needs to be passed.
10 udf5 O Alphanu The user (merchant) defines these fields. The field data is
m passed along with a transaction request and then returned
in the transaction response. Merchant should ensure that
field is left blank when no data needs to be passed.
11 amt M Numeric Transaction amount

12 authRespC M Numeric Auth response code provided by PG


ode
13 authCode M Numeric 6 digit authorization code received from switch

14 cardType M Alphabet Card Brand name . Value will be "Visa" or "MasterCard" or


ic "Mada".
15 custid M Alphanu Customer ID needs to be sent in the subsequent Merchant
m Initiating recurring transactions

16 actionCod M Alphanu Action code of transaction. Possible Values


e meric 1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
17 card C AlPhanu Card Number used for Performing Transaction
meric
18 expMonth C AlPhanu Expiry Month of the Card
meric
19 expYear C AlPhanu Expiry Year of the Card
meric

Sample JSON Response - Final

//Redirection Parameters

 “paymentId”:”100201935166676976”,

© 2020 API Guide Page 211 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

 “trandata”:”<encrypted trandata>”,

 “error”:””,

 “errorText”:””

Plain Trandata:

[{

“paymentId”:”100201935166676976”,

”result”: ”CAPTURED”,

”transId”:201935166561122,

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

"cardType":"Visa",

“custid”:”202014785236784”,

“actionCode”:”1”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

© 2020 API Guide Page 212 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 213 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted Recurring Transaction Flow


(3D Secure)

Recurring Billing API methods enable merchant user to manage regular subscription
payments.

Request - Payment Token Generation API

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 id M Alphanum Tranportal ID. Merchant can download the Tranportal id


from Merchant portal
2 trandata M Alphanum All the below request parameters encrypted and pass
the encrypted value in trandata.
3 responseURL M Alphanum The merchant success URL where Payment Gateway
send the notification request.
4 errorURL M Alphanum Merchant error URL

Detailed description of Plain trandata request parameters

M/C
S.No Fields Field Type Description
/O

1 amt M Numeric Transaction amount

2 action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 password M Alphanum Tranportal password. Merchant download the
same in merchant portal.
4 id M Alphanum Tranportal ID. Merchant download the same in
merchant portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these fields. The field
data passed along with a transaction request and
then returned in the transaction response.

© 2020 API Guide Page 214 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

M/C
S.No Fields Field Type Description
/O

Merchant should ensure that field left blank when


no data needs to be passed.
8 udf2 O Alphanum The user (merchant) defines these fields. The field
data passed along with a transaction request and
then returned in the transaction response.
Merchant should ensure that field left blank when
no data needs to be passed.
9 udf3 O Alphanum The user (merchant) defines these fields. The field
data passed along with a transaction request and
then returned in the transaction response.
Merchant should ensure that field left blank when
no data needs to be passed.
10 udf5 O Alphanum The user (merchant) defines these fields. The field
data passed along with a transaction request and
then returned in the transaction response.
Merchant should ensure that field is left blank
when no data needs to be passed.
11 responseURL M Alphanum The merchant success URL where Payment
Gateway send the notification request.
12 errorURL M Alphanum The merchant error URL where Payment Gateway
send the response in case any error while
Processing the transaction.
13 expYear M Numeric Expiry year of card

14 expMonth M Numeric Expiry month of card

15 member M Alphanum Card holder name

16 cvv2 M Numeric CVV of the card

17 cardNo M Numeric Cardholders card number

18 cardType M Alphanum Card type Ex : Credit card – C, Debit Card – D

19 browserLanguage M Alphanu Value representing the browser language


m Returned from "navigator.language" property.
Length 1 to 8 characters.
20 browserColorDept M Alphanu Value representing the bit depth of the colour
h m palette for displaying images, in bits per pixel.
Obtained from Cardholder browser using the
"screen.colorDepth" property. Length 1 to 2
characters.

Values Accepted :

© 2020 API Guide Page 215 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

M/C
S.No Fields Field Type Description
/O

1 = 1 bit
4 = 4 bits
8 = 8 bits
15 = 15 bits
16 = 16 bits
24 = 24 bits
32 = 32 bits
48 = 48 bits
21 browserScreenHei M Alphanu Total height of the Cardholder’s screen in pixels.
ght m Value is returned from the screen.height property.
Length 1 to 6 characters.
22 browserScreenWid M Alphanu Total width of the cardholder’s screen in pixels.
th m Value is returned from the screen.width property.
Length 1 to 6 characters.
23 browserJavaEnabl M Alphanu Value is returned from the navigator.javaEnabled
ed m property. Boolean value.
24 browserTZ M Alphanu Time difference between UTC time and the
m Cardholder browser local time, in minutes. Value is
returned from the getTimezoneOffset() method.
Length 1 to 5 characters.
25 jsEnabled M Alphanu Value whether the java script is enabled in browser
m or not.

Request from Merchant to ARB Payment gateway:

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”,

"responseURL":"https://merchantpage/PaymentResult.jsp",

"errorURL":"https://merchantpage/PaymentResult.jsp"

}]

© 2020 API Guide Page 216 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Plain Trandata

Trandata will contain below parameters encrypted with AES algorithm with CBC Mode,
PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource key.

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”, // 1 - Purchase , 4 - Authorization

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”expYear”:”2022”,

”expMonth”:”12”,

”member”:”cardholdername”,

”cvv2”:”212”,

”cardNo”,”5453********5539”,

”cardType”:”C”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

"browserJavaEnabled":"true",

"browserLanguage":"en",

"browserColorDepth":"48",

"browserScreenHeight":"400",

"browserScreenWidth":"600",

"browserTZ":"0",

© 2020 API Guide Page 217 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"jsEnabled":"true",

”udf1”:”1”, //To identify Recurring based transactions

”udf2”:”SI”, //To identify Recurring based transactions

//Optional Parameters

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

Credit Card Installment Transactions

Detailed description of Plain Trandata request parameters

S.No Fields M/C Field Type Description


/O
1 udf6 C Alphanum Credit Card Installment Short Code

2 udf7 C Alphanum Credit Card Installment Type

Sample JSON request - Request from Merchant to ARB PG

//conditional - Credit Card Installment Transactions

"udf6":"12345",

"udf7":"C",

Payout Future

Detailed description of Plain Trandata request parameters

© 2020 API Guide Page 218 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

Conditional if Merchant Opted for Payout


JSON future.
1 accountDetails C
Array
Split Payment or Payout Details.

Bank Identification Code


Alphanu
2 bankIdCode C Min - 8
m
Max -12

IBAN Number
Alphanu
3 iBanNum C Min - 24
m
Max - 35

benificiaryNa Alphabe benificiaryName (English Only)


4 C
me tic Max - 100

serviceAmoun
5 C Numeric Service Amount
t

6 valueDate C Numeric Value Date Format: YYYYMMDD

Sample JSON request - Request from Merchant to ARB PG

//conditional if Merchant opted for Payout Future.

"accountDetails":[

{"bankIdCode": "12345d6f", "iBanNum":


"567896743281926354276254","benificiaryName":"AlRajhi Bank Services",
"serviceAmount":"200.00","valueDate":"20201231" },

{"bankIdCode": "1234ret3", "iBanNum":


"987656743281926354276254","benificiaryName":"DIGITAL CO",
"serviceAmount":"300.00","valueDate":"20201231" }],

SADAD

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 transactionTy C Alphanu Minimum length : 3 , Maximum length : 15


pe m

© 2020 API Guide Page 219 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Transaction Type Allowed Values 'PAY'


'PAY_SAVE' 'ADVANCE' 'PARTIAL_PAYMENT'
'OVER_PAYMENT'

2 billerID C Alphanu Minimum length : 1 , Maximum length : 3


m Biller ID

3 billAmount C Numeric billAmount

4 billType C Alphanu Minimum length : 7 , Maximum length : 8


m Bill Type. The allowed values are: - PREPAID : Paid in
advance - POSTPAID : Paid at the end

5 billNumber C Alphanu Minimum length : 1 , Maximum length : 30


m Bill Number as identified by SADAD

6 IDType C Alphanu Minimum length : 2 , Maximum length : 2


m ID Type 01 National ID Card 02 Iqama 03 Passport

7 IDNumber C Alphanu Minimum : 1 , Maximum : 20


m ID Number

Sample JSON request - Request from Merchant to ARB PG

//conditional -for SADAD merchant

"billingDetails" :

{"IDType":"01","IDNumber":"1072587916","billNumber":"00100100018","billType":"P
OSTPAID","billerID":"169","billAmount":5,"transactionType":"ADVANCE"

© 2020 API Guide Page 220 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response - Payment ID and Payment Page URL

ARB Payment gateway internally validates the request and gives payment ID and payment
page URL in the response if the validation success. If failure then, Error code and description
will be provided.

Initial Response from PG to Merchant

S. No Fields M/C/O Field Type Description

1 status M Numeric If the request validation success, then status will be


‘1’. If the validation failed, then status will be ‘2’
2 result C Alphanu It contains payment ID and Payment URL if the
m validation success else this will be null
3 error C Alphanu If validation failed, then Payment gateway will provide
m the respective error code
4 errorText C Alphanu If validation failed, then Payment gateway will provide
m the respective error description

Plain Response:

Success:

[{

"status": "1",

"result":"700212030953264091:https://securepayments.alrajhibank.com.sa/pg/
TranportalVbv.htm?paymentId=700212030953264091&id=r9Ht8R4U6g9dYtY",
//Payment ID:Payment URL

“error”:null,

“errorText”: null

}]

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

© 2020 API Guide Page 221 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

“errorText”:” Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL

Merchant needs to frame the payment page URL like the below sample

https://securepayments.alrajhibank.com.sa/pg/TranportalVbv.htm?paymentId=700112030
953264091&id=r9Ht8R4U6g9dYtYg

© 2020 API Guide Page 222 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Final Response – Transaction Status

Merchant needs to redirects the customer to ARB Payment gateway.

Customer browser will redirect to ACS page and will complete the authentication. PG then process for
authorization with the respective schemes. Once payment response received from respective scheme,
then ARB Payment gateway returns the response to merchant. This is URL redirection. Below is sample
response from ARB PG to merchant,

Final Response from ARB payment gateway to Merchant

S. No Fields M/C/O Field Type Description

1 paymentId M Numeric Unique ID generated by Payment gateway.


Merchant can store the payment ID to match the
final URL redirection response
2 trandata C Alphanu All the below response parameters encrypted
m and send the encrypted value in trandata
Ex:
[{“paymentId”:100201935166676976,”
result”:”CAPTURED”,”ref”:”93511000
0001”,”transId”:201935166561122,”d
ate”:1217,”trackId”:”1003383844”,”
udf1”:””,”udf2”:””,”udf3”:”8870091
137”,”udf

4”:”FC”,”udf5”:”Tidal5”,”amt”:”70.0,”authResp
Code”,”00”}]
3 Error C Numeric If any error, PG will provide the error code
4 ErrorText C Alphanu PG will provide the error description if any
m transaction declined.

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description

Unique ID generated by payment gateway.


1 paymentId M Numeric Based on this payment Id merchant can match
the final URL redirection response
Transaction status . Value will be 'CAPTURED' for
Alphanu
2 result M purchase successful and 'APPROVED' for
m
authorization successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by Payment


4 transId M Numeric
gateway and merchant can use this id for

© 2020 API Guide Page 223 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

initiating supported transactions (Void, refund


and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The


field data is passed along with a transaction
Alphanu
7 udf1 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.
The user (merchant) defines these fields. The
field data is passed along with a transaction
Alphanu
8 udf2 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.
The user (merchant) defines these fields. The
field data is passed along with a transaction
Alphanu
9 udf3 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.
The user (merchant) defines these fields. The
field data is passed along with a transaction
Alphanu
10 udf5 O request and then returned in the transaction
m
response. Merchant should ensure that field is
left blank when no data needs to be passed.

11 amt M Numeric Transaction amount

authRespCod
12 M Numeric Auth response code provided by PG
e

13 authCode M Numeric 6 digit authorization code received from switch

Alphabet Card Brand name . Value will be "Visa" or


14 cardType M
ic "MasterCard" or "Mada".
15 custid M Alphanu Customer ID needs to be sent in the subsequent
m Merchant Initiating recurring transactions

16 actionCode M Alphanu Action code of transaction. Possible Values


meric 1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization

© 2020 API Guide Page 224 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

14-Authorization Extension(MADA)

Sample JSON Response - Final

Redirection Parameters

 “paymentId”:”100201935044735860”,

 "trandata": "<encrypted trandata>",

 “Error”:””,

 “ErrorText”:””

Plain Trandata

[{“paymentId”:”100201935044735860”,

”result”: ”CAPTURED”,

”amt”:”10.55”,

”date”:1221,

”ref”:”935110000001”,-

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234",

“authRespCode”:”00”,

"authCode":"000000",

© 2020 API Guide Page 225 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"cardType":"Visa",

“custid”:”202014785236784”,

“actionCode”:”1”

}]

© 2020 API Guide Page 226 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Recurring Payment for MADA – Merchant


Initiated Initial Response - Payment ID and
Payment Page URL

Merchant forwards the API request to ARB Payment gateway, below is sample request.

Request

Request from Merchant to ARB payment gateway

S. No Fields M/C/O Field Type Description

1 Id M Alphanu Tranportal ID. Merchant can download the Tranportal id


m from Merchant portal
2 Trandata M Alphanu All the below request parameters encrypted and pass the
m encrypted value in trandata.

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

2 Action M Numeric It defines the transactions actions


Purchase: 1
Authorization:4
3 Password M Alphanu Tranportal password. Merchant download the same in
m merchant portal.
4 id M Alphanu Tranportal ID. Merchant download the same in merchant
m portal
5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 227 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

8 udf2 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
9 udf3 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
10 udf5 O Alphanu The user (merchant) defines these fields. The field data
m is passed along with a transaction request and then
returned in the transaction response. Merchant should
ensure that field is left blank when no data needs to be
passed.
11 cardType M Alphanu Card type Ex : Credit card – C, Debit Card – D
m
12 browserLangu M Alphanu Value representing the browser language Returned from
age m "navigator.language" property. Length 1 to 8 characters.

13 browserColor M Alphanu Value representing the bit depth of the colour palette for
Depth m displaying images, in bits per pixel. Obtained from
Cardholder browser using the "screen.colorDepth"
property. Length 1 to 2 characters.

Values Accepted :

1 = 1 bit
4 = 4 bits
8 = 8 bits
15 = 15 bits
16 = 16 bits
24 = 24 bits
32 = 32 bits
48 = 48 bits
14 browserScree M Alphanu Total height of the Cardholder’s screen in pixels. Value is
nHeight m returned from the screen.height property. Length 1 to 6
characters.
15 browserScree M Alphanu Total width of the cardholder’s screen in pixels. Value is
nWidth m returned from the screen.width property. Length 1 to 6
characters.
16 browserJavaE M Alphanu Value is returned from the navigator.javaEnabled
nabled m property. Boolean value.

© 2020 API Guide Page 228 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

17 browserTZ M Alphanu Time difference between UTC time and the Cardholder
m browser local time, in minutes. Value is returned from the
getTimezoneOffset() method. Length 1 to 5 characters.
18 jsEnabled M Alphanu Value whether the java script is enabled in browser or
m not.

Below is the sample encrypted request from Merchant to PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”

}]

Below are the plain Trandata request

[{

//Mandatory Parameters

“amt”:”12.00”,

”action”:”1”,

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”cardType”:”C",

"browserJavaEnabled":"true",

"browserLanguage":"en",

"browserColorDepth":"48",

© 2020 API Guide Page 229 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"browserScreenHeight":"400",

"browserScreenWidth":"600",

"browserTZ":"0",

"jsEnabled":"true",

”udf1”:”1”, //To identify Merchant Initiated Recurring transaction

”udf2”:”SI”, //To identify Merchant Initiated Recurring transaction

//Optional Parameters

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

Credit Card Installment Transactions

Detailed description of Plain Trandata request parameters

S.No Fields M/C Field Type Description


/O
1 udf6 C Alphanum Credit Card Installment Short Code

2 udf7 C Alphanum Credit Card Installment Type

Sample JSON request - Request from Merchant to ARB PG

//conditional - Credit Card Installment Transactions

"udf6":"12345",

"udf7":"C",

© 2020 API Guide Page 230 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Response

Once ARB payment gateway verifies the transaction and returns the response to the same
request.

Response from ARB Payment Gateway to Merchant

S. No Fields M/C/O Field Type Description

1 trandata M AlphaNu All the below response parameters will be provided in


m trandata field
2 error C Alphanu If any error during processing, PG will provide the error
m code
3 errorText C Alphanu If any error during processing, PG will provide the error
m description
4 status M Alphanu If transaction success 1.
m If transaction failure 2.

Detailed description of Plain trandata response parameters

S. No Fields M/C/O Field Type Description

Transaction status . Value will be 'CAPTURED' for


Alphanu
2 result M purchase successful and 'APPROVED' for authorization
m
successful.

3 ref M Numeric Transaction reference number (RRN)

Unique transaction Id generated by Payment gateway


4 transId M Numeric and merchant can use this id for initiating supported
transactions (Void, refund and inquiry)

5 date M Numeric Transaction date and time

6 trackId M Numeric Merchant unique reference no

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
7 udf1 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
8 udf2 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

© 2020 API Guide Page 231 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S. No Fields M/C/O Field Type Description

The user (merchant) defines these fields. The field data


is passed along with a transaction request and then
Alphanu
9 udf3 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.
The user (merchant) defines these fields. The field data
is passed along with a transaction request and then
Alphanu
10 udf5 O returned in the transaction response. Merchant should
m
ensure that field is left blank when no data needs to be
passed.

11 amt M Numeric Transaction amount

authRespCod
12 M Numeric Auth response code provided by PG
e

13 authCode M Numeric 6 digit authorization code received from switch

14 cardType M Alphabet Card Brand name . Value will be "Visa" or "MasterCard"


ic or "Mada".

15 actionCode M Alphanu Action code of transaction. Possible Values


meric 1-Purchase
2-Credit
3-Void Purchase
4-Authorization
5-Capture
8-Inquiry
9-Void Authorization
14-Authorization Extension(MADA)
16 card C AlPhanu Card Number used for Performing Transaction
meric
17 expMonth C AlPhanu Expiry Month of the Card
meric
18 expYear C AlPhanu Expiry Year of the Card
meric

Below is the sample encrypted response from PG to Merchant

[{

“tranid”: “201931951332346”,

"trandata": "<encrypted trandata>",

© 2020 API Guide Page 232 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

“status”:”1”, //1 for success transaction, 2 for failure transaction

“error”:null,

“errorText”: null

}]

Plain trandata in response

[{

“paymentId”:-1,

”result”:”CAPTURED”,

”amt”:”10.55”,

”date”:”1221”,

”ref”:”935110000001”,

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

”trackId”,”3423423”,

”transId”:”1242345345234”,

“authRespCode”:”00”,

"authCode":"000000",

"cardType":"Visa",

“actionCode”:”1” ”,

"card":"506968XXXXXX1063",

"expMonth":"06", //1 – 2 Digits

© 2020 API Guide Page 233 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"expYear":"2024" //2 – 4 Digits

}]

© 2020 API Guide Page 234 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

JS WIDGET Integration

Integration Process

Steps to be followed by Merchant Integration Team:

1. Merchant should login to certification environment with the user credential shared by
the Acquirer Bank .

2. Ex. https://www.securepayments.alrajhibank.com.sa/mrchptl/merchant.htm

3. Merchant should copy the js plug-in url and domain url from the menu “Merchant
Process -> Plug-in Download ->Js Plugin Url” inorder to connect Payment gateway
and Key will be shared by bank prime team for Encryption and Decryption purpose.

4. Integrate the Js plug-in and plug-in resource details with merchant web page.

5. Construct the Request message as expected by Payment Gateway

6. Process the response message receiving the response from Payment Gateway.

© 2020 API Guide Page 235 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

JS Plug-in URL

1. Click Merchant Process > Plug-in Download.

2. From the Plugin Download page, click Js Plugin URL link.


The application displays the URL on pop-up:

3. Click the Copy button to copy the plug-in URL.


The application displays the Domain URL
4. Click the Copy button to copy domain URL.
Key will be shared manually by bank prime team for Encryption and Decryption
purpose.

© 2020 API Guide Page 236 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Integrate JS plug-in with merchant page

Code snippet for Integration

/** Request Processing**/

//Merchant can connect JS Plugin using below step:

1. Merchant should import the js plug-in url which is copied from Plugin download menu.

Merchant Process-> Plug-in Download

Ex.<script src="https://securepayments.alrajhibank.com.sa/mrchptl/arb-widget/arb-
widget.js"></script>

2. Merchant should add the below mentioned code in their webpage.payment page will
get loaded in this div component.

<div id=”payment-widget-container” class=”payment-widget-container”>

</div>

//Set Values

3. Merchant should set payment values and customization values in merchant webpage
as below mentioned format.

Detailed description of Plain Trandata request parameters

S.No Parameter Data Type Data Input Description


1 tranportalId String Mandatory Terminal Unique ID
2 amount String Mandatory Transaction Amount
3 merchantRefId String Optional Merchant track id
sent by merchant
4 Action String Mandatory Transaction
Identification
5 Language String Optional Language Code
6 currencyCode String Mandatory Terminal Currency
Code

© 2020 API Guide Page 237 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Parameter Data Type Data Input Description


7 merchantResponse String Mandatory Merchant call back
URL success URL.
8 merchantErorURL String Mandatory Merchant call back
Error URL
9 shipToFirstName String Conditional Customer First
Name. Applicable to
Amex Transaction.
10 shipToCountryCd String Conditional Customer Country
Code. Applicable to
Amex Transaction.
11 shipToPostalcd String Conditional Customer Postal
Code. Applicable to
Amex Transaction.
12 shipToPhnNum String Conditional Customer Phone
Number. Applicable
to Amex
Transaction.
13 shipToLastName String Conditional Customer Last
Name. Applicable to
Amex Transaction.
14 shipToAddress String Conditional Customer Address.
Applicable to Amex
Transaction.
15 Udf1 String Optional User Defined Value
16 Udf2 String Optional User Defined Value
17 Udf3 String Optional User Defined Value
18 Udf4 String Optional User Defined Value
19 Udf5 String Optional User Defined Value
20 Udf6 String Optional User Defined Value
21 Udf7 String Optional User Defined Value
22 Udf8 String Optional User Defined Value
23 Udf9 String Optional User Defined Value
24 Udf10 String Optional User Defined Value
25 Udf11 String Optional User Defined Value
26 Udf12 String Optional User Defined Value
27 Udf13 String Optional User Defined Value

© 2020 API Guide Page 238 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Parameter Data Type Data Input Description


28 Udf14 String Optional User Defined Value
29 Udf15 String Optional User Defined Value
30 payorIDType String Conditional ID type Applicable
to MOF Transaction
31 PayorIDNumber String Conditional ID number
Applicable to MOF
Transaction
32 billDetails JSON Array Conditional Bill Details
Applicable to MOF
Transaction

Sample request

<script>

const reqBody={

"shipToAddress":"",

"udf15":"fifteen",

"udf14":"fourteen",

"udf13":"thirteen",

"udf12":"twelve",

"udf11":"eleven",

"udf10":"ten",

"language":"USA",

"shipToPhnNum":"7548758433",

"tranportalId":"200123",

"udf9":"nine",

"shipToCountryCd":"356",

"udf7":"seven",

© 2020 API Guide Page 239 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"udf8":"eight",

"customerId":"",

"action":"1", //1–Purchase

"shipToLastName":"name",

"amount":"36.00",

"shipToFirstName":"tesdt",

"udf5":"6a8b21f7d9f9a4c5be6297d0f6a9b51e7461ce5b31a12861c655fc9ae300176
a",

"shipToPostalcd":"4758845",

"udf6":"816",

"udf3":"9159277647",

"udf4":"",

"udf1":"",

"udf2":"",

"merchantResponseURL":"http://www.demomerchant.com/result.jsp",

"merchantRefId":"2009038955", //Merchant Track ID

"currencyCode":"356", //Transaction Currency

"merchantErrorURL":"http://www.demomerchant.com/error.jsp"

"contextPath":"https://products.arb.co.in/iPayRMP",

"payorIDType" : "C700",

"PayorIDNumber" : "9486576749",

"billDetails" :
"[{"issuerAgencyId":"123456789987654312","billingAccountId":"123456789"
,"billingCycle":"789456132","dueAmount":"150","paidAmount":"18","billRe
ferenceInfo":"bxcbcbhgcfgcgffg","agencyCode":"qwer"},{"issuerAgencyId":

© 2020 API Guide Page 240 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

"123456789987654311","billingAccountId":"1234567890","billingCycle":"78
9465466","dueAmount":"100","paidAmount":"18","billReferenceInfo":"xbdxc
bvcgvfgh","agencyCode":"qwty"}]"

styleReqBody = {

"headerBgColor":"blue ", //Header background color

"payButtonBgColor":"blue", //footer background color

"payButtonColor":"blue", //footer text color

"textFontColor":"blue" //font color

"containerBgColor":"blue" //container background color

"formBgColor":"blue" //Payment component background color

</script>

Domain url value which is copied from ‘resource file download’ menu should be set to
reqBody.contextPath

Request from merchant after encryption:

{"tranportalId":"IPAYef5RJ0IA5fr","trandata":"7A3694942E88633E572744674
7FF72F659364BD1A587001B5501722CF2D0EA303E7D2919C37AB4D7CA1908856CD05E11
4CFA0121DD7FFD576E7057D7EC2880EE7133077D692A20206DCEC14877CFDCE8733B982
CD731E0DB57DB0FD3B8A40534D7BCD488EE6979F05A1E7E922A81D047D62140179BAB82
D2DF17FED69F156124D3556436627BBA8C62C76DAEAFF9A0A043CA5C71E24D67758DB8A
B481F37C620452D5982D580F8B978DC0206C6AB4F4A2FD77CFD71BFED233A0C5F7B33A9
C6989908466CD90DAC61BE9890F066BF6DFFEAEB6D00DDFFFA8CED414242F5F4DD141F8
0AE4081C03B25CE08B4B62FFD04AF9C2F432E6617A56DFF610BB14D21BB23B49B410287
80183BB82B4E3E098F1303345E5830048AC51A2D8CA28F81A498ACFEA89B7984FCBAB03
6247D0E17B93A7F7BA0401D1E7FE81B3B19D2CE806E46F9393E61F68EA3ECA0FAEF66A3
09EF6F7FE1973B4145085C917CD8D72A02B86D200D913AEE2646FD3F2AF91E923C55E2C
8C29FB1C6A56829C4A95970578BA5437128E5D3C372DEE9A164FDA4CB63609D1655B47A
496565872238726271BC6D5AB70365F6D383FC38B08A7AF55070EF876D1B5B6C551E146
C25932294F472A1DCF46ABF89C16C10CFE2C968B1983CC906C5728942B2F9C115DFAEFE
2DB38844B4B23E88C0530412BE1094F65F3FD4F2C78F3CECAF0C436BCFD971B6A9CD6DD
DA30E36A9557120948C3915C45413AAEAC124CEC33CA273E4158661B49966A1108DFC2E
11718CB8CD5A545DBB25CDF7BBDE54A3E277D594235FADA6FDE03D0FB86E685C42AAA17
5E0666F0FC6E519119858E41D2F98344628B95AEDF8B43FCCF2B91BE61F8B0A8E7DAE53

© 2020 API Guide Page 241 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

118CAF81AA5B61A31E19D71E38200F422ADCAECAA43C1148746710FCB65CE9152951B9C
067488549FA538A0962AD5A318A24A93B1F3CAC60B1A6E814D3C58E931C9D884F318D68
A0A29F74E884DD8603ABB79B5F72F0CF55FCC45F2977605084E10D695AD0E0CB4F1EDF1
6E797F686F881D63E104553CB7FC49E126FD5E964234A393A22A0057A55338D16CA07CB
07219A11351EAF2088DD686A64B00CCDB3DA30392A8AFC0956E711CB26171DD662E069B
4DBFACEFBE0DE69C9B2C21F6019CD5B638A4883404C83C585404EFE6402FBF95F2FB1FE
0C674E8B4E9C4154896999CB3D80CEE8C70C635EC375E5D55F1F6EAB9F4C8236D306EBB
984EA37C99E57022481254804EDB07C7A3B7502C248254E945F34BCA6544B88FF91D369
DF13D535C0B3780ED0E42DED693880A4BCDD7BCECAD39AFF850B33A9A1127CC9C313D97
8BCE65D07C719EA69AD553252EA520A91FD17336D5A7F0BEE577F45BCA507541402B20C
08F0EA454A4B04A1DCC360FF09774C730C55143F33354EB4BAB236AE6C760513BCB7A04
7A9D3561DD191C3E0622AC8EE8E7368F538C91543DA232BA429F97CA67EF58620E502DE
E33ADB67723B0F026D4E5787E2D378860CEC452D2B6D55B408B72A3DBED3BFBE4062F0C
20863ABD10947D0273C01C67CE11A1ADE96E21942BFBAF1905678D4930C375CD1B52EC4
4E48DBC299B74B4511061FFC500FE39064F2FE426867EAD929783EE8EC34F2DEC1FFB0C
B76CC071E317B28B0FD984AF38315DDE5927ED570EC3C018EC1A94F38BC9D9F429DBE8D
1DDFA2BAFDCBFFD80DF8A56211EC4ED037E2FFA0D7EA614AB5E60FF5FBCAF88E9FA4296
05605D813826D43E8234B3D4F57F9BD8951E23CB7BF80B4D14A5C48191F724F9BC27E9B
95B075205CB94A65B34235F4F5E911B805DBCE83271D81ED08B1305AF98A520611729E8
C3EC1AD53ED8145286473BC52511B158725994F4F4B054CA4F96AC48FDAC2E87C3AFA01
F9212A5614A3F0EEA0A1A5ECA0DC602BD7B57304C28C19C84AC52232CDB454C4BB58ACF
4D66665548AE2963C9F06448379920BF18658582BD174B192569B0BC1064105E35D453F
D2161B9C277F50385C628E3B491BB790A7D4AC1DC911CA052F72E633D097B485044E598
36FF72B2D6C7A8CE86F1298C5EDE7ED73F7AB87D707D15B09FDB6CF823E707B2738698E
423AD9FB0786423DAB6427A1D5D8F92F67C7C1DB0491B489F6377A759190ED784E69224
9DF690C5A71E8559B0F402E5805EFC3855EA41EBFCD3FF163F348340EBC539C6B3BBB5A
5E77E3F60FE279F4AEF90D9BEF2A2894E694DA5166EB172CFFED1B3857E0C997F5CE834
8C74716F983B5EA744E81AC61CB2667F9550012C062542F01ADD971D91483BDB2D8CC46
025AC37C4750B4F8094E5E69BA37901DD61511C315F39FF3D337A21448C788F343E4796
CE70AEF9A9ECCABBB3353A616A9D7DDDC5F0CE9A73F8C8B51471F97A25BCE00E3DE9B77
98CFB400585A0F186C66C243A9557DDA28B8E206F54B30C1F739F640B8419655B5B995C
C3E7F36461653BFBE628C3B0424A6F1667BDDE9C91FE21A5017E6DD7ED3A75430D5DCA5
278DC004F79FFAE868B0A40B7CD519AE1A301D699EBC3BAF5470DBBD263BC6F54E285E8
51F4F31CC9ED56DDE4C35E48A261D2F0DC4CE00D8778A60D34C9D5019722BA69D3808A3
6EE9C5474900AB152328B0C0D8C10435E371709D80C209DA77D9AE6D3AE011421ADB5A0
996E63351A64A88F467D636BD339B4BD4786F509F681194282B59F6767DDA7DC9BA00A0
867DCE7D9D3A28F963967F659C74ED89F88B4A5B13129FE47D21A0A469D674A1233B60A
35F8DB233E9484CEE86DE99DED51CECE9A022B7010075B9525C62A0DCA46E3A7176297C
74E088BC3DEC4F092EF6EB18A808888D86765D4EF9FE7AC6B556D56BA5004E1176AF25B
14DEC0F429A2EFA4A26415BF4FC39358803E9A6713BD36E83511BD5D73D8F31","conte
xtPath":"http://10.44.11.71:8085/iPayARBNET","merchantResponseURL":"htt
p://10.44.11.71:8085/widgetdemo/jsp/arb/HostedPaymentResult.jsp","merch
antErrorURL":"http://10.44.11.71:8085/widgetdemo/jsp/arb/HostedPaymentR
esult.jsp"}

/** End of Encryption **/

© 2020 API Guide Page 242 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Loading payment page in merchant

// For Loading payment page from widget, the method to be called is


makePayment()

$("#pay").click(function(){

$("#pay").hide();

makePayment();

});

/** End of Request Processing**/

Final Response

S.No Field Type Description

1. paymentid Numeric Unique Id generated by Payment Gateway.


Merchant MUST map this payment ID with
merchant track Id and transaction amount for
future transaction reference.
(ex : 501201906013287030)

2. result Alpha Describes the result of the transaction


(ex: CAPTURED).

3. auth Alphanumeric The resulting authorization number of the


transaction from the issuing bank. This number
or series of letters is used for referential
purposes by some acquiring/issuing
bank/institutions and should be stored properly.
(ex: 099673)

4. amt Numeric Transaction Amount as sent by merchant in the


request

5. ref Alphanumeric The resulting reference number of the


transaction. This number or series of letters is
used for referential purposes by some

© 2020 API Guide Page 243 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Field Type Description

acquiring/issuing bank/institutions and should


be stored properly.

6. postdate Numeric Transaction Date in the format of the


authorization system, Post Date is business logic
date of respective issuing bank and may not be
same as the actual transaction date.

7. trackid Alphanumeric Track ID value that was sent by merchant in the


transaction request

8. tranid Numeric Unique Transaction ID generated by Payment


Gateway, this transaction ID is required for any
future support/subsequent transaction
(Refund/Void/Capture) to be performed by
merchant on Payment Gateway, merchant
should store this parameter properly

9. avr Alphanumeric Address verification response.

10. ErrorText Alphanumeric Describes the error with Error code.


(ex. IPAY0100126-Brand not enabled)

11. Error Alphanumeric Error code of the error.


(ex. IPAY0100126)

12. authRespCode Alphanumeric This is Response Code i.e. the reason code for
the transaction. Merchant can use this code for
additional validation of the transaction and can
also use this response code field along with the
reason code description list.
(ex:00)

13. udf1 Alphanumeric Udf field sent in the request

14. udf2 Alphanumeric Udf field sent in the request

15. udf3 Alphanumeric Udf field sent in the request

16. udf4 Alphanumeric Udf field sent in the request

© 2020 API Guide Page 244 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

S.No Field Type Description

17. udf5 Alphanumeric Udf field sent in the request

18. Udf6 Alphanumeric Udf field sent in the request

19. Udf7 Alphanumeric Udf field sent in the request

20. Udf8 Alphanumeric Udf field sent in the request

21. Udf9 Alphanumeric Udf field sent in the request

22. Udf10 Alphanumeric Udf field sent in the request

23. Udf11 Alphanumeric Udf field sent in the request

24. udf12 Alphanumeric Udf field sent in the request

25. Udf13 Alphanumeric Udf field sent in the request

26. Udf14 Alphanumeric Udf field sent in the request

27. Udf15 Alphanumeric Udf field sent in the request

28. custid Alphanumeric Customer id for SI registration txn.

/** Response received from Payment Gateway to Merchant **/

{"trandata":"2B1E3C6E62299D5DC43D59BC864C7003577DE32CF9EBB5ED30C7CC86DA8BA324F
1D88AFE9821E2378DDCEA5F46206837B928A1BFF528C95DDBC8F06A24A7287BE1FE1726AB0D598
70A8BC4DFB7BA6FD98F432051D2EDE899E42EEC157163B48DC2D217BD02DAC2542F25C3D0D042D
387B4E53DA8C2BE66C56D292C58CF22709563A0FF7B1078147E4632D2E2BFC4C723905BE57106C
4B4A4F4F4B8D010E2AD05331E8E051EBE61972B3DA02C3A1A712ACF9428A4E83D9D524BD4EF78A
C286B64FFF32DD29086690E44666ADB13E4097B6DC706D09C7FE9689511C4B70A58544AE3D40D3
808F451AFE15D2323C09CC42C5CBDB611F880EC46CF83CC146A0C314397A86835C3A383BBA5164
3D805533D3F332A46D14CE67E79B479A23F67882A1C889670BE5793A535EB2613D4948BFF5826A
40B4B4FD9F7AE92FA1DA1DF945143661E1781D917F52796CE58278AE5CDB21C9AB843F515670B1
7BB7D654FB5846C2426A19C37B009464A505A22FE76C447B69F6CD6949D06AB1437D3820787863
CA4278A1A0529DCA254017FFF315FB0D819D1B71495A37388CDF0992D5FECFD572EE7BC26D2C49
D3003ACAFAAC365F0CDB6FCCD05F61CD79B24A4CEF7B7466F8E989B7EE3EFF2BFC5E0B4CDDA626
D593A61AF4427A4683462302B2099063B50C634789E75EE7D3AC86444E7B998175596994026239
BA00E27AEEB2FC64236E0F29FA638FF83424F45F53FBF59DCB78ACF2FB2A2E09E1825B6507062E
C954C3D92B30EF3EAA86C911E636308DA1F115BD75830678E4391DA5F9977737BDDBC60D0A0F92

© 2020 API Guide Page 245 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

3C381C0B0044942FEA7BA703545071E04FCC42589B2C93FA5D155BF9C055F31125A5178B08EEAD
9A8B424B7EB1EDF0B507EFB79F77E2FB465D2CDB98B4C59251A13530483CCDFA6128E8E18F20E6
F942D303A317FF716105C5A77355275EAEAE8D347BA605CAE3A7F97444A09537238232763732D9
36CB414B77DC0B4C77DAC7C049BB4830FD6A3D531015F9E340E165A2B3A0084C218BECE6667C11
18D122A5200110B94AEBFE8D91222925D2A80CC5BAA7EEB201241F8BD3750870AD04BAEFB79431
00A974EE4639FE9A4E2C50DAAC8331692DF283B7A81CF807665E6FBFBF6C80E3766EEDB50A310E
25699471B5EE4378FA4AD26732CD486722E9378FF0E65FABF6037E295FBD966EAFED826684DA88
C65044F376A6A8F44218AA5EB9D3EECE28AA3A577640712D5CBCA1D15BB58E91DE48FFD7A50F77
620AA118D65BC32BC60220EE97E466ECB0B78F8AD78C32E0E0BDE7EEB8894F198EEB58984A0B55
522FA27D8453DDC333A70147CE3D9E4FA36F36A465E3BA60B8A60A012E337E2CF1B3FDA28D69D1
4838364B1C003891972FA6EA7B73A124715DA4208C91D9D27F65DB6AC718AFC923655D4BA11369
1FB227EA1BA2432920635329E10C6B16F26CF4BFD5C1675AAD73C884CC0170B34BB3FB21BC621E
27406ACA2265E59728AAA3CD71B3EF0A647C6AE71EAFE2C0CB3EFB6918EC4475F7007372657186
9C6A511DE715A5EE4E3855AC359011EB424F7B02AA4CBD15A65DA01E9C794A57092D309712B433
AC83A3F76E7C727509399BE9765D4842A9E956AB4C2C81A43CC144273367002689079DD8F8F7F2
F6BD725A108FA6F57B3156439EEF477B9EAAE2177B65DB6B783672ACADC217F52AFEBA920D1381
DEF2FC195DC96193ACABC6EABD56CDFD5B407F5AA42E85840BB7E6B266C8047538B3307FD97FAC
4B5D900226884CAA1793EC93D56F77CDCC3C3593A362C29BD25BC2B137C0A735CD4B305A8C8D31
F89C0EC433B913C37375451A75F577E77147B2A3B0D6873E82773762871E381DD05BEE88CAAFBF
0C457E201EE862A47","currCD":"356","paymentId":"100202128054842905","trackid":"
2138298712","tranAmt":36,"custid":202128045180741,"merchantResponseURL":"http:
//10.44.11.71:8085/widgetdemo/jsp/arb/HostedPaymentResult.jsp"}

After receiving the above response merchant need to decrypt the above trandata from
response with the help of decryption code.

Response from payment gateway will be posted to merchantResponseURL.

Success Response Parameters Description


result CAPTURED for Purchase
transaction. Other than above value
considered the transaction as failure
date Contains Postdate
Ref Transaction reference no.
trackid Containts merchant unique track id
tranid PG Transactuion ID
udf1 UDF Values sent during initial leg
udf2
udf3
udf4
udf5

© 2020 API Guide Page 246 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

udf6
udf7
udf8
udf9
udf10
udf11
udf12
udf13
udf14
udf15
paymentid PG PaymentID
amt Transaction amount
custid Contains Customer ID for SI
registration transaction.

Sample JSON Response - Final

If Merchant notification is disabled, then ARB Payment gateway will provide the final
response in URL redirection. Below is the sample response from ARB PG to merchant

[{

//Redirection Parameters

“paymentId”:”100201935166676976”,

“trandata”:”<encrypted trandata>”,

“error”:””,

“errorText”:””

}]

Plain Trandata:

Trandata will contain below parameters encrypted.

[{

“paymentId”:”100201935166676976”,

”result”: ”CAPTURED”,

© 2020 API Guide Page 247 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

”transId”:201935166561122,

”ref”:”935110000001”,

”date”:”1217”,

”trackId”:”1003383844”,

”udf1”:””,

”udf2”:””,

”udf3”:”8870091137”,

”udf4”:”FC”,

”udf5”:”Tidal5”,

”amt”:”70.0,

”authRespCode”,”00”,

"authCode":"000000",

"cardType":"Visa"

}]

Trandata after decryption :

[{"date":"1007","authRespCode":"00","authCode":"000000","agencyDetails":[{"bil
lReferenceInfo":"bxcbcbhgcfgcgffg","dueAmount":"150","billingCycle":"789456132
","issuerAgencyId":"123456789987654312","billingAccountId":"123456789","agency
Code":"qwer","paidAmount":"18"},{"billReferenceInfo":"xbdxcbvcgvfgh","dueAmoun
t":"100","billingCycle":"789465466","issuerAgencyId":"123456789987654311","bil
lingAccountId":"1234567890","agencyCode":"qwty","paidAmount":"18"}],"transId":
"202128045169265","trackId":"2138298712","udf5":"c3af040d7ce24256064aa421d5b2b
39898325614eafc2f79a3dfd82059906cf5","cardType":"Visa","udf6":"816","udf10":"t
en","amt":"36.0","udf3":"","udf4":"","udf1":"1","udf2":"SI","result":"CAPTURED
","ref":"128010000008","udf9":"nine","paymentId":"100202128054842905","udf7":"
seven","udf8":"eight","fcCustId":"0","paymentTimestamp":"2021-10-
07T07:06:01.554Z"}]

/** End of Response Processing**/

© 2020 API Guide Page 248 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample Demo page Navigation

Hosted Payment Integration

Step 1: Merchant’s page

When the Customer log on to the Merchant website, Merchant will show the plans page
for online shopping.

Step 2: Plans selected by the customer for purchase:

If the customer clicks “Enroll in course”, then the Order summary confirmation will be
shown.

© 2020 API Guide Page 249 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Step 3: Payment Page:

Once the customer clicks “Confirm and Pay”, this page is shown by widget in merchant
webpage. Here the customers have to give their card credentials.

//Payment page for Credit, Debit card instruments

Step 4: Merchant Response Page:

After processing transaction, Payment Gateway shall send response to the Merchant.

© 2020 API Guide Page 250 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Best Practices:

a) The Merchant should mandatorily maintain logs for each transaction as


mentioned below
a. The parameters before setting the values in the respective variable.
b. Request from the merchant server to Payment Gateway
c. Response that is received from the Payment Gateway in the Merchant
Response URL
b) The Merchant should maintain "OWASP" (Open Web Application Security
Project) Top 10 recommendation in their web application. (These
recommendations are available on www.owasp.org)
c) The Merchant should have the latest SSL security certificate in the payment
request and receive webpage, if any. Always ensure that the SSL certificate
is valid and has not expired. Such certificates should be as per the approved
list of the Acquiring Bank. Self singed certificates are not supported by
Payment Gateway in Test and Production Environment.
d) The Merchant should mandatory complete the UAT and ensure all results
are in line with the recommended response prior to going LIVE.
e) Any changes in the pages would need to be tested before moving to
Production after proper communication to the Bank personnel and receipt
of approval. If the pages have a change in logic or transaction flow
particularly, the Acquiring Bank’s consent is Mandatory.
f) The transaction request and Response Handling: For ease in integration,
“Sample/Demo pages “provided in the integration document are essentially
for representation purposes only. The actual pages have to be necessarily
developed and implemented by the Merchant’s development team and used
in both the Test and Production environment. The Sample demo pages are
provided for the logical understanding and transaction flow only. An ideal
logical flow for the merchant to process the customer input data is to collect
the shopping details of the customer such as transaction amount, merchant
track id and other parameters and stored in a secure storage location and
validated immediately against the details of shopping cart module.
g) Maintenance of Transaction Logs: It is essential for the transaction logs to
be maintained in a secure storage location within the environment. This is
crucial in order to trace transaction history in case of a dispute raised by a

© 2020 API Guide Page 251 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

customer or even internal audit purposes. These logs should ideally include
the customer IP address as well apart from the other transaction details.

© 2020 API Guide Page 252 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Private and Public key

- If Merchant opted for private and public key future. ARBPG provide two keys for
encrypting and decrypting the request and response respectively.
- Purchase Transaction: Key 1 should be used for encrypting the Request. Key 2 should
be used for decrypting the response from payment gateway.
- Supporting transaction: Inquiry, Refund and Reversal transactions should be done by
key 2 only i.e Key 2 should be used for encrypting and decrypting the request and
response respectively from Payment Gateway._Toc31220960

© 2020 API Guide Page 253 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Setting Up Your Server

Overview

 All pages that include Apple Pay must be served over HTTPS.

 Your domain must have a valid SSL certificate.

 Your server must support the Transport Layer Security (TLS) 1.2 protocol and
one of
the cipher suites listed in the below.

TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

Whitelist Apple Pay IP Addresses for Merchant Validation

 To enable merchant validation and receive a session object, your server must
allow access over HTTPS (TCP over port 443) to the Apple Pay IP addresses
and domains provided below

For production environment:


Domain apple-pay-gateway.apple.com
17.171.78.7 apple-pay-gateway-nc-pod1.apple.com
17.171.78.71 apple-pay-gateway-nc-pod2.apple.com
17.171.78.135 apple-pay-gateway-nc-pod3.apple.com
17.171.78.199 apple-pay-gateway-nc-pod4.apple.com
17.171.79.12 apple-pay-gateway-nc-pod5.apple.com
17.141.128.7 apple-pay-gateway-pr-pod1.apple.com
17.141.128.71 apple-pay-gateway-pr-pod2.apple.com
17.141.128.135 apple-pay-gateway-pr-pod3.apple.com

© 2020 API Guide Page 254 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

17.141.128.199 apple-pay-gateway-pr-pod4.apple.com
17.141.129.12 apple-pay-gateway-pr-pod5.apple.com
17.171.78.9 apple-pay-gateway-nc-pod1-dr.apple.com
17.171.78.73 apple-pay-gateway-nc-pod2-dr.apple.com
17.171.78.137 apple-pay-gateway-nc-pod3-dr.apple.com
17.171.78.201 apple-pay-gateway-nc-pod4-dr.apple.com
17.171.79.13 apple-pay-gateway-nc-pod5-dr.apple.com
17.141.128.9 apple-pay-gateway-pr-pod1-dr.apple.com
17.141.128.73 apple-pay-gateway-pr-pod2-dr.apple.com
17.141.128.137 apple-pay-gateway-pr-pod3-dr.apple.com
17.141.128.201 apple-pay-gateway-pr-pod4-dr.apple.com
17.141.129.13 apple-pay-gateway-pr-pod5-dr.apple.com
101.230.204.232 cn-apple-pay-gateway-sh-pod1.apple.com
101.230.204.233 cn-apple-pay-gateway-sh-pod1-dr.apple.com
101.230.204.242 cn-apple-pay-gateway-sh-pod2.apple.com
101.230.204.243 cn-apple-pay-gateway-sh-pod2-dr.apple.com
101.230.204.240 cn-apple-pay-gateway-sh-pod3.apple.com
101.230.204.241 cn-apple-pay-gateway-sh-pod3-dr.apple.com
60.29.205.104 cn-apple-pay-gateway-tj-pod1.apple.com
60.29.205.105 cn-apple-pay-gateway-tj-pod1-dr.apple.com
60.29.205.106 cn-apple-pay-gateway-tj-pod2.apple.com
60.29.205.107 cn-apple-pay-gateway-tj-pod2-dr.apple.com
60.29.205.108 cn-apple-pay-gateway-tj-pod3.apple.com
60.29.205.109 cn-apple-pay-gateway-tj-pod3-dr.apple.com

For sandbox testing only:


17.171.85.7 apple-pay-gateway-cert.apple.com
101.230.204.235 cn-apple-pay-gateway-cert.apple.com

Whitelist Apple IP Addresses for Domain Verification

 Apple uses the following IP addresses when you register or verify your
merchant domain. If your domain is protected from public access and you
wish to complete domain verification, you should whitelist the following IP
address ranges.

17.32.139.128/27
17.32.139.160/27

© 2020 API Guide Page 255 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

17.140.126.0/27
17.140.126.32/27
17.179.144.128/27
17.179.144.160/27
17.179.144.192/27
17.179.144.224/27
17.253.0.0/16

© 2020 API Guide Page 256 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Apple Pay Process for merchant registration


and certificates

Create a merchant identifier

 In Certificates, Identifiers & Profiles, select Identifiers from the sidebar, then
click the Add button (+) in the upper-left corner.

 Select Merchant IDs, then click Continue.

 Enter the merchant description and identifier name, then click Continue.

 Review the settings, then click Register.

Create a payment processing certificate

 In Certificates, Identifiers & Profiles, select Identifiers from the sidebar.

 Under Identifiers, select Merchant IDs using the filter in the top-right.

 On the right, select your merchant identifier.

 Under Apple Pay Payment Processing Certificate, click Create Certificate.

 Click Choose File.

 Upload the Payment Processing CSR file i.e generated initially

 Click Continue.

 Click Download.

 Convert the downloaded .cer file to jks file and save to the .bin file for
payment token decryption process.

Merchant Domain Verification

© 2020 API Guide Page 257 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

 In Certificates, Identifiers & Profiles, select Identifiers from the sidebar.

 Under Identifiers, select Merchant IDs using the filter in the top-right.

 On the right, select your merchant identifier.

 Under Merchant Domains, click Add Domain.

 Enter your domain name and click save.

 Download the apple-developer-merchantid-domain-association.txt file.

 Place the downloaded file in the virtual directory of the server to complete
domain validation method using virtual directory.

 Apple will initiate the request in below format to check the file is present or
not.

https://www.yourdomain.com/.well-known/apple-developer-merchantid-
domain-association.txt

Create a merchant identity certificate (This is only required for Bank


hosted integration)

 In Certificates, Identifiers & Profiles, select Identifiers from the sidebar, then
select Merchant IDs from the pop-up menu on the top right.

 On the right, select your merchant identifier.

 Under Apple Pay Merchant Identity Certificate, click Create Certificate.

 Create a certificate signing request on your Mac, and click Continue.

 Click Choose File.

 Upload the Merchant CSR file i.e generated initially

 Click Continue.

 Click Download.

© 2020 API Guide Page 258 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

 Convert the downloaded .cer file to jks file and save to the trustore
and keystore files to perform 2-way TLS handshake.

© 2020 API Guide Page 259 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Commands to generate Merchant Identity


Certificate and Payment Processing Certificate

Generating a Merchant Identity Certificate

 Generates a Certificate Signing Request (CSR) for a Merchant Identity


 Certificate per the following (and keeps the private key safely):
a) Command-line tools (either OpenSSL or Keytool can be used)
(i) OpenSSL
• Generate key pair in a key file
openssl req -new -newkey rsa:2048 -nodes -out rsacertreq.csr -
keyout
rsakey.key -subj /CN=www.mydomain.com
(ii) Keytool
• Generate key pair in a pkcs12 file
keytool -genkeypair -keyalg RSA -keystore rsakeystore.p12 -
storetype
pkcs12 -keysize 2048 -alias rsakeyname -dname
CN=www.mydomain.com
• Generate CSR from key pair in pkcs12 file
keytool -certreq -alias rsakeyname -file rsacertreq.csr -keystore
rsakeystore.p12 -storetype pkcs12
 Then uploads the Merchant Identity Certificate CSR in apple portal.

 Download (and backup) the Apple signed Merchant Identity Certificate,


merchant_id.cer

 Import merchant certificate and private key to generate P12


a) Command-line tools
(i) OpenSSL
• convert merchant_id.cer to PEM
openssl x509 -inform DER -in merchant_id.cer -out merchant_id.pem
• Import merchant certificate and private key to generate P12
openssl pkcs12 -export -out Certificates.p12 -inkey rsakey.key -in
merchant_id.pem

 Convert .p12 file to jks file and save into trustore and keystore file.

© 2020 API Guide Page 260 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

a) Command-line tools
(i) Keytool
keytool -importkeystore -srckeystore Certificates.p12 -srcstoretype
pkcs12 -destkeystore applepaytrustore.bin -deststoretype jks

 Ensure below mentioned Apple Root and Intermediate certificates are


installed in your truststore to perform 2-way TLS handshake.
Download certificates using below links
https://www.digicert.com/digicert-root-certificates.htm
https://www.apple.com/certificateauthority/
(i) AppleRootCA-G3.cer
(ii) DigiCertGlobalCA-3G2.crt
(iii) DigiCertGlobalRootG2.crt

Generating a Payment Processing Certificate

 Generates a Certificate Signing Request


(CSR) for a Payment Processing Certificate per the following (and keeps the
private key
safely):
a) Command-line tools
(i) OpenSSL
• Generate key pair in a key file
openssl ecparam -genkey -name prime256v1 -out ecckey.key
• Generate CSR from key pair in key file
openssl req -new -sha256 -key ecckey.key -out ecccertreq.csr -subj
/CN=www.mydomain.com
(ii) Keytool
• Generate key pair in a pkcs12 file
keytool -genkeypair -keyalg EC -keystore ecckeystore.p12 -
storetype
pkcs12 -keysize 256 -alias ecckeyname -dname
CN=www.mydomain.com
• Generate CSR from key pair in pkcs12 file
keytool -certreq -sigalg SHA256withECDSA -alias ecckeyname -file
ecccertreq.csr -keystore ecckeystore.p12 -storetype pkcs12

 Then uploads the Payment Processing Certificate CSR in apple portal.

© 2020 API Guide Page 261 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

 Download (and backup) the Apple signed Payment Processing


Certificate,apple_pay.cer

 Import payment processing certificate and private key to generate P12


a) Command-line tools
(i) OpenSSL
• convert apple_pay.cer to PEM
openssl x509 -inform DER -in apple_pay.cer -out apple_pay.pem
• Import merchant certificate and private key to generate P12
openssl pkcs12 -export -out ecckeystore.p12 -inkey ecckey.key -in
apple_pay.pem

 Convert .p12 file to jks file and save into .bin file.
a) Command-line tools
(i) Keytool
keytool -importkeystore -srckeystore Certificates.p12 -srcstoretype
pkcs12 -destkeystore applepaytrustore.bin -deststoretype jks

© 2020 API Guide Page 262 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Merchant Hosted URPAY Integration

Merchant forwards the API request to ARB Payment gateway, below is sample request.

Attributes - Request from Merchant to ARB PG

Field
S. No Fields M/C/O Description
Type
Tranportal ID. Merchant can download the Tranportal id
1 id M Alphanum
from Merchant portal
All the below request parameters encrypted and pass the
2 trandata M Alphanum
encrypted value in trandata.
The merchant success URL where Payment Gateway send
3 responseURL M Alphanum
the notification request.

4 errorURL M Alphanum Merchant error URL

Detailed description of Plain Trandata request parameters

S. No Fields M/C/O Field Type Description

1 amt M Numeric Transaction amount

It defines the transactions actions


2 action M Numeric
Purchase: 1

Tranportal password. Merchant can download the same from the


3 password M Alphanum
portal.

4 id M Alphanum Tranportal ID. Merchant can download from the portal

© 2020 API Guide Page 263 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

5 currencyCode M Numeric 3-digit currency code of KSA. Ex:682

6 trackId M Numeric Merchant unique reference no

7 udf1 O Alphanum The user (merchant) defines these fields. The

8 udf2 O Alphanum The user (merchant) defines these fields. The

9 udf3 O Alphanum The user (merchant) defines these fields. The

10 udf4 O Alphanum The user (merchant) defines these fields. The

11 udf5 O Alphanum The user (merchant) defines these fields. The

The merchant success URL where Payment


12 responseURL M
Alphanum Gateway send the notification request.
13 errorURL M
The merchant error URL where Payment Gateway send the
Alphanum response in case any error while Processing the transaction.
14 MobileNumber M
Numeric Contains 9 digit URPAY registered mobile number

Sample JSON request - Request from Merchant to ARB PG

[{

//Mandatory Parameters

"id":"IPAYlCR6qZF7q6w",

“trandata”:”<encrypted trandata>”, (encrypted with AES algorithm with CBC Mode)

"responseURL":"https://merchantpage/PaymentResult.jsp

", "errorURL":"https://merchantpage/PaymentResult.jsp"

}]

© 2020 API Guide Page 264 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Plain Trandata:

Trandata will contain below parameters

PKCS5Padding with initialization vector value PGKEYENCDECIVSPC under Resource key.

[{

//Mandatory Parameters

amt”:”12.00”,

”action”:”1”, // 1 - Purchase

”password”:”q@a68O$27@JLkcK”,

”id”:”IPAYlCR6qZF7q6w”,

”currencyCode”:”682”,

”trackId”:”123456”,

”mobileNumber”:”980765432”,

”responseURL”:”https://merchantpage/PaymentResult.jsp”,

”errorURL”:”https://merchantpage/PaymentResult.jsp”,

//Optional Parameters

”udf1”:”udf1text”,

”udf2”:”udf2text”,

”udf3”:”udf3text”,

”udf4”:”udf4text”,

”udf5”:”udf5text”,

}]

© 2020 API Guide Page 265 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Initial Response from PG to Merchant

S. No Fields M/C/O Field Type Description

If the request validation success, then status will be ‘1’. If the validation
1 status M Numeric failed, then status will be ‘2’

It contains payment ID and Payment URL if the validation success else this
2 result C Alphanum will be null

If validation failed, then Payment gateway will provide the respective


3 error C Alphanum error code

If validation failed, then Payment gateway will provide the respective


4 errorText C Alphanum error description

Plain Response:

ARB Payment gateway internally validates the request and gives payment ID and payment page URL
in the response if the validation success. If failure then, Error code and description will be provided.

Success:

[{

"status": "1",

"result":"700212030953264091:https://securepayments.alrajhibank.com.sa/pg/

URPaypage.htm", //Payment ID:Payment URL

“error”:null,

“errorText”: null

}]

© 2020 API Guide Page 266 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Failure:

[{

"status": "2",

"error":" IPAY0100124”,

“errorText”:” Problem occurred while validating transaction data”,

“result”: null

}]

Framing Payment URL :

Merchant needs to frame the URL like the below sample

https://securepayments.alrajhibank.com.sa/pg/URPaypage.htm?paymentId=700112030953264091

Final Response and Transaction Status

The ARB payment gateway verifies the transaction and returns the response to the same

request.

Attribute - Final response from ARB PG to Merchant

S. Fields
M/C/O Field Type Description
No
All the below response parameters will be
1 trandata M AlphaNum
provided in trandata field
If any error during processing, PG will
2 error C Alphanum
provide the error code
If any error during processing, PG will
3 errorText C Alphanum
provide the error
If transaction success 1.
4 status M Alphanum
If transaction failure 2.

© 2020 API Guide Page 267 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

FAQ's on Integration Process

Q1. What are the pre requisities for integration process?

Ans. 1. Tranportal ID

2. Tranportal Password

3. Resource Key

4. Payment gateway endpoint

Q2.Where to get tranportal ID , Password , Resource key and end point Url's?

Ans. Tranportal Id , Password , Resource Key and end point URL's will be shared to the merchant
via mail to their registered E-mail Id.

Q3.What is resource key?

Ans. Resource key is unique for a terminal . It is required for encryption of request parameters
and decryption of response paramters while connecting to ARB Payment Gateway. Bank
user will share the resource key in a secured manner.

Q4.What is inquiry transaction?

Ans. ARB Payment Gateway allows merchants to do an inquiry of already completed transaction
by passing certain details of the payment message, ARB Payment Gateway provides
response to this request with appropriate fields in the response; merchant is expected to
verify the relevant fields like Transaction amount, transaction status and other transaction
fields.

Q5. What are the action codes for inquiry ,refunds and Void transactions?

Ans. action codes :

Action Codes

Action Action code

Purchase 1
Authorization 4
Refund 2
Inquiry 8
Void 3
Capture 5
Auth Extension 14

© 2020 API Guide Page 268 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Void Auth 9
Q6. Based on what parameters can transactions be inquired?

Ans. Transactions can be inquired based on transaction ID , Payment ID and Track ID of original
transaction.

Q7.How to verify transactions and settlement ?

Ans. After the integration testing, transactions can be verified on merchant Portal
To verify if a transaction has been settled or not merchant can always refer the transaction
detail report in merchant Portal . Navigation to transaction detail report in merchant
portal is as below :

Merchant Portal ->Reports->Transaction Reports->Transaction Detail Report

Q8 . What are the various result codes and their description.

Ans.

Result Description

CAPTURED Captured result will be considered as transaction success


NOT This will be considered as transaction failure
CAPTURED
APPROVED This will be considered as transaction success for Authorization.
NOT This will be considered as transaction failure for Authorization.
APPROVED
VOIDED Success for Void transaction
DENIED BY If the Risk validation failed, then PG will decline the transaction with
RISK this result
HOST If there is no response from respective interchange during
TIMEOUT authorization, then PG will provide the Host timeout result.
PROCESSING For MADA : If Refund request is initiated after one Month and
declined with response code “199” then PG will internally initiate
the manual Refund if it is accepted then the result is “PROCESSING”
otherwise “NOT PROCESSED”

© 2020 API Guide Page 269 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample Encryption and Decryption Code for JAVA

public static String encryptAES(String key,String encryptString) throws


Exception{

String AES_IV = “PGKEYENCDECIVSPC”;

Byte [] encryptedText=null;

IvParameterSpec ivspec=null;

SecretKeySpec skeySpec=null;

Cipher cipher=null;

Byte [] text=null;

String s=null;

try {

ivspec = new IvParameterSpec(AES_IV.getBytes("UTF-8"));

skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");

cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");

cipher.init(Cipher.ENCRYPT_MODE, skeySpec,ivspec);

text = encryptString.getBytes("UTF-8");

encryptedText = cipher.doFinal(text);

s = byteArrayToHexString(encryptedText);

} catch (Exception e) {

e.printStackTrace();

finally

encryptedText=null;

ivspec=null;

© 2020 API Guide Page 270 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

skeySpec=null;

cipher=null;

text=null;

return s.toUpperCase();

Note: Before encrypting encryptString value. merchant needs to encode the value with URL
Encoder.
public static String decryptAES(String key,String encryptedString) throws
Exception{

String AES_IV = “PGKEYENCDECIVSPC”;

SecretKeySpec skeySpec=null;

IvParameterSpec ivspec=null;

Cipher cipher =null;

Byte [] textDecrypted=null;

Try {

Byte [] b = hexStringToByteArray(encryptedString);

skeySpec = new SecretKeySpec(key.getBytes("UTF-8"),"AES");

ivspec = new IvParameterSpec(AES_IV.getBytes("UTF-8"));

cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");

cipher.init(Cipher.DECRYPT_MODE, skeySpec,ivspec);

textDecrypted = cipher.doFinal(b);

} catch (Exception e) {

e.printStackTrace();

finally

© 2020 API Guide Page 271 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

skeySpec=null;

ivspec=null;

cipher =null;

return(new String(textDecrypted));

Note: After decrypting encryptedString value. Merchant needs to decode the textDecrypted value
with URL Decoder.

© 2020 API Guide Page 272 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample Encryption and Decryption Code For


JAVASCRIPT

function aesEncrypt(trandata,key)

var iv = "PGKEYENCDECIVSPC";

var rkEncryptionIv = aesjs.utils.utf8.toBytes(iv);

var enckey= aesjs.utils.utf8.toBytes(key);

var aesCtr = new aesjs.ModeOfOperation.cbc(enckey, rkEncryptionIv);

var textBytes = aesjs.utils.utf8.toBytes(trandata);

var encryptedBytes = aesCtr.encrypt(aesjs.padding.pkcs7.pad(text


Bytes));

var encryptedHex = aesjs.utils.hex.fromBytes(encryptedBytes);

return encryptedHex;

Note: Before encrypting trandata value. merchant needs to encode the value with
URL Encoder.

function AESdecryption(encryptedHex,key)

var iv = "PGKEYENCDECIVSPC";

var enckey= aesjs.utils.utf8.toBytes(key);

var rkEncryptionIv = aesjs.utils.utf8.toBytes(iv);

var encryptedBytes = aesjs.utils.hex.toBytes(encryptedHex);

var aesCbc = new aesjs.ModeOfOperation.cbc(enckey, rkEncryptionIv);

var decryptedBytes = aesCbc.decrypt(encryptedBytes);

var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes);

© 2020 API Guide Page 273 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

return decryptedText;

Note: After decrypting encryptedHex value. Merchant needs to decode the decryptedText value
with URL Decoder.

© 2020 API Guide Page 274 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Sample Encryption and Decryption Code For PHP

Encryption:

function encryptAES($str,$key)

$str = $this->pkcs5_pad($str);

$ivlen = openssl_cipher_iv_length($cipher="aes-256-cbc");

$iv="PGKEYENCDECIVSPC";

$encrypted = openssl_encrypt($str, "aes-256-cbc",$key, OPENSSL_ZERO_PADDING,


$iv);

$encrypted = base64_decode($encrypted);

$encrypted = unpack('C*', ($encrypted));

$encrypted=$this->byteArray2Hex($encrypted);

$encrypted = urlencode($encrypted);

return $encrypted;

Note: Before encrypting transaction data, data needs to be encoded using URL-Encoder

Decryption:

function decryptAES ($codcode, $)

$code = $this->hex2ByteArray(trim($code));

$code=$this->byteArray2String($code);

$iv = "PGKEYENCDECIVSPC";

© 2020 API Guide Page 275 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

$code = base64_encode($code);

$decrypted = openssl_decrypt($code, 'AES-256-CBC', $key, OPENSSL_ZERO_PADDING,


$iv);

return $this->pkcs5_unpad($decrypted);

Note: After decrypting transaction data needs to be decoded using URL-Decoder

© 2020 API Guide Page 276 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Chapter 4 TROUBLESHOOTING

Known Error Codes

The error codes are listed below:

The following table contains the known error codes and their descriptions:

Error Code Error Code Description

IPAY0100114 Duplicate Record, transaction ID already exist


IPAY0100115 Transaction denied due to missing original transaction id.
IPAY0100116 Transaction denied due to invalid original transaction id.
IPAY0100118 Transaction denied due to card number length error
IPAY0100119 Transaction denied due to invalid card number
IPAY0100120 Transaction denied due to invalid payment instrument
IPAY0100121 Transaction denied due to invalid card holder name.
IPAY0100122 Transaction denied due to invalid address.
IPAY0100123 Transaction denied due to invalid postal code.
IPAY0100124 Problem occurred while validating transaction data
IPAY0100125 Payment instrument not enabled.
IPAY0100126 Brand not enabled.
IPAY0100127 Problem occurred while doing validate original transaction
IPAY0100128 Transaction denied due to Institution ID mismatch
IPAY0100129 Transaction denied due to Merchant ID mismatch
IPAY0100130 Transaction denied due to Terminal ID mismatch
IPAY0100131 Transaction denied due to Payment Instrument mismatch
IPAY0100132 Transaction denied due to Currency Code mismatch
IPAY0100133 Transaction denied due to Card Number mismatch
IPAY0100134 Transaction denied due to invalid Result Code
IPAY0100135 Problem occurred while doing perform action code reference id
(Validate Original Transaction)
IPAY0200028 Problem occurred while loading default institution configuration
(Validate Original Transaction)

© 2020 API Guide Page 277 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100136 Transaction denied due to previous capture check failure (Validate


Original Transaction)
IPAY0100138 Transaction denied due to capture amount versus auth amount check
failure (Validate Original
IPAY0100139 Transaction denied due to void amount versus original amount check
failure (Validate Original
IPAY0100140 Transaction denied due to previous void check failure (Validate
Original Transaction)
IPAY0100141 Transaction denied due to authorization already captured (Validate
Original Transaction)
IPAY0100142 Problem occurred while validating original transaction
IPAY0200030 No external connection details for Extr Conn id :
IPAY0200031 Alternate external connection details not found for the alt Extr Conn
id :
IPAY0100143 Transaction action is null
IPAY0100144 ISO MSG is null. See log for more details!
IPAY0100145 Problem occurred while loading default messages in ISO Formatter
IPAY0100147 Problem occurred while formatting purchase request in B24 ISO
Message Formatter
IPAY0100150 Problem occurred while formatting Reverse purchase request in B24
ISO Message Formatter
IPAY0100152 Problem occurred while formatting authorization request in B24 ISO
Message Formatter
IPAY0100153 Problem occurred while formatting Capture request in B24 ISO
Message Formatter
IPAY0100155 Problem occurred while formatting reverse authorization request in
B24 ISO Message Formatter
IPAY0100156 Problem occurred while formatting Reverse Capture request in B24
ISO Message Formatter
IPAY0100159 External message system error
IPAY0100160 Unable to process the transaction.
IPAY0100163 Problem occurred during transaction.
IPAY0100166 Transaction Not Processed due to Empty Authentication Status
IPAY0100167 Transaction Not Processed due to Invalid Authentication Status
IPAY0100168 Transaction Not Processed due to Empty Enrollment Status
IPAY0100169 Transaction Not Processed due to Invalid Enrollment Status
IPAY0100170 Transaction Not Processed due to invalid CAVV

© 2020 API Guide Page 278 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100171 Transaction Not Processed due to Empty CAVV


IPAY0100172 Problem occurred while converting amount.
IPAY0100173 Problem occurred while building refund request.
IPAY0100175 Problem occurred in refund process.
IPAY0100039 Invalid payment id .
IPAY0200009 Problem occurred while getting payment details.
IPAY0100041 Payment details missing.
IPAY0100042 Transaction time limit exceeds.
IPAY0200011 Problem occurred while getting IP block details.
IPAY0100043 IP address is blocked already
IPAY0100044 Problem occurred while loading payment page.
IPAY0100045 Denied by Risk
IPAY0200013 Problem occurred while updating description details in payment log.
IPAY0100047 Payment Page validation failed due to invalid Order Status:
IPAY0200015 Problem occurred while getting terminal details.
IPAY0100050 Invalid terminal key.
IPAY0100051 Missing terminal key.
IPAY0100053 Problem occurred while processing direct debit.
IPAY0100054 Payment details not available
IPAY0100056 Instrument not allowed in Terminal and Brand
IPAY0200016 Problem occurred while getting payment instrument.
IPAY0200018 Problem occurred while getting transaction details
IPAY0100057 Transaction denied due to invalid processing option action code
IPAY0100058 Transaction denied due to invalid instrument
IPAY0100059 Transaction denied due to invalid currency code.
IPAY0100060 Transaction denied due to missing amount.
IPAY0100061 Transaction denied due to invalid amount.
IPAY0100062 Transaction denied due to invalid Amount/Currency.
IPAY0100063 Transaction denied due to invalid track ID
IPAY0100064 Transaction denied due to invalid UDF1:
IPAY0100065 Transaction denied due to invalid UDF2:
IPAY0100066 Transaction denied due to invalid UDF3:
IPAY0100067 Transaction denied due to invalid UDF4:

© 2020 API Guide Page 279 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100068 Transaction denied due to invalid UDF5:


IPAY0100069 Missing payment instrument.
IPAY0100070 Transaction denied due to failed card check digit calculation.
IPAY0100071 Transaction denied due to missing CVD2.
IPAY0100072 Transaction denied due to invalid CVD2.
IPAY0100073 Transaction denied due to invalid CVV.
IPAY0100074 Transaction denied due to missing expiry year.
IPAY0100075 Transaction denied due to invalid expiry year.
IPAY0100076 Transaction denied due to missing expiry month.
IPAY0100077 Transaction denied due to invalid expiry month.
IPAY0100078 Transaction denied due to missing expiry day.
IPAY0100079 Transaction denied due to invalid expiry day.
IPAY0100080 Transaction denied due to expiration date.
IPAY0100081 Card holder name is not present
IPAY0100082 Card address is not present
IPAY0100083 Card postal code is not present
IPAY0100086 Transaction denied due to missing CVV.
IPAY0100095 Terminal inactive.
IPAY0100098 Terminal Action not enabled for Transaction request, Terminal
“termid” ,Tran Action : “action”
IPAY0100099 Terminal Payment Instrument not enabled for Transaction request,
Terminal “termid ” , Tran Instrument:"PAYMENT_INSTRUMENT"
IPAY0100100 Problem occurred while authorize
IPAY0200019 Problem occurred while getting risk profile details
IPAY0100102 Denied by risk : Maximum Floor Limit Check - Fail
IPAY0100103 Transaction denied due to Risk : Maximum transaction count
IPAY0100104 Transaction denied due to Risk : Maximum processing amount
IPAY0200022 Problem occurred while getting currency.
IPAY0100106 Invalid payment instrument
IPAY0200024 Problem occurred while getting brand rules details.
IPAY0100107 Instrument not enabled.
IPAY0200025 Problem occurred while getting terminal details.
IPAY0100109 Invalid subsequent transaction, payment id is null or empty.

© 2020 API Guide Page 280 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0200026 Problem occurred while getting transaction log details.


IPAY0200027 Missing encrypted card number.
IPAY0100111 Card decryption failed.
IPAY0100113 “transaction id” is a subsequent transaction, but original transaction
id is invalid :
IPAY0100021 Missing currency.
IPAY0100024 Invalid amount.
IPAY0100027 Invalid track id.
IPAY0100030 Invalid user defined field3.
IPAY0200007 Problem occurred while validating payment details
IPAY0200008 Problem occurred while verifying payment details.
IPAY0100037 Payment id missing.
IPAY0100040 Transaction in progress in another tab/window.
IPAY0100052 Problem occurred during merchant response encryption.
IPAY0100055 Invalid Payment Status
IPAY0200017 Problem occurred while getting payment instrument list
IPAY0100094 Sorry, this instrument is not handled
IPAY0100101 Denied by risk : Risk Profile does not exist
IPAY0200020 Problem occurred while performing transaction risk check
IPAY0200021 Problem occurred while performing risk check
IPAY0200023 Problem occurred while determining payment instrument
IPAY0100108 Perform risk check : Failed
IPAY0100110 Invalid subsequent transaction, Tran Ref id is null or empty.
IPAY0100112 Problem occurred in method loading original transaction data(card
number, exp month / year) for orig_tran_id
IPAY0100117 Transaction denied due to missing card number.
IPAY0100137 Transaction denied due to refund amount greater than auth amount
check failure ( Validate Original Transaction )
IPAY0200029 Problem occurred while getting external connection details.
IPAY0200032 Problem occurred while getting external connection details for Extr
CConn id :
IPAY0100151 Problem occurred while formatting Refund request in B24 ISO
Message Formatter
IPAY0100154 Problem occurred while formatting Reverse Refund request in B24
ISO Message Formatter

© 2020 API Guide Page 281 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100158 Host (SWITCH) timeout


IPAY0100161 Merchant is not allowed for encryption process.
IPAY0100176 Decrypting transaction data failed.
IPAY0100177 Invalid input data received.
IPAY0100178 Merchant encryption enabled.
IPAY0100179 IVR not enabled.
IPAY0100180 Authentication not available.
IPAY0100181 Card encryption failed.
IPAY0200037 Error occurred while getting Merchant ID
IPAY0100186 Encryption enabled.
IPAY0100189 Transaction denied due to brand directory unavailable
IPAY0100190 Transaction denied due to Risk : Maximum transaction count
IPAY0100191 Denied by risk : Negative Card check - Fail
IPAY0100192 Transaction Not Processed due to Empty XID
IPAY0100193 Transaction Not Processed due to invalid XID
IPAY0100202 Error occurred in Determine Payment Instrument
IPAY0100194 Transaction denied due to Risk : Minimum Transaction Amount
processing
IPAY0100195 Transaction denied due to Risk : Maximum refund processing amount
IPAY0100196 Transaction denied due to Risk : Maximum processing amount
IPAY0100197 Transaction denied due to Risk : Maximum debit amount
IPAY0100198 Transaction denied due to Risk : Transaction count limit exceeded for
the IP
IPAY0100199 Transaction denied due to previous refund check failure ( Validate
Original Transaction )
IPAY0100200 Denied by risk : Negative BIN check - Fail
IPAY0100201 Denied by risk : Declined Card check – Fail
IPAY0100203 Problem occurred while doing perform transaction
IPAY0100204 Missing payment details
IPAY0100206 Problem occurred while getting currency minor digits
IPAY0100207 Bin range not enabled
IPAY0100208 Action not enabled
IPAY0100209 Institution config not enabled
IPAY0100213 Problem occurred while processing the hosted transaction request

© 2020 API Guide Page 282 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100214 Problem occurred while verifying tranportal id


IPAY0100215 Invalid tranportal id
IPAY0100216 Invalid data received
IPAY0100217 Invalid payment detail
IPAY0100218 Invalid brand id
IPAY0100219 Missing card number
IPAY0100220 Invalid card number
IPAY0100221 Missing card holder name
IPAY0100222 Invalid card holder name
IPAY0100223 Missing cvv
IPAY0100224 Invalid cvv
IPAY0100225 Missing card expiry year
IPAY0100226 Invalid card expiry year
IPAY0100227 Missing card expiry month
IPAY0100228 Invalid card expiry month
IPAY0100229 Invalid card expiry day
IPAY0100230 Card expired
IPAY0100231 Invalid user defined field
IPAY0100232 Missing original transaction id
IPAY0100233 Invalid original transaction id
IPAY0100234 Problem occurred while formatting Reverse completion request in ISO
Message Formatter
IPAY0100235 Problem occurred while formatting Reverse refund request in ISO
Message Formatter
IPAY0100236 Problem occurred while formatting Reverse refund request in ISO
Message Formatter
IPAY0100237 Problem occurred while formatting Reverse purchase request in ISO
Message Formatter
IPAY0100238 Problem occurred while formatting Capture request in ISO Message
Formatter
IPAY0100239 Problem occurred while formatting authorization request in ISO
Message Formatter
IPAY0100240 Problem occurred while formatting refund request in ISO Message
Formatter
IPAY0100241 Problem occurred while formatting purchase request in ISO Message
Formatter

© 2020 API Guide Page 283 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100243 NOT SUPPORTED


IPAY0100244 Payment Instrument Not Configured
IPAY0100245 Problem occurred while sending/receiving ISO message
IPAY0100246 Problem occurred while doing perform ip risk check
IPAY0100249 Merchant response url is down
IPAY0100250 Payment details verification failed
IPAY0100251 Invalid payment data
IPAY0100253 Problem occurred while cancelling the transaction
IPAY0100254 Merchant not enabled
IPAY0100255 External connection not enabled
IPAY0100256 Payment encryption failed
IPAY0100257 Brand rules not enabled
IPAY0100260 Payment option(s) not enabled
IPAY0100261 Payment hashing failed
IPAY0100262 Problem occurred during VEREQ process
IPAY0100263 Transaction details not available
IPAY0100264 Signature validation failed
IPAY0100265 PARes status not successful
IPAY0100266 Brand directory unavailable
IPAY0100267 PARes status not successful
IPAY0100268 3d secure not enabled for the brand
IPAY0100269 Invalid card check digit
IPAY0100270 PARes status not successful
IPAY0100271 Problem occurred while formatting purchase request in MASTER ISO
Message Formatter
IPAY0100272 Problem occurred while validating xml message format
IPAY0100273 Problem occurred while validation VERES message format
IPAY0100274 VERES message format is invalid
IPAY0100275 Problem occurred while formatting Credit request in MASTER ISO
Message Formatter
IPAY0100276 Problem occurred while formatting Reverse purchase request in
MASTER ISO Message Formatter
IPAY0100277 Problem occurred while formatting Reverse Credit request in MASTER
ISO Message Formatter

© 2020 API Guide Page 284 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Error Code Error Code Description

IPAY0100278 Problem occurred while formatting reverse authorization request in


MASTER ISO Message Formatter
IPAY0100279 Problem occurred while formatting Reverse Capture request in
MASTER ISO Message Formatter
IPAY0100280 Problem occurred while formatting Capture request in MASTER ISO
Message Formatter
IPAY0100281 Transaction Denied due to missing Master Brand
IPAY0100282 Transaction Denied due to missing Visa Brand
IPAY0100283 Problem occurred in determine payment instrument
IPAY0100284 Invalid subsequent transaction, track id is null or empty
IPAY0100285 Transaction denied due to invalid original transaction
IPAY0100289 Transaction denied due to Risk : Maximum credit amount
IPAY0100291 Problem occurred while validating original transaction
IPAY0100292 Transaction denied due to invalid PIN
IPAY0100293 Transaction denied due to duplicate Merchant trackid
IPAY0100294 Transaction denied due to missing Merchant trackid
IPAY0100295 Missing Merchant Track Id
IPAY0100327 Invalid Buyer Email ID
IPAY0100328 Invalid Buyer Mobile No.
IPAY0100329 Invalid Buyer Name
IPAY0100330 Invalid Minor digits length
IPAY0100331 Invalid Expiry Date
IPAY0100332 Invalid Invoice Id
IPAY0100333 Invalid Item Description
IPAY0100334 Invalid Udf1

© 2020 API Guide Page 285 of 288

Classification: Internal Use


ARB Merchant Implementation Guide – REST APIs | Rest API Specifications

Handling Final Response from Payment Gateway

Handling Transaction Response:

 By decrypting “trandata” Merchant can able to get the JSON Response. JSON response
contains all the required success transaction data.

Handling Failure Transaction Response:

Step1:
From payment Gateway Response, Merchant needs to check the “trandata” first.
If the “trandata” not null.
By decrypting the trandata Merchant can able to get the failure transaction description by
extracting the key “result”.
If “result” is null then merchant needs to use the key “errorText” inside “trandata” to
get failure description.

Step 2:
If “trandata” is null or empty, then merchant needs to do follow below steps.

Step 3:
To get Error Description: Use Parameter Key name “ErrorText”.

Step 4:
To get Error Code: Use parameter key name "Error”.

Step 5:
To get Transaction Id: Use parameter key “tranid" this value can be null or empty.

Step 6:
To get Payment Id: Use parameter key "paymentid" this value can be null or empty.

© 2020 API Guide Page 286 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Index

INDEX

A
J
API................................................. 184, 209
Attributes17, 26, 34, 41, 49, 56, 66, 74, 82, JAVA...................................................... 245
121, 133, 142, 150
K
B
Known Error Codes .................................. 252
Bank Hosted setup .................................... 12
M
C
Merchant Hosted setup ..............................12
Callback ................................................... 12
checkout .................................................. 12 P

D Payment Gateway17, 18, 21, 34, 35, 49, 50,


66, 94, 95, 98, 99, 113, 126, 128, 133, 134,
Decryption .............................. 245, 248, 250 137, 164, 167, 177, 188, 189, 198, 199, 212
Description16, 17, 26, 28, 33, 34, 41, 43, 48, Payment ID ............................................ 127
49, 56, 60, 65, 66, 74, 76, 77, 82, 89, 93, PCI – DSS ................................................. 8
128, 132, 133, 142, 144, 150, 154 PG101, 103, 113, 164, 167, 170, 177, 179, 181,
184, 193, 204, 206, 212
E Plain Trandata13, 17, 19, 20, 22, 23, 24, 30,
34, 36, 37, 38, 39, 45, 49, 51, 52, 53, 54,
Encryption ....................... 245, 248, 250, 257 62, 66, 68, 69, 70, 71, 72, 79, 82, 83, 85,
Error Code ................ 16, 33, 48, 65, 93, 132 86, 87, 91, 133, 135, 136, 138, 139, 140,
146, 150, 152, 153, 156, 161, 162, 191, 192,
F 201, 202, 211, 227

Final Response28, 43, 60, 76, 89, 103, 113, R


119, 123, 144, 154, 195, 206
flow..........................15, 32, 65, 80, 131, 148 Resource key ..........................................10
RESTFUL API’s ..........................................13
I
T
Initial Response26, 27, 41, 42, 56, 58, 74, 75,
101, 142, 143, 170, 193, 204, 209 Target Audience ......................................... 8
Test Instruments.......................................13

© 2021 AlRajhi Bank API Guide Page 287 of 288

Classification: Internal Use


ARB Merchant Implementation Guide - REST APIs | Index

Tranportal ID.............. 10, 17, 34, 49, 66, 133 U


Tranportal password ...... 10, 17, 34, 49, 133
Transaction ID ................................. 126, 127 Users ........................................................ 8

© 2021 AlRajhi Bank API Guide Page 288 of 288

Classification: Internal Use

You might also like