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.
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
}
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) 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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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
- Payload
{- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "totals": {
- "subtotal": 100,
- "tax": 5,
- "shipping": 3,
- "handling": 2,
- "discount": 10,
- "skipTotalsValidation": false
}, - "items": [
- {
- "name": "Dark grey sunglasses",
- "sku": "1116521",
- "unitprice": 50,
- "quantity": 2,
- "linetotal": 100
}
], - "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "branchId": 0,
- "allowedPaymentMethods": [
- "CARD"
], - "defaultPaymentMethod": "CARD",
- "language": "EN"
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}
}
Create payment link 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 required | 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. |
object (CheckoutRequestTotals) Order totals | |
Array of objects (CheckoutRequestItem) An array of the items associated with this order. | |
sendSms | boolean Default: false Indicator to send the payment link via SMS to the customer. |
sendEmail | boolean Default: false Indicator to send the payment link via Email to the customer. |
object (CheckoutCustomer) Customer associated with this subscription | |
object (CheckoutAddress) Delivery address | |
object (CheckoutAddress) Delivery address | |
branchId | integer <int64> The paymennt branch ID associated with this checkout. |
allowedPaymentMethods | Array of strings Items Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "POINTCHECKOUT" Active payment method when opening the payment page. When left empty the default for your account at paymennt will be used. |
expiresIn | integer <int32> [ 15 .. 10080 ] Number of minutes the payment will remain available, after that the payment will expire.. |
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
- Payload
{- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "description": "string",
- "currency": "AED",
- "amount": 100,
- "totals": {
- "subtotal": 100,
- "tax": 5,
- "shipping": 3,
- "handling": 2,
- "discount": 10,
- "skipTotalsValidation": false
}, - "items": [
- {
- "name": "Dark grey sunglasses",
- "sku": "1116521",
- "unitprice": 50,
- "quantity": 2,
- "linetotal": 100
}
], - "sendSms": true,
- "sendEmail": true,
- "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "branchId": 0,
- "allowedPaymentMethods": [
- "CARD"
], - "defaultPaymentMethod": "CARD",
- "expiresIn": 1440,
- "language": "EN"
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "subscriptionId": "1619465605181100275",
- "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}
}
Create terminal(POS) 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. |
terminalId required | string^[0-9]+$ Terminal(POS) device ID at paymennt database. |
object (CheckoutRequestTotals) Order totals | |
Array of objects (CheckoutRequestItem) 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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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> |
Responses
Request samples
- Payload
{- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "description": "string",
- "currency": "AED",
- "amount": 100,
- "terminalId": "string",
- "totals": {
- "subtotal": 100,
- "tax": 5,
- "shipping": 3,
- "handling": 2,
- "discount": 10,
- "skipTotalsValidation": false
}, - "items": [
- {
- "name": "Dark grey sunglasses",
- "sku": "1116521",
- "unitprice": 50,
- "quantity": 2,
- "linetotal": 100
}
], - "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "branchId": 0,
- "allowedPaymentMethods": [
- "CARD"
], - "defaultPaymentMethod": "CARD",
- "language": "EN",
- "expiresIn": 0
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "terminalId": "1784518075805649425",
- "terminalAlias": "Device 01",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}
}
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) 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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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
- Payload
{- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "description": "string",
- "currency": "AED",
- "amount": 100,
- "deviceReference": "string",
- "qrSize": 600,
- "totals": {
- "subtotal": 100,
- "tax": 5,
- "shipping": 3,
- "handling": 2,
- "discount": 10,
- "skipTotalsValidation": false
}, - "items": [
- {
- "name": "Dark grey sunglasses",
- "sku": "1116521",
- "unitprice": 50,
- "quantity": 2,
- "linetotal": 100
}
], - "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "branchId": 0,
- "allowedPaymentMethods": [
- "CARD"
], - "defaultPaymentMethod": "CARD",
- "language": "EN",
- "expiresIn": 1440
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "base64QR": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQq0lEQVR42u3deaxcVR0H8KKIa9xiQowmRv9QY2KiuEQUBTUxURPjAhiRRHGBqASRBBRiCSg2SkuhbFLZLFCpoLJZkIqisghIkVLQQgvI1rRAW97S1743b97xzTNosPPat8zc8zt3Pt9kkjaZN3fuved+7p37u+ecOUlEpJDMsQlEBFgiIsASEWCJiABLRARYIgIsERFgiYgAS0SAJSICLBERYIkIsEREgCUiAiwRAZaISOlgzZkzJ8yr099vNp831b+tYpt2+rvUebt0+lio4m9LPC6BBSxgAQtYwAIWsIAFLGABC1jAAhawgAUsYFW0oSM1jlwNsIqDP/o+6vR2id7+Or1uJW4XYAELWMACFrCABSxgAQtYwAIWsIAFLGABC1gpharW1Xm5uRpW9AOz08ut4rtEPylHPWECC1jAAhawgAUsYAELWMACFrCABSxgAQtYwCp0w1S5bpHAKhGYEiu0JXapAhawgAUsYAELWMACFrCABSxgAQtYwAIWsIAFrKzvi3SA5EKsxCpcXQ50YAELWMACFrCABSxgAQtYwAIWsIAFLGABC1g1BytXBa+Kxhu9mlNF9SoXMLmqp9HXzXh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WsngWrxI0VvZpYl3HCSpycIzqe0bc9sIAFLGABC1jAAhawgAUsYAELWMACFrCABawaJdJkBiVWlkqEI9IYWVVAFB1AYAELWMACFrCABSxgAQtYwAIWsIAFLGABC1gFVC1yVTKiTxARCcVI2y/XSSpSN6sqTuhdPfaABSxgAQtYwAIWsIAFLGABC1jAAhawgAWsXgUrevUv1w7JdYCUWCWMPiZYpJN39GonsIAFLGABC1jAAhawgAUsYAELWMACFrCABayK4Ihefcl1UFcBavTqbvQTSIlVTDM/AwtYwAIWsIAFLGABC1jAAhawgAUsYAELWMCq1ThNkbZfru8SHcVIJ8dI6xHhCQFgAQtYwAIWsIAFLGABC1jAAhawgAUsYAELWD0MVhUNPxdsERpvJ/Zb9PYXaRv03HhYwAIWsIAFLGABC1jAAhawgAUsYAELWMACVnSwqmio0XdwpBNDrgM4elefEiuH0bcVsIAFLGABC1jAAhawgAUsYAELWMACFrCABawuVGkijeMTfTbeSFWzSCezEscdK7FSGjXAAhawgAUsYAELWMACFrCABSxgAQtYwAJWT4AlIgIsERFgiQiwRESAJSICLBEBlogIsEQEWCIiwBIRAZaIAEtEBFgiIsASEWCJiABLRARYIgIsEZEg+TdqxKkY1UvgRgAAAABJRU5ErkJggg==",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}
}
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) 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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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 Enum: "CARD" "VISA" "MASTERCARD" "AMEX" "UNIONPAY" "TABBY" "CAREEM_PAY" "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
- Payload
{- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "totals": {
- "subtotal": 100,
- "tax": 5,
- "shipping": 3,
- "handling": 2,
- "discount": 10,
- "skipTotalsValidation": false
}, - "items": [
- {
- "name": "Dark grey sunglasses",
- "sku": "1116521",
- "unitprice": 50,
- "quantity": 2,
- "linetotal": 100
}
], - "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "branchId": 0,
- "allowedPaymentMethods": [
- "CARD"
], - "defaultPaymentMethod": "CARD",
- "language": "EN"
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}
}
Search checkouts
Authorizations:
query Parameters
type | string Enum: "QR" "WEB" "MOBILE" "LINK" "TERMINAL" 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" "CHARGEBACK" 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 |
page | number >= 0 page number, default is 0 |
size | number >= 1 page size, default is 20 |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "page": 0,
- "size": 10,
- "totalPages": 1,
- "totalElements": 7,
- "content": [
- {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "branchId": "1601731695315563241",
- "branchName": "Test store",
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseDatabase": "pc-test-734bc",
- "firebaseCollection": "string",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5"
}
]
}
}
Get checkout by Id
Authorizations:
path Parameters
checkoutId required | string Checkout Id retrieved from paymennt API. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "branchId": "1601731695315563241",
- "branchName": "Test store",
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseDatabase": "pc-test-734bc",
- "firebaseCollection": "string",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5"
}
}
Resend pending checkout to treminal
Authorizations:
path Parameters
checkoutId required | string Checkout Id. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "branchId": "1601731695315563241",
- "branchName": "Test store",
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseDatabase": "pc-test-734bc",
- "firebaseCollection": "string",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5"
}
}
Cancel pending checkout
Authorizations:
path Parameters
checkoutId required | string Checkout Id. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "branchId": "1601731695315563241",
- "branchName": "Test store",
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseDatabase": "pc-test-734bc",
- "firebaseCollection": "string",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5"
}
}
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
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "branchId": "1601731695315563241",
- "branchName": "Test store",
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseDatabase": "pc-test-734bc",
- "firebaseCollection": "string",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5"
}
}
Create payment
Authorizations:
Request Body schema: application/json
required | StoredCardPaymentSource (object) or TokenPaymentSource (object) |
checkoutId | string Checkout Identifier on Paymennt.com database. |
object (CheckoutPaymentRequest) Checkout details, required if checkoutId is not provided. | |
validReturnUrl | boolean |
validBillingAddress | boolean |
Responses
Request samples
- Payload
{- "source": {
- "type": "TOKEN",
- "token": "ctk_live_325f0f9d609b2e4c64cd3b3938d2d269b8ec6db2767482df5f748c14424be9ef",
- "shopperInteraction": "ECOMMERCE",
- "shopperIpAddress": "string",
- "browserInfo": {
- "screenWidth": 1024,
- "screenHeight": 786,
- "colorDepth": 24,
- "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
- "timeZoneOffset": -240,
- "language": "en-US",
- "javaEnabled": false,
- "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
}, - "cvv": "string",
- "validShopperIpAddress": true,
- "validBrowserInfo": true
}, - "checkoutId": "string",
- "checkoutDetails": {
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "totals": {
- "subtotal": 100,
- "tax": 5,
- "shipping": 3,
- "handling": 2,
- "discount": 10,
- "skipTotalsValidation": false
}, - "items": [
- {
- "name": "Dark grey sunglasses",
- "sku": "1116521",
- "unitprice": 50,
- "quantity": 2,
- "linetotal": 100
}
], - "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "branchId": 0,
- "allowedPaymentMethods": [
- "CARD"
], - "defaultPaymentMethod": "CARD",
- "language": "EN"
}, - "validReturnUrl": true,
- "validBillingAddress": true
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1712345678901234567",
- "amount": 100,
- "currency": "AED",
- "status": "REDIRECT",
- "timestamp": "2019-08-24T14:15:22Z",
- "checkoutDetails": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}
}
}
Capture authorized payment
Authorizations:
path Parameters
paymentId required | string Payment Id retrieved from Paymennt.com API. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1712345678901234567",
- "currency": "AED",
- "amount": 100,
- "status": "CAPTURED",
- "checkoutDetails": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}, - "timestamp": "2019-08-24T14:15:22Z"
}
}
Get payment by Id
Authorizations:
path Parameters
paymentId required | string Payment Id retrieved from Paymennt.com API. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1712345678901234567",
- "currency": "AED",
- "amount": 100,
- "status": "CAPTURED",
- "checkoutDetails": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}, - "timestamp": "2019-08-24T14:15:22Z"
}
}
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
- 200
- 400
[- {
- "success": true,
- "elapsed": 12,
- "result": {
- "id": "string",
- "name": "string",
- "currency": "string",
- "description": "string",
- "enabled": true
}
}
]
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
- Payload
{- "name": "Main branch",
- "currency": "Main branch",
- "description": "Main branch"
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "string",
- "name": "string",
- "currency": "string",
- "description": "string",
- "enabled": true
}
}
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
- 200
- 400
[- {
- "success": true,
- "elapsed": 12,
- "result": {
- "id": "string",
- "hmacKey": "string",
- "address": "string",
- "failed": true,
- "enabled": true
}
}
]
Create new webhook
Authorizations:
Request Body schema: application/json
address required | string Webhook endpoint that paymennt server will push messages to. |
Responses
Request samples
- Payload
{- "address": "string"
}
Response samples
- 200
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "string",
- "hmacKey": "string",
- "address": "string",
- "failed": true,
- "enabled": true
}
}
Test webhook
Make a test call for the address associated with the webhook.
Authorizations:
path Parameters
webhookId required | string Webhook Id. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "string",
- "hmacKey": "string",
- "address": "string",
- "failed": true,
- "enabled": true
}
}
List termials
List all termials associated with the merchant account
Authorizations:
query Parameters
page | number >= 0 page number, default is 0 |
size | number >= 1 page size, default is 20 |
Responses
Response samples
- 200
- 400
[- {
- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1784983995871729791",
- "alias": "Device 01",
- "deviceType": "AMS1",
- "serialNumber": "AMS1-000168223460132",
- "branchId": "1784976975118630880",
- "branchName": "Main branch",
- "active": true
}
}
]
Get terminal device by Id
Authorizations:
path Parameters
terminalId required | string Terminal Id. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1784983995871729791",
- "alias": "Device 01",
- "deviceType": "AMS1",
- "serialNumber": "AMS1-000168223460132",
- "branchId": "1784976975118630880",
- "branchName": "Main branch",
- "active": true
}
}
List customer stored cards
Authorizations:
query Parameters
customerReferenceId required | string Customer ID at merchant suystem (Customer reference ID) |
page | number >= 0 page number, default is 0 |
size | number >= 1 page size, default is 20 |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "page": 0,
- "size": 10,
- "totalPages": 1,
- "totalElements": 7,
- "content": [
- {
- "customerReferenceId": "CID12345",
- "token": "ctk_sandbox_258b62b087ce90825350c9c1d7f16a6f6d7de7f3e238a0b47da9b9ec29308bd4",
- "cardBrand": "VISA",
- "cardBin": "424242",
- "cardLast4": "4242",
- "cardHolderName": "JOHN DOE",
- "expiry": "2029-01-22"
}
]
}
}
Delete stored card by token
Authorizations:
query Parameters
cardToken required | string Stored card token |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "customerReferenceId": "CID12345",
- "token": "ctk_sandbox_258b62b087ce90825350c9c1d7f16a6f6d7de7f3e238a0b47da9b9ec29308bd4",
- "cardBrand": "VISA",
- "cardBin": "424242",
- "cardLast4": "4242",
- "cardHolderName": "JOHN DOE",
- "expiry": "2029-01-22"
}
}
Get stored card by token
Authorizations:
query Parameters
cardToken required | string Stored card token |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "customerReferenceId": "CID12345",
- "token": "ctk_sandbox_258b62b087ce90825350c9c1d7f16a6f6d7de7f3e238a0b47da9b9ec29308bd4",
- "cardBrand": "VISA",
- "cardBin": "424242",
- "cardLast4": "4242",
- "cardHolderName": "JOHN DOE",
- "expiry": "2029-01-22"
}
}
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 |
page | number >= 0 page number, default is 0 |
size | number >= 1 page size, default is 20 |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "page": 0,
- "size": 10,
- "totalPages": 1,
- "totalElements": 7,
- "content": [
- {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "description": "dozen of cookies",
- "currency": "USD",
- "amount": 1499.99,
- "status": "ACTIVE",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "sendOnHour": 3,
- "period": 1,
- "periodUnit": "DAYS",
- "cancellationPolicyType": "DEFAULT",
- "customCancellationTerms": "Cancellation allowed only 5 days before next billing date"
}
]
}
}
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 | |
object (CheckoutAddress) Delivery address | |
object (CheckoutAddress) Delivery address | |
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) |
cancellationPolicyType | string Enum: "Default" "Custom" One of DEFAULT or CUSTOM |
customCancellationTerms | string Custom cancellation terms |
Responses
Request samples
- Payload
{- "description": "dozen of cookies",
- "currency": "USD",
- "amount": 1499.99,
- "customer": {
- "id": "123456",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "customerId": 0,
- "startDate": "2021-08-10",
- "endDate": "2024-05-01",
- "sendOnHour": 10,
- "sendEvery": "TWO_MONTHS",
- "cancellationPolicyType": "DEFAULT",
- "customCancellationTerms": "Cancellation allowed only 5 days before next billing date"
}
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "description": "dozen of cookies",
- "currency": "USD",
- "amount": 1499.99,
- "status": "ACTIVE",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "sendOnHour": 3,
- "period": 1,
- "periodUnit": "DAYS",
- "cancellationPolicyType": "DEFAULT",
- "customCancellationTerms": "Cancellation allowed only 5 days before next billing date"
}
}
Get subscription by Id
Authorizations:
path Parameters
subscriptionId required | string Subscription Id retrieved from paymennt API. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "description": "dozen of cookies",
- "currency": "USD",
- "amount": 1499.99,
- "status": "ACTIVE",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "sendOnHour": 3,
- "period": 1,
- "periodUnit": "DAYS",
- "cancellationPolicyType": "DEFAULT",
- "customCancellationTerms": "Cancellation allowed only 5 days before next billing date"
}
}
Pause subscription
Authorizations:
path Parameters
subscriptionId required | string Subscription Id retrieved from paymennt API. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "description": "dozen of cookies",
- "currency": "USD",
- "amount": 1499.99,
- "status": "ACTIVE",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "sendOnHour": 3,
- "period": 1,
- "periodUnit": "DAYS",
- "cancellationPolicyType": "DEFAULT",
- "customCancellationTerms": "Cancellation allowed only 5 days before next billing date"
}
}
Resume subscription
Authorizations:
path Parameters
subscriptionId required | string Subscription Id retrieved from paymennt API. |
Responses
Response samples
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "description": "dozen of cookies",
- "currency": "USD",
- "amount": 1499.99,
- "status": "ACTIVE",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "sendOnHour": 3,
- "period": 1,
- "periodUnit": "DAYS",
- "cancellationPolicyType": "DEFAULT",
- "customCancellationTerms": "Cancellation allowed only 5 days before next billing date"
}
}
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
- 200
- 400
{- "success": true,
- "elapsed": 12,
- "result": {
- "page": 0,
- "size": 10,
- "totalPages": 1,
- "totalElements": 7,
- "content": [
- {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkout": {
- "id": "1653241101733169556",
- "displayId": "QS3IM5",
- "checkoutKey": "90ed4298f15d46df994fd1cfbbec5aa24390e811295cf8b5",
- "requestId": "ORD-1234-r1",
- "orderId": "ORD-1234",
- "currency": "AED",
- "amount": 100,
- "cashAmount": 0,
- "status": "PENDING",
- "totalRefunded": 0,
- "usedPaymentMethod": "CARD",
- "customer": {
- "id": "1702445293135146054",
- "reference": "0123456789",
- "firstName": "[First name]",
- "lastName": "[Last name]",
- "email": "[CUSTOMER EMAIL]",
- "phone": "[CUSTOMER PHONE]"
}, - "subscriptionId": "1619465605181100275",
- "billingAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "deliveryAddress": {
- "name": "[NAME]",
- "address1": "[ADDRESS 1]",
- "address2": "[ADDRESS 2]",
- "city": "[CITY]",
- "state": "[STATE]",
- "zip": "12345",
- "country": "AE",
- "set": true
}, - "firebaseCollection": "string",
- "firebaseDatabase": "pc-test-734bc",
- "firebaseDocument": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "branchId": "1601731695315563241",
- "branchName": "Test store"
}, - "timestamp": "2019-08-24T14:15:22Z",
- "cancelled": true
}
]
}
}