Getting Started

دعم تكامل Paymennt

API Integration


INTRODUCTION

This document provides the integration details between the merchant & the PointCheckout systems. The integration allows the merchant system with its own shopping and order processing system to work in conjunction with PointCheckout system for the payments. The merchant would need the API credentials & the private secret key to access the PointCheckout API.

The process is outlined below:

  1. When a customer is ready to pay for their order/shopping cart on the merchant system, a “Pay using PointCheckout / Card” option is presented.

  2. On submitting the “Pay using Pointcheckout / Card” button, the merchant system processes the order & makes the “NEW CHECKOUT REQUEST” API call to PointCheckout & obtains a checkout key.

  3. On successfully obtaining the token from PointCheckout in the previous step, the merchant system then redirects the customer to PointCheckout passing in this checkout key (See PAYMENT PAGE REDIRECT).

  4. The customer then may either successfully complete the payment or cancel the payment.

  5. In any of the cases in the previous step, the customer is finally returned to the merchant system.

  6. Once the customer has been returned to the merchant system from PointCheckout, the merchant system makes the “GET CHECKOUT REQUEST” API call to retrieve the status of the payment and at this stage the checkout is now complete.



REQUIREMENTS

Below are the requirements that must be implemented in the shopping cart extension for PointCheckout.

  1. Add a new Payment Method to the checkout page called Card payment or Pay using PointCheckout.

  2. When the payment method to be used is POINTCHECKOUT, PointCheckout Logo from https://www.pointcheckout.com/en/image/logo.png must be presented to the customer at the payment page

  3. Should support the following configuration options:

    1. Support for Test / Live environments.

    2. Ability to restrict payment to users from specific countries

    3. Ability to restrict payment to users from specific user groups

    4. Ability to configure new order status


SETTINGS SCREEN

The settings screen for the PointCheckout payment method should include at minimum the following configuration options.




SUPPORTED ENVIRONMENTS

The PointCheckout Payment Extension / Plugin should support the following two environments; Test and Production. Throughout the API, they will be referred to as $BASE_URL and the admin can select the current environment in the administrator settings screen.

TEST ENVIRONMENT

Base URL

https://api.test.pointcheckout.com


PRODUCTION ENVIRONMENT

Base URL

https://api.pointcheckout.com



API REQUESTS

There are two relevant API requests within the checkout process:

NEW CHECKOUT REQUEST

This requests sends the checkout details to the PointCheckout checkout service. It returns a unique checkout id that would be used for the processing of the payment.

REQUEST URL

Request URL

$BASE_URL/mer/v1.2/checkouts

METHOD TYPE

Request Type

POST

HEADER PARAMETERS

HEADER

DETAILS

X-PointCheckout-Api-Key

The merchant API key.

X-PointCheckout-Api-Secret

The Merchant API Secret.

Content-Type

application/json

REQUEST BODY

The request is a JSON based object. It includes the following parameters

PARAMETER

TYPE

DETAILS

transactionId

String

A merchant unique transaction ID for this checkout. This can be the order ID. Must match any reference shown to the user during checkout / order history. (Required)

resultUrl

String

URL to redirect user to after a successful or failed payment. ( See Get Checkout Request)

amount(1)

Decimal

The amount customers must pay. (Required)

subtotal(2)

Decimal

Sum of all individual line items (without discount / tax / shipping / etc). (Optional)

shipping

Decimal

Total value of shipping. (Optional) 

handling

Decimal

Handling fees for the order. (Optional)

tax

Decimal

Tax value on order. (Optional)

discount

Decimal

Value of discount applied to Subtotal. (Optional)

currency

String

ISO 4217 Currency Code (3 letter currency code). (Optional)

deviceReference

String

Merchant device reference, to be used by the merchant to indicate the source device of the checkout if more than one device is used to submit checkouts to PointCheckout. (Optional)

paymentMethods(3) 

Array

Array containing payment methods to be available at the payment page. When left empty all available options will show. When provided the payment methods order in the payment page will follow the same order passed in this parameter. (Optional)

defaultPaymentMethod

Enum

Active payment method when opening the payment page. When left empty the default for your account at PointCheckout will be used. (Optional)

generateQR

Boolean

indicator to generate a Base64 QR image and include it in the response, default is false. (Optional)

qrSize

Integer

the size of the QR image in pixels, default is 300. (Optional)

sendCustomerEmail

Boolean

Indicator to send an email to the customer containing the payment link, this will only work if a valid email address  is passed in the customer request

sendCustomerSms

Boolean

Indicator to send an sms to the customer containing the payment link, this will only work if a valid phone number is passed in the customer request

expiryInMinutes

Integer

Number of minutes the payment will remain available, after that the payment will expire.. (Optional)

languageCode

String

2 Letter ISO 639-1 language code, for viewing the payment page. When the language is not supported, the system will revert to the default. (Optional)

var jsMessages = {}; jsMessages.complete = "اكمال"; jsMessages.select = "حدد"; jsMessages.pleaseSelect = "الرجاء الاختيار"; jsMessages.recaptchaTerms = "<div class="ltr"><span>This site is protected by reCAPTCHA and the Google</span><span><a href='https://policies.google.com/privacy'> Privacy Policy</a> and </span><span><a href='https://policies.google.com/terms'>Terms of Service</a> apply.</span></div>"; jsMessages.show = "اظهار"; jsMessages.hide = "اخفاء"; jsMessages.loadMore = "تحميل أكثر"; jsMessages.help = "تعليمات"; jsMessages.uploadingAttachments = "تحميل المرفقات"; jsMessages.processingAttachments = "تجهيز المرفقات"; jsMessages.requestSubmitted = "شكرا! تم تقديم طلب الدعم الخاص بك. سنتواصل معك قريبا"; jsMessages.submitFailedWithError = "فشل في إرسال طلب المساعدة بسبب الخطا التالي"; jsMessages.submitFailedTryAgain = "فشل في تقديم طلب المساعدة ، يرجى محاولة أعاده تحميل الصفحة وإرسالها مره أخرى"; jsMessages.faildToUploadAttachment = "فشل تحميل المرفق"; jsMessages.attachmentFileSize = "لا يجوز أن يتجاوز حجم الملف 5 ميغابايت"; jsMessages.fileAlreadyAttached = "هذا الملف مرفق بالفعل"; jsMessages.helpWithCheckout = "المساعدة في هذا الدفع"; jsMessages.attachmentNotAllowed = "نوع ملف المرفق غير مسموح به";