Basics of API

Dark mode

Getting Started - Egypt

Sign up for registering a new account


A guide to registering a new accept account.

Why do I have to? In order to deal with any of Accept's services, you have to register an account, this tutorial will be your guide to create one.

To create your account, follow these steps

  1. Navigate to Accept's home page

2. After that, you will enter your mobile number on which you will be receiving OTP for first-time verification.

3. As soon as you enter the OTP that you have received on your mobile number, you will get the below screen where you will be adding your name, and email details including your desired Password which you will be using for further logging.

4. Please note that after this screen you will get a login screen where you will be entering your registered mobile number without country code and your password which you have set in the previous screen.

5. As soon as you will log in, you will get the below screen to enter your business details.

After filling in this information, you will get a " Registration successful" message on the screen and you will be routed to your Paymob Dashboard as below :

Great-Now you have successfully made your Merchant portal dashboard 

Now you can go to the Sign-In page and start accepting online payments from your customers, Go check our use case guide and choose your perfect payment scenario!

👍Note!

The status of the created account will be marked as a "Test" account, this will allow you to test all of Accept's services. When you finish your testing phase, please contact your Account Manager or Contact Support team through email  support@paymob.com or you can also raise a ticket through a support widget in your Merchant portal Dashboard to change its status to be "Live".

Was this section helpful?

What made this section unhelpful for you?

Accept Dashboard

A detailed guide to your Accept dashboard

In order to deal with any of Accept's services, you have to create an Accept account.

In your Accept portal, you can find:

  • Profile.
  • Payment Integrations.
Was this section helpful?

What made this section unhelpful for you?

API Reference Guide

Paymob's APIs are built on the REST architecture, providing a structured approach for developers to interact with their services. Let's delve into the basics of REST APIs, HTTP methods, parameters, and HTTPS status codes within the Paymob ecosystem:

Was this section helpful?

What made this section unhelpful for you?

Basics of API

Introduction to RESTful APIs and HTTP Methods in Paymob

RESTful Functionality: A RESTful web application exposes its resources along with information about them. It empowers clients to perform actions on these resources, such as creating new ones (e.g., a user profile) or modifying existing ones (e.g., updating a transaction).

For instance, developers can utilize the Paymob Payments API to retrieve specific payment details. Upon making a request, the API responds with essential payment information like amount, currency, and payment method, typically formatted in JSON.

HTTP Methods: HTTP methods, or verbs, denote actions performed on resources. Paymob's APIs support various HTTP methods:

  • GET: Retrieve a representation of a specific resource. Example: Fetching all received payments.
  • POST: Submit data to create a new resource or trigger a state change. Example: Generating a payment link.
  • PUT: Replace all representations of a target resource with the provided payload. Example: Modifying customer details.
  • DELETE: Remove a specified resource. Example: Deleting an invoice.
  • PATCH: Apply partial modifications to a resource. Example: Updating an order with specific changes.

Parameters: Parameters allow customization of API requests and responses. Paymob's APIs support four types of parameters:

  • Path Parameters: Integral parts of the endpoint URL, identifying specific resources.
  • Query Parameters: Appended to the endpoint URL to filter or paginate results.
  • Request Parameters: Included in the request body, transmitting data to the API server.
  • Response Parameters: Represent data returned by the server in response to a request.

HTTPS Status Codes: HTTP status codes communicate the outcome of client requests. Paymob employs HTTPS status codes categorized into three classes:

  • Success (200): Successful response
  • Client Error (400): Error on the transactions.
  • Server Error (500): Internal server error.

Was this section helpful?

What made this section unhelpful for you?

API Setup - (Secret and Public Key)

By comprehending these components, developers can effectively integrate Paymob's APIs into their applications, facilitating seamless payment processing experiences for users while ensuring security and reliability.

This documentation will guide you through the process of integrating with Paymob's powerful APIs and testing them using Postman. Whether you're looking to facilitate online payments, manage transactions, or streamline your e-commerce platform, Paymob APIs offer robust solutions to meet your needs.

Step 1: Sign Up for Paymob

Before diving into the APIs, you'll need to sign up for a Paymob account if you haven't already. Visit this link to know how to create your account. Once registered, you can access your dashboard to manage your integration settings.

Step 2: Get API Key, Secret key, and Public key.

To authenticate and secure your interactions with Paymob's APIs, you'll need to get an API key, secret key, and public key. Follow the steps below to get these keys securely:

Get Test Mode API Key, Secret key, and Public key

  1. Log in to your Paymob account dashboard.
  2. Navigate to the setting section, then into account info.
  3. Click on "View API Key, Secretkey, or public key." However, you need to set your account to 'Test' mode as you'll find this option on the top of your portal page, to update your keys to Test keys.
  4. Your test API key, Secret key, or public key will be displayed. Copy it securely for later use.
  5. Test keys format: egy_pk_test_XXXXXXXXXXXXXX

Get Live Mode API Key, Secret key, and Public key

  1. Log in to your Paymob account dashboard.
  2. Navigate to the Setting Section, then into account info.
  3. Click on "View API Key Secret key or public key."However, you need to set your account to 'Live' mode as you'll find this option on the top of your portal page, to update your keys to live keys
  4. Your live API key, Secret key, or public key will be displayed. Ensure you store it securely.
  5. Live keys format:   egy_pk_live_XXXXXXXXXXXXXXXXX  

Step 3: Testing APIs on Postman

Postman provides a user-friendly interface for testing APIs. Follow these steps to test Paymob's APIs using Postman:

  1. Download and install Postman.
  2. Launch Postman and create a new request.
  3. Enter the API endpoint URL you wish to test.
  4. Set the appropriate HTTP method (GET, POST, PUT, DELETE).
  5. Add any required headers, such as authentication headers with your API key.
  6. Input any necessary request parameters or payloads.
  7. Click "Send" to execute the request and view the response.

Create Intention/ Payment API You can create your payment requests via following simple one-step intension API.

Once you are done with the Intention you need to call this URL. It will open in the browser's window. https://accept.paymob.com/unifiedcheckout/?publicKey=<add your public key here>&clientSecret=<add your client secret key here>

You will get your Public key from your Dashboard as mentioned in the Generating Public key section and you will get your client secret key in the response of Intention API as you see in the below screenshot.

After following this link and opening the consolidating link, you will route to the checkout page as shown below through which you can process your payment.

Header Parameters

Authorizationstring

This is a secret key which you can get from your dashboard in settings.

Content-Typestring

Body Parameters

amountnumber
currencystring
payment_methodsarray

Show child attributes

itemsarray

Show child attributes

billing_dataobject

Show child attributes

customerobject

Show child attributes

extrasobject

Show child attributes

Responses

200
Object

Response Attributes

payment_keysarray

Show child attributes

idstring
intention_detailobject

Show child attributes

client_secretstring
payment_methodsarray

Show child attributes

special_referencestring
extrasobject

Show child attributes

confirmedboolean
statusstring
createdstring
card_detailstring
objectstring

Base URL

End Point

https://accept.paymob.com/

POST

/v1/intention/

Select
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 curl --location 'https://accept.paymob.com/v1/intention/' \ --header 'Authorization: Token sk_test_626ba4a60a6f9cf4b0bc066ad3de884e93693afd5218ef832e99cbdf76a0fb37' \ --header 'Content-Type: application/json' \ --data-raw '{ "amount": 10, "currency": "EGP", "payment_methods": [ 12, "card", "you can add Integration id directly or your integration name" ], "items": [ { "name": "Item name 1", "amount": 10, "description": "Watch", "quantity": 1 } ], "billing_data": { "apartment": "6", "first_name": "Ammar", "last_name": "Sadek", "street": "938, Al-Jadeed Bldg", "building": "939", "phone_number": "+96824480228", "country": "OMN", "email": "AmmarSadek@gmail.com", "floor": "1", "state": "Alkhuwair" }, "customer": { "first_name": "Ammar", "last_name": "Sadek", "email": "AmmarSadek@gmail.com", "extras": { "re": "22" } }, "extras": { "ee": 22 } }'

Response

{
  "payment_keys": [
    {
      "integration": 114,
      "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "gateway_type": "MIGS",
      "iframe_id": ""
    }
  ],
  "id": "pi_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "intention_detail": {
    "amount": 10,
    "items": [
      {
        "name": "Item name 1",
        "amount": 10,
        "description": "Watch",
        "quantity": 1
      }
    ],
    "currency": "EGP"
  },
  "client_secret": "pak_csk_test_xxxxxxxxxxxxxxxxxxxxxxxxx",
  "payment_methods": [
    {
      "integration_id": 104,
      "alias": "",
      "name": "card",
      "method_type": "online",
      "currency": "EGP",
      "live": false
    },
    {
      "integration_id": 114,
      "alias": "",
      "name": "card",
      "method_type": "online",
      "currency": "EGP",
      "live": false
    }
  ],
  "special_reference": "",
  "extras": {
    "creation_extras": {
      "ee": 22
    },
    "confirmation_extras": ""
  },
  "confirmed": false,
  "status": "intended",
  "created": "2023-09-07T15:48:04.446108+05:00",
  "card_detail": "",
  "object": "paymentintention"
}
Was this section helpful?

What made this section unhelpful for you?

Checkout

Paymob's checkout page is expertly designed to deliver a seamless and efficient payment experience for customers. Featuring a user-friendly interface, it allows for easy navigation throughout the transaction process. Merchants can customize the checkout page to align with their brand identity, ensuring a consistent and engaging experience. Additionally, with robust security measures in place, the Paymob checkout page prioritizes user trust and data protection, making it a r

Was this section helpful?

What made this section unhelpful for you?

Payment Links

Was this section helpful?

What made this section unhelpful for you?

Payment Actions

This section contains the following topics:

  1. Refund Transaction through the Dashboard.
  2. Refund Transaction through API.
  3. Void Transaction through the Dashboard.
Was this section helpful?

What made this section unhelpful for you?

Payment Methods

Was this section helpful?

What made this section unhelpful for you?

Manage Callback

Was this section helpful?

What made this section unhelpful for you?

Error Codes

You can find the Risk error codes and other Acquirer response code descriptions in this section to know more about your declines, and detailed reasons.

Was this section helpful?

What made this section unhelpful for you?

E-Commerce Plugins

Was this section helpful?

What made this section unhelpful for you?

Mobile SDKs

Was this section helpful?

What made this section unhelpful for you?

Subscriptions

Overview

Paymob provides a comprehensive subscription module designed to help merchants efficiently manage their subscriptions on a variety of billing cycles, including weekly, bi-weekly, monthly, quarterly, semi-annual, and annual plans. This module is tailored to meet the specific needs of each merchant, enabling them to create, manage, and control their subscriptions independently through our APIs.

Was this section helpful?

What made this section unhelpful for you?

Bills Portal API

Was this section helpful?

What made this section unhelpful for you?

Payouts

Was this section helpful?

What made this section unhelpful for you?

Frequently Asked Questions (FAQs)

The Frequently Asked Questions (FAQ) section is a comprehensive resource designed to address common inquiries about our services and features. Here, you will find detailed answers to questions regarding payment methods, transaction processes, technical requirements, and security measures. Whether you're a new user seeking guidance or an experienced merchant looking for specific information, this section aims to provide clarity and support. For any additional questions not co

Was this section helpful?

What made this section unhelpful for you?