Skip to main content

Merchant API (2.0)

Download OpenAPI specification:Download

paymennt provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body, and return standard HTTP response codes. You can consume the APIs directly using

your favorite HTTP/REST library or make use of one of our SDKs.

Introduction

Learn how to integrate our APIs into your application

API Basics

The paymennt API gives you access to pretty much all the features you can use on our dashboard and lets you extend them for use in your application. It strives to be RESTful and is organized around the main resources you would be interacting with - with a few notable exceptions.

Requests and Response

Both request body data and response data are formatted as JSON. Content type for responses will always be application/json. Generally, all responses will be in the following format:

{
  "success": [boolean], // true indicates a successful operation
  "elapsed": [number], // time spent server side processing the request
  "error": [string], // if success is false, this will indicate the error
  "result": [object] // the result of the operation
}

Authentication

ApiKey

Security Scheme Type API Key
Header parameter name: X-PointCheckout-Api-Key

ApiSecret

Security Scheme Type API Key
Header parameter name: X-PointCheckout-Api-Secret

Checkout

API endpoints for checkout management.

Create web checkout

Authorizations:
Request Body schema: application/json
requestId
required
string

A unique Identifier for this request, can be used later to query the status on the checkout.

orderId
required
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.

currency
required
string

ISO 4217 Currency Code (3 letter currency code).

amount
required
number > 0

The amount customers must pay.

object (CheckoutRequestTotals)

Order totals

required
Array of objects (CheckoutRequestItem) [ items ]

An array of the items associated with this order.

required
object (CheckoutCustomer)

Customer associated with this subscription

required
object (CheckoutAddress)

Delivery address

object (CheckoutAddress)

Delivery address

returnUrl
required
string

URL to redirect user to after a successful or failed payment.

branchId
integer <int64>

The paymennt branch ID associated with this checkout.

allowedPaymentMethods
Array of strings
Items Value: "CARD,POINTCHECKOUT"

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.

defaultPaymentMethod
string
Value: "CARD,POINTCHECKOUT"

Active payment method when opening the payment page. When left empty the default for your account at paymennt will be used.

language
string [ 2 .. 3 ] characters

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.

Responses

Request samples

Content type
application/json
{
  • "requestId": "ORD-1234-r1",
  • "orderId": "ORD-1234",
  • "currency": "AED",
  • "amount": 100,
  • "totals": {
    },
  • "items": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "deliveryAddress": {
    },
  • "branchId": 0,
  • "allowedPaymentMethods": [
    ],
  • "defaultPaymentMethod": "CARD",
  • "language": "EN"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Create QR checkout

Authorizations:
Request Body schema: application/json
requestId
required
string

A unique Identifier for this request, can be used later to query the status on the checkout.

orderId
required
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.

description
string

Description of the order.

currency
required
string

ISO 4217 Currency Code (3 letter currency code).

amount
required
number > 0

The amount customers must pay.

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 paymennt.

qrSize
integer <int32> [ 64 .. 1024 ]
Default: 300

the size of the QR image in pixels.

object (CheckoutRequestTotals)

Order totals

Array of objects (CheckoutRequestItem) [ items ]

An array of the items associated with this order.

object (CheckoutCustomer)

Customer associated with this subscription

object (CheckoutAddress)

Delivery address

branchId
integer <int64>

The paymennt branch ID associated with this checkout.

allowedPaymentMethods
Array of strings
Items Value: "CARD,POINTCHECKOUT"

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.

defaultPaymentMethod
string
Value: "CARD,POINTCHECKOUT"

Active payment method when opening the payment page. When left empty the default for your account at paymennt will be used.

language
string [ 2 .. 3 ] characters

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.

expiresIn
integer <int32> [ 5 .. 10080 ]

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

Responses

Request samples

Content type
application/json
{
  • "requestId": "ORD-1234-r1",
  • "orderId": "ORD-1234",
  • "description": "string",
  • "currency": "AED",
  • "amount": 100,
  • "deviceReference": "string",
  • "qrSize": 600,
  • "totals": {
    },
  • "items": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "branchId": 0,
  • "allowedPaymentMethods": [
    ],
  • "defaultPaymentMethod": "CARD",
  • "language": "EN",
  • "expiresIn": 1440
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Create mobile checkout

Authorizations:
Request Body schema: application/json
requestId
required
string

A unique Identifier for this request, can be used later to query the status on the checkout.

orderId
required
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.

currency
required
string

ISO 4217 Currency Code (3 letter currency code).

amount
required
number > 0

The amount customers must pay.

object (CheckoutRequestTotals)

Order totals

required
Array of objects (CheckoutRequestItem) [ items ]

An array of the items associated with this order.

required
object (CheckoutCustomer)

Customer associated with this subscription

required
object (CheckoutAddress)

Delivery address

object (CheckoutAddress)

Delivery address

branchId
integer <int64>

The paymennt branch ID associated with this checkout.

allowedPaymentMethods
Array of strings
Items Value: "CARD,POINTCHECKOUT"

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.

defaultPaymentMethod
string
Value: "CARD,POINTCHECKOUT"

Active payment method when opening the payment page. When left empty the default for your account at paymennt will be used.

language
string [ 2 .. 3 ] characters

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.

Responses

Request samples

Content type
application/json
{
  • "requestId": "ORD-1234-r1",
  • "orderId": "ORD-1234",
  • "currency": "AED",
  • "amount": 100,
  • "totals": {
    },
  • "items": [
    ],
  • "customer": {
    },
  • "billingAddress": {
    },
  • "deliveryAddress": {
    },
  • "branchId": 0,
  • "allowedPaymentMethods": [
    ],
  • "defaultPaymentMethod": "CARD",
  • "language": "EN"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Search checkouts

Authorizations:
query Parameters
type
string
Enum: "QR" "WEB" "MOBILE" "LINK"

query by checkout type

requestId
string

query by requestId used when submitting checkout

orderId
string

query by orderId associated with checkout

status
Array of strings
Items Enum: "PENDING" "AUTHORIZED" "PENDING_CONFIRMATION" "PAID" "FAILED" "CANCELLED" "EXPIRED" "REFUNDED" "PARTIALLY_REFUNDED"

comma separated list of checkout statuses

customer.reference
string

query by customer reference Id

customer.email
string

query by customer email

customer.phone
string

query by customer phone number

afterId
integer

filter checkouts after the provided id

afterTimestamp
string

query checkouts created after specific date/time, date format is yyyy-mm-dd HH:MM:SS

page
number >= 0

page number, default is 0

size
number >= 1

page size, default is 20

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Get checkout by Id

Authorizations:
path Parameters
checkoutId
required
string

Checkout Id retrieved from paymennt API.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Cancel pending checkout

Authorizations:
path Parameters
checkoutId
required
string

Checkout Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Refund a checkout

Authorizations:
path Parameters
checkoutId
required
string
Example: 1686414183718160600

Checkout Id retrieved from paymennt API.

query Parameters
amount
required
number
Example: amount=1500

Refun amount.

currency
required
string 3 characters
Example: currency=USD

Currency ISO code.

note
required
string
Example: note=Out of stock

Refund note.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Payment

API endpoints for payment management.

Create payment

Authorizations:
Request Body schema: application/json
required
object (TokenPaymentSource)

Source of funds for the payment.

checkoutId
string

Checkout Identifier on Paymennt.com database.

object (CheckoutWebPaymentRequest)

Checkout details, required if checkoutId is not provided.

Responses

Request samples

Content type
application/json
{
  • "source": {
    },
  • "checkoutId": "string",
  • "checkoutDetails": {
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Capture authorized payment

Authorizations:
path Parameters
paymentId
required
string

Payment Id retrieved from Paymennt.com API.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Get payment by Id

Authorizations:
path Parameters
paymentId
required
string

Payment Id retrieved from Paymennt.com API.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Branches

API endpoints for branch management.

Get branch by Id

Authorizations:
path Parameters
branchId
required
string

Branch Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Get branches

List all branches associated with merchant

Authorizations:
query Parameters
page
number >= 0

page number, default is 0

size
number >= 1

page size, default is 20

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new branch

Authorizations:
Request Body schema: application/json
name
required
string

Branch name.

currency
required
string

Branch currency code, ISO 4217 Currency Code (3 letter currency code).

description
string

Short description of the branch.

Responses

Request samples

Content type
application/json
{
  • "name": "Main branch",
  • "currency": "Main branch",
  • "description": "Main branch"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Disable branch

Authorizations:
path Parameters
branchId
required
string

Branch Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Enable branch

Authorizations:
path Parameters
branchId
required
string

Branch Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Webhooks

API endpoints for webhook management.

Get webhook by Id

Authorizations:
path Parameters
webhookId
required
string

Webhook Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

List webhooks

List all webhooks associated with merchant

Authorizations:
query Parameters
page
number >= 0

page number, default is 0

size
number >= 1

page size, default is 20

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new webhook

Authorizations:
Request Body schema: application/json
address
required
string

Webhook endpoint that paymennt server will push messages to.

Responses

Request samples

Content type
application/json
{
  • "address": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Test webhook

Make a test call for the address associated with the webhook.

Authorizations:
path Parameters
webhookId
required
string

Webhook Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Disable webhook.

Authorizations:
path Parameters
webhookId
required
string

Webhook Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Enable webhook.

Authorizations:
path Parameters
webhookId
required
string

Webhook Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Delete webhook.

Authorizations:
path Parameters
webhookId
required
string

Webhook Id.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Customer subscription

API endpoints for Customer subscription management.

Search subscriptions

Authorizations:
query Parameters
status
Array of strings
Items Enum: "ACTIVE" "INACTIVE" "ARCHIVED" "EXPIRED"

comma separated list of subscription statuses

customer.reference
string

query by customer reference Id

customer.email
string

query by customer email

customer.phone
string

query by customer phone number

afterId
integer

filter subscriptions after the provided id

afterTimestamp
string

query subscriptions created after specific date/time, date format is yyyy-mm-dd HH:MM:SS

page
number >= 0

page number, default is 0

size
number >= 1

page size, default is 20

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Create subscription

Authorizations:
Request Body schema: application/json
description
required
string

Subscription decription

currency
required
string

ISO 4217 Currency Code (3 letter currency code) associated with this subscription.

amount
required
number

The grand total of the whole order. This is the amount the customer must pay.

object (CheckoutCustomer)

Customer associated with this subscription

customerId
integer <int64>

Customer id at paymennt database.

startDate
required
string <date>

The start date of the subscription in format (yyyy-MM-dd).

endDate
string <date>

The end date of the subscription in format (yyyy-MM-dd).

sendOnHour
required
integer <int32> [ 0 .. 23 ]

The hour of day in UTC the checkout will be created on

sendEvery
required
string
Enum: "DAY" "WEEK" "TWO_WEEKS" "MONTH" "TWO_MONTHS" "THREE_MONTHS" "SIX_MONTHS" "YEAR"

When to create the checkout

returnUrl
string

URL to redirect user to after a successful or failed payment.(Optional)

Responses

Request samples

Content type
application/json
{
  • "description": "dozen of cookies",
  • "currency": "USD",
  • "amount": 1499.99,
  • "customer": {
    },
  • "customerId": 0,
  • "startDate": "2021-08-10",
  • "endDate": "2024-05-01",
  • "sendOnHour": 10,
  • "sendEvery": "TWO_MONTHS",
}

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Get subscription by Id

Authorizations:
path Parameters
subscriptionId
required
string

Subscription Id retrieved from paymennt API.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Pause subscription

Authorizations:
path Parameters
subscriptionId
required
string

Subscription Id retrieved from paymennt API.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Resume subscription

Authorizations:
path Parameters
subscriptionId
required
string

Subscription Id retrieved from paymennt API.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}

Get subscription payments

Authorizations:
path Parameters
subscriptionId
required
string

Subscription Id retrieved from paymennt API.

query Parameters
page
number >= 0

page number, default is 0

size
number >= 1

page size, default is 20

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "elapsed": 12,
  • "result": {
    }
}