Skip to main content

PayUp Merchant Admin API (1.0.0)

Download OpenAPI specification:Download

Administrative API used by the PayUp merchant dashboard. All routes live under /api/merchant/v1.

Authentication

Except for the explicitly public endpoints (register, verify-email, resend-verification, login, password, passkey login, OAuth, invite validate, currency reads/conversion, and gateway request webhooks), every endpoint requires a merchant JWT as Authorization: Bearer <jwt>. Obtain the JWT from POST /auth/login, POST /auth/verify-email, 2FA/passkey verify, or OAuth — not from register.

Merchant-scoped routes also require X-Merchant-Id.

Auth

Register a merchant user

Request Body schema: application/json
email
required
string <email>
password
required
string >= 8 characters
name
required
string non-empty
company
string

Accepted by validation but not persisted on register.

Responses

Request samples

Content type
application/json
{
  • "email": "merchant@example.com",
  • "password": "ChangeMe123!",
  • "name": "Ada Lovelace"
}

Response samples

Content type
application/json
{
  • "verificationToken": "string",
  • "email": "user@example.com",
  • "message": "string"
}

Verify registration email with OTP

Request Body schema: application/json
verificationToken
required
string
code
required
string

Responses

Request samples

Content type
application/json
{
  • "verificationToken": "ver_abc123",
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "string"
}

Resend registration OTP

Request Body schema: application/json
verificationToken
required
string

Responses

Request samples

Content type
application/json
{
  • "verificationToken": "ver_abc123"
}

Response samples

Content type
application/json
{
  • "verificationToken": "string",
  • "message": "string"
}

Log in

Request Body schema: application/json
email
required
string <email>
password
required
string >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "email": "merchant@example.com",
  • "password": "ChangeMe123!"
}

Response samples

Content type
application/json
Example
{
  • "user": {
    },
  • "token": "string"
}

Get the current user profile

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": "user@example.com",
  • "name": "string",
  • "photo": "string",
  • "companyName": "string",
  • "isActive": true,
  • "paymentMode": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update the current user profile

Authorizations:
MerchantJwt
Request Body schema: application/json
name
string
company
string

Request field. Response maps this to companyName.

object

Responses

Request samples

Content type
application/json
{
  • "name": "Ada Lovelace",
  • "company": "Example LLC"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": "user@example.com",
  • "name": "string",
  • "photo": "string",
  • "companyName": "string",
  • "isActive": true,
  • "paymentMode": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Issue a fresh JWT

Requires a currently valid Bearer JWT.

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "string"
}

Get a compact profile summary for the dashboard

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "email": "user@example.com",
  • "photo": "string",
  • "companyName": "string",
  • "role": "user",
  • "twoFactorEnabled": true
}

Two-Factor Auth

Generate TOTP secret and QR code

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "qrCodeDataUrl": "string",
  • "secret": "string",
  • "message": "string"
}

Verify TOTP code and enable 2FA

Authorizations:
MerchantJwt
Request Body schema: application/json
code
required
string = 6 characters

Responses

Request samples

Content type
application/json
{
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "backupCodes": [
    ],
  • "warning": "string"
}

Disable 2FA (requires current password)

Authorizations:
MerchantJwt
Request Body schema: application/json
password
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "ChangeMe123!"
}

Response samples

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

Complete 2FA challenge and issue JWT

Request Body schema: application/json
challengeToken
required
string
code
required
string [ 6 .. 8 ] characters
type
string
Default: "totp"
Enum: "totp" "backup"

Responses

Request samples

Content type
application/json
{
  • "challengeToken": "ch_abc123",
  • "code": "123456",
  • "type": "totp"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "string"
}

Generate new backup codes

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "backupCodes": [
    ],
  • "message": "string"
}

Get 2FA status for the current user

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "hasBackupCodes": true,
  • "backupCodesCount": 0
}

Passkeys

Generate WebAuthn registration options

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{ }

Verify passkey registration

Authorizations:
MerchantJwt
Request Body schema: application/json
challengeKey
required
string
required
object
deviceName
string

Responses

Request samples

Content type
application/json
{
  • "challengeKey": "pkc_abc123",
  • "deviceName": "MacBook",
  • "response": {
    }
}

Response samples

Content type
application/json
{ }

Generate WebAuthn authentication options

Request Body schema: application/json
email
string <email>
challengeToken
string
resetToken
string

Password-reset token when registering a passkey during reset.

Responses

Request samples

Content type
application/json
{
  • "email": "merchant@example.com"
}

Response samples

Content type
application/json
{ }

Verify passkey authentication and issue JWT

Request Body schema: application/json
challengeKey
required
string
required
object

Responses

Request samples

Content type
application/json
{
  • "challengeKey": "pkc_abc123",
  • "response": {
    }
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "token": "string"
}

List passkeys for the current user

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "passkeys": [
    ]
}

Delete a passkey

Authorizations:
MerchantJwt
path Parameters
credentialId
required
string

Responses

Response samples

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

Password

Request a password reset email

Request Body schema: application/json
email
required
string <email>

Responses

Request samples

Content type
application/json
{
  • "email": "merchant@example.com"
}

Response samples

Content type
application/json
{ }

Reset password with token

Request Body schema: application/json
token
required
string
password
required
string >= 8 characters
confirmPassword
required
string >= 8 characters
object
object

Responses

Request samples

Content type
application/json
{
  • "token": "rst_abc123",
  • "password": "NewPass123!",
  • "confirmPassword": "NewPass123!"
}

Response samples

Content type
application/json
{ }

Validate a password reset token

Request Body schema: application/json
token
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "rst_abc123"
}

Response samples

Content type
application/json
{ }

OAuth

Redirect to OAuth provider authorization page

path Parameters
provider
required
string
Example: google

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "message": "string"
}

Handle OAuth provider callback

path Parameters
provider
required
string
query Parameters
code
string
state
string
error
string

Responses

User Settings

Get account settings

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Update account settings

Authorizations:
MerchantJwt
Request Body schema: application/json
object (UserSecuritySettings)
object (UserNotificationSettings)
object (UserDisplaySettings)
object (UserPrivacySettings)

Responses

Request samples

Content type
application/json
{
  • "display": {
    }
}

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Update security settings group

Authorizations:
MerchantJwt
Request Body schema: application/json
twoFactorMethod
string
Enum: "totp" "passkey" "none"
requireTwoFactorForPayments
boolean
sessionTimeout
integer >= 1
loginNotifications
boolean
allowedIPs
Array of strings
rememberDevices
boolean
maxActiveSessions
integer >= 1

Responses

Request samples

Content type
application/json
{
  • "twoFactorMethod": "totp",
  • "sessionTimeout": 30
}

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Update notification preferences group

Authorizations:
MerchantJwt
Request Body schema: application/json
emailOnPaymentReceived
boolean
emailOnPaymentFailed
boolean
emailOnNewCustomer
boolean
emailOnGatewayDown
boolean
emailOnSecurityAlert
boolean
weeklyReport
boolean
marketingEmails
boolean

Responses

Request samples

Content type
application/json
{
  • "emailOnPaymentReceived": true,
  • "weeklyReport": true
}

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Update display settings group

Authorizations:
MerchantJwt
Request Body schema: application/json
theme
string
Enum: "light" "dark" "system"
primaryColor
string
language
string
timezone
string
dateFormat
string
numberFormat
string

Responses

Request samples

Content type
application/json
{
  • "theme": "system",
  • "language": "en"
}

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Update privacy settings group

Authorizations:
MerchantJwt
Request Body schema: application/json
showActivityLog
boolean
shareAnalytics
boolean

Responses

Request samples

Content type
application/json
{
  • "showActivityLog": true,
  • "shareAnalytics": false
}

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Reset all account settings to defaults

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Reset a settings group to defaults

Authorizations:
MerchantJwt
path Parameters
group
required
string
Enum: "security" "notifications" "display" "privacy"

Responses

Response samples

Content type
application/json
{
  • "security": {
    },
  • "notifications": {
    },
  • "display": {
    },
  • "privacy": {
    }
}

Profile

Get the current user profile

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": "user@example.com",
  • "name": "string",
  • "photo": "string",
  • "companyName": "string",
  • "isActive": true,
  • "paymentMode": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update the current user profile

Authorizations:
MerchantJwt
Request Body schema: application/json
name
string
company
string
object

Responses

Request samples

Content type
application/json
{
  • "name": "Ada Lovelace",
  • "company": "Example LLC"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": "user@example.com",
  • "name": "string",
  • "photo": "string",
  • "companyName": "string",
  • "isActive": true,
  • "paymentMode": "string",
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List companies owned by the user

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a company

Authorizations:
MerchantJwt
Request Body schema: application/json
name
required
string
crNumber
required
string
vatNumber
string
country
required
string
city
required
string
address
required
string
postalCode
required
string
companyLogoMediaId
string

Responses

Request samples

Content type
application/json
{
  • "name": "Example LLC",
  • "crNumber": "1010123456",
  • "country": "SA",
  • "city": "Riyadh",
  • "address": "King Fahd Rd",
  • "postalCode": "11564"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "crNumber": "string",
  • "vatNumber": "string",
  • "country": "string",
  • "city": "string",
  • "address": "string",
  • "postalCode": "string",
  • "companyLogoMediaId": "string",
  • "documents": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a company

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "crNumber": "string",
  • "vatNumber": "string",
  • "country": "string",
  • "city": "string",
  • "address": "string",
  • "postalCode": "string",
  • "companyLogoMediaId": "string",
  • "documents": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a company

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
name
string
crNumber
string
vatNumber
string
country
string
city
string
address
string
postalCode
string
companyLogoMediaId
string

Responses

Request samples

Content type
application/json
{
  • "name": "Example LLC",
  • "city": "Jeddah"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "crNumber": "string",
  • "vatNumber": "string",
  • "country": "string",
  • "city": "string",
  • "address": "string",
  • "postalCode": "string",
  • "companyLogoMediaId": "string",
  • "documents": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a company

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Upload a company document

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: multipart/form-data
file
required
string <binary>
docType
required
string

Responses

Request samples

Content type
multipart/form-data
{
  "docType": "commercial_registration"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "crNumber": "string",
  • "vatNumber": "string",
  • "country": "string",
  • "city": "string",
  • "address": "string",
  • "postalCode": "string",
  • "companyLogoMediaId": "string",
  • "documents": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Remove a company document

Authorizations:
MerchantJwt
path Parameters
id
required
string
docId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "crNumber": "string",
  • "vatNumber": "string",
  • "country": "string",
  • "city": "string",
  • "address": "string",
  • "postalCode": "string",
  • "companyLogoMediaId": "string",
  • "documents": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Merchants

Create a merchant workspace

Auth only (no X-Merchant-Id). Creates the merchant and an owner membership.

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

URL-safe slug matching ^[a-z0-9][a-z0-9-]{1,48}[a-z0-9]$

Responses

Request samples

Content type
application/json
{
  • "name": "Example Merchant",
  • "slug": "example-merchant"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "name": "string",
  • "slug": "string",
  • "logo": "string",
  • "status": "active",
  • "website": "string",
  • "description": "string",
  • "industry": "string",
  • "address": "string",
  • "phone": "string",
  • "timezone": "string",
  • "contactName": "string",
  • "contactEmail": "string",
  • "contactPhone": "string",
  • "onboardingCompleted": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Check whether a merchant slug is available

Authorizations:
MerchantJwt
path Parameters
slug
required
string

Responses

Response samples

Content type
application/json
{
  • "available": true
}

List merchants the current user belongs to

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get the current merchant (X-Merchant-Id)

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "name": "string",
  • "slug": "string",
  • "logo": "string",
  • "status": "active",
  • "website": "string",
  • "description": "string",
  • "industry": "string",
  • "address": "string",
  • "phone": "string",
  • "timezone": "string",
  • "contactName": "string",
  • "contactEmail": "string",
  • "contactPhone": "string",
  • "onboardingCompleted": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update the current merchant (owner or admin)

Authorizations:
MerchantJwt
Request Body schema: application/json
name
string
logo
string
website
string
description
string
industry
string
address
string
phone
string
timezone
string
contactName
string
contactEmail
string
contactPhone
string

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "name": "string",
  • "slug": "string",
  • "logo": "string",
  • "status": "active",
  • "website": "string",
  • "description": "string",
  • "industry": "string",
  • "address": "string",
  • "phone": "string",
  • "timezone": "string",
  • "contactName": "string",
  • "contactEmail": "string",
  • "contactPhone": "string",
  • "onboardingCompleted": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Soft-delete the current merchant (owner only)

Authorizations:
MerchantJwt

Responses

Mark onboarding complete (owner only)

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "name": "string",
  • "slug": "string",
  • "logo": "string",
  • "status": "active",
  • "website": "string",
  • "description": "string",
  • "industry": "string",
  • "address": "string",
  • "phone": "string",
  • "timezone": "string",
  • "contactName": "string",
  • "contactEmail": "string",
  • "contactPhone": "string",
  • "onboardingCompleted": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Team

List members of the current merchant

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Change a member role (owner or admin)

Authorizations:
MerchantJwt
path Parameters
memberId
required
string
Request Body schema: application/json
role
required
string
Enum: "admin" "member" "developer"

Responses

Request samples

Content type
application/json
{
  • "role": "developer"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "userId": "string",
  • "merchantId": "string",
  • "role": "owner",
  • "joinedAt": "2019-08-24T14:15:22Z",
  • "invitedBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Remove a member (owner or admin)

Authorizations:
MerchantJwt
path Parameters
memberId
required
string

Responses

Leave the current merchant

Authorizations:
MerchantJwt

Responses

Invites

List pending invites (owner or admin)

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Invite a member (owner or admin)

Authorizations:
MerchantJwt
Request Body schema: application/json
email
required
string <email>
role
required
string
Enum: "admin" "member" "developer"

Responses

Request samples

Content type
application/json
{
  • "email": "teammate@example.com",
  • "role": "developer"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "email": "user@example.com",
  • "role": "admin",
  • "token": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "invitedBy": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Revoke an invite (owner or admin)

Authorizations:
MerchantJwt
path Parameters
inviteId
required
string

Responses

Validate an invite token

path Parameters
token
required
string

Responses

Response samples

Content type
application/json
{
  • "valid": true,
  • "merchantName": "string",
  • "role": "admin",
  • "email": "string"
}

Accept an invite (authenticated user)

Authorizations:
MerchantJwt
path Parameters
token
required
string

Responses

Response samples

Content type
application/json
{
  • "merchant": {
    },
  • "membership": {
    }
}

Payments

Refund a payment

Authorizations:
MerchantJwt
path Parameters
paymentId
required
string
Request Body schema: application/json
amountMinor
integer <int64> > 0
reason
required
string [ 1 .. 500 ] characters

Responses

Request samples

Content type
application/json
{
  • "amountMinor": 1000,
  • "reason": "Customer requested refund"
}

Response samples

Content type
application/json
{
  • "refundId": "string",
  • "amount": {
    },
  • "currency": "string",
  • "status": "init",
  • "reason": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Apps

List the user's apps

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an app

Authorizations:
MerchantJwt
Request Body schema: application/json
name
required
string
description
string
brandName
string
brandLogo
string or null <uri>
showProducts
boolean
showCurrencySelector
boolean
showTaxElement
boolean
showCustomerElement
boolean
showAddressElement
boolean
showShipping
boolean
showPayment
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "Storefront",
  • "description": "Primary checkout app",
  • "brandName": "Example"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "description": "string",
  • "isActive": true,
  • "brandName": "string",
  • "brandLogo": "string",
  • "showProducts": true,
  • "showCurrencySelector": true,
  • "showTaxElement": true,
  • "showCustomerElement": true,
  • "showAddressElement": true,
  • "showShipping": true,
  • "showPayment": true,
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "keyPairs": [
    ]
}

List apps with minimal fields for the app switcher

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Paginated app list

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
isActive
string
Enum: "true" "false"

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Paginated lite app list for dropdowns

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "description": "string",
  • "isActive": true,
  • "brandName": "string",
  • "brandLogo": "string",
  • "showProducts": true,
  • "showCurrencySelector": true,
  • "showTaxElement": true,
  • "showCustomerElement": true,
  • "showAddressElement": true,
  • "showShipping": true,
  • "showPayment": true,
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
name
string
description
string
brandName
string
brandLogo
string or null <uri>
showProducts
boolean
showCurrencySelector
boolean
showTaxElement
boolean
showCustomerElement
boolean
showAddressElement
boolean
showShipping
boolean
showPayment
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "Storefront",
  • "brandName": "Example"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "name": "string",
  • "description": "string",
  • "isActive": true,
  • "brandName": "string",
  • "brandLogo": "string",
  • "showProducts": true,
  • "showCurrencySelector": true,
  • "showTaxElement": true,
  • "showCustomerElement": true,
  • "showAddressElement": true,
  • "showShipping": true,
  • "showPayment": true,
  • "settings": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

App Settings

Get app settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
object (AppBrandingSettings)
object (AppCheckoutSettings)
object (AppPaymentSettings)
object (AppNotificationSettings)
object (AppSecuritySettings)
object (AppIntegrationSettings)

Responses

Request samples

Content type
application/json
{
  • "checkout": {
    }
}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app branding settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
primaryColor
string
secondaryColor
string
accentColor
string
fontFamily
string
borderRadius
string
logoPosition
string
Enum: "left" "center"

Responses

Request samples

Content type
application/json
{
  • "primaryColor": "#0F766E",
  • "logoPosition": "left"
}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app checkout settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
showProducts
boolean
showCurrencySelector
boolean
showTaxElement
boolean
showCustomerElement
boolean
showAddressElement
boolean
showShipping
boolean
showPayment
boolean
requireCustomerVerification
boolean
verificationMethod
string
Enum: "email" "mobile" "both"
allowGuestCheckout
boolean
autoRedirectOnSuccess
boolean
successUrl
string
cancelUrl
string

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app payment settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
defaultCurrency
string
allowedCurrencies
Array of strings
minimumAmountMinor
integer <int64> >= 0
maximumAmountMinor
integer <int64> >= 0
autoCapture
boolean
refundPolicy
string
Enum: "full" "partial" "none"
refundWindow
number >= 0

Responses

Request samples

Content type
application/json
{
  • "defaultCurrency": "SAR",
  • "autoCapture": true
}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app notification settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
sendCustomerReceipt
boolean
sendMerchantAlert
boolean
webhookRetryAttempts
integer >= 0
webhookRetryInterval
integer >= 0

Responses

Request samples

Content type
application/json
{
  • "sendCustomerReceipt": true,
  • "sendMerchantAlert": true
}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app security settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
allowedDomains
Array of strings
enforceHttps
boolean
rateLimitPerMinute
integer >= 0
enableFraudDetection
boolean
blockVpn
boolean

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Update app integration settings

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
sdkVersion
string
apiVersion
string
testMode
boolean
debugMode
boolean

Responses

Request samples

Content type
application/json
{
  • "testMode": true,
  • "debugMode": false
}

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Reset all app settings to defaults

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

Reset an app settings group to defaults

Authorizations:
MerchantJwt
path Parameters
appId
required
string
group
required
string
Enum: "branding" "checkout" "payment" "notifications" "security" "integration"

Responses

Response samples

Content type
application/json
{
  • "branding": {
    },
  • "checkout": {
    },
  • "payment": {
    },
  • "notifications": {
    },
  • "security": {
    },
  • "integration": {
    }
}

API Keys

List masked API keys for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Rotate the key pair for an environment

Authorizations:
MerchantJwt
path Parameters
appId
required
string
environment
required
string (Environment)
Enum: "sandbox" "live"

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "environment": "sandbox",
  • "publicKey": "string",
  • "secretKey": "string",
  • "secretKeyPrefix": "string",
  • "secretKeyLast4": "string"
}

Products

Create a product

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
title
required
string
priceMinor
required
integer <int64> > 0
sku
string
currency
required
string
description
string
media
Array of strings
category
string
compareAtPriceMinor
integer <int64> > 0
unitPriceMinor
integer <int64> > 0
chargeTax
boolean
costPerItemMinor
integer <int64> > 0
status
string
Enum: "active" "draft" "archived"
object
object
themeTemplate
string
object
object
Array of objects
object
quantity
integer >= 0

Legacy field.

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "title": "Premium Plan",
  • "priceMinor": 4999,
  • "currency": "USD",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "storeCode": "string",
  • "title": "string",
  • "sku": "string",
  • "price": {
    },
  • "currency": "string",
  • "description": "string",
  • "media": [
    ],
  • "category": "string",
  • "compareAtPrice": {
    },
  • "unitPrice": {
    },
  • "chargeTax": true,
  • "costPerItem": {
    },
  • "status": "active",
  • "publishing": { },
  • "productOrganization": { },
  • "themeTemplate": "string",
  • "inventory": { },
  • "shipping": { },
  • "variants": [
    ],
  • "seo": { },
  • "quantity": 0,
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List products for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Paginated product list for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Paginated lite product list for dropdowns

Authorizations:
MerchantJwt
path Parameters
appId
required
string
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get a product

Authorizations:
MerchantJwt
path Parameters
productId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "storeCode": "string",
  • "title": "string",
  • "sku": "string",
  • "price": {
    },
  • "currency": "string",
  • "description": "string",
  • "media": [
    ],
  • "category": "string",
  • "compareAtPrice": {
    },
  • "unitPrice": {
    },
  • "chargeTax": true,
  • "costPerItem": {
    },
  • "status": "active",
  • "publishing": { },
  • "productOrganization": { },
  • "themeTemplate": "string",
  • "inventory": { },
  • "shipping": { },
  • "variants": [
    ],
  • "seo": { },
  • "quantity": 0,
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a product

Authorizations:
MerchantJwt
path Parameters
productId
required
string
Request Body schema: application/json
title
string
priceMinor
integer <int64> > 0
sku
string
currency
string
description
string
media
Array of strings
category
string
compareAtPriceMinor
integer <int64> > 0
unitPriceMinor
integer <int64> > 0
chargeTax
boolean
costPerItemMinor
integer <int64> > 0
status
string
Enum: "active" "draft" "archived"
object
object
themeTemplate
string
object
object
Array of objects
object
quantity
integer >= 0
isActive
boolean

Legacy field.

Responses

Request samples

Content type
application/json
{
  • "title": "Premium Plan",
  • "priceMinor": 5999,
  • "currency": "USD",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "storeCode": "string",
  • "title": "string",
  • "sku": "string",
  • "price": {
    },
  • "currency": "string",
  • "description": "string",
  • "media": [
    ],
  • "category": "string",
  • "compareAtPrice": {
    },
  • "unitPrice": {
    },
  • "chargeTax": true,
  • "costPerItem": {
    },
  • "status": "active",
  • "publishing": { },
  • "productOrganization": { },
  • "themeTemplate": "string",
  • "inventory": { },
  • "shipping": { },
  • "variants": [
    ],
  • "seo": { },
  • "quantity": 0,
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a product

Authorizations:
MerchantJwt
path Parameters
productId
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Transactions

Payment session statistics

Authorizations:
MerchantJwt
query Parameters
appId
string
status
string
gateway
string
startDate
string <date-time>
endDate
string <date-time>

Responses

Response samples

Content type
application/json
{
  • "totalPayments": 0,
  • "completedPayments": 0,
  • "pendingPayments": 0,
  • "totalRevenue": {
    },
  • "successRate": 0
}

Paginated payment session list

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
appId
string
status
string
gateway
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

List payment sessions

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer
Default: 50

Responses

Response samples

Content type
application/json
{
  • "sessions": [
    ],
  • "pagination": {
    }
}

Get payment session details

Authorizations:
MerchantJwt
path Parameters
sessionId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "sessionId": "string",
  • "amount": {
    },
  • "currency": "string",
  • "customerEmail": "string",
  • "customerName": "string",
  • "products": [
    ],
  • "status": "string",
  • "gateway": "string",
  • "description": "string",
  • "redirectUrl": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "completedAt": "2019-08-24T14:15:22Z",
  • "cancelledAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "returnUrl": "string",
  • "cancelUrl": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "providerPaymentId": "string",
  • "gatewayTransactionId": "string",
  • "error": { },
  • "currencyConversion": {
    }
}

Customers

Create a customer

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
firstName
string
lastName
string
email
string <email>
mobile
string
language
string
object
object
notes
string
tags
Array of strings

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "firstName": "Ada",
  • "lastName": "Lovelace",
  • "email": "ada@example.com"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "user@example.com",
  • "mobile": "string",
  • "language": "string",
  • "defaultAddress": { },
  • "marketingPreferences": { },
  • "notes": "string",
  • "tags": [
    ],
  • "sessionIds": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List customers for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Paginated customer list for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get a customer

Authorizations:
MerchantJwt
path Parameters
customerId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "user@example.com",
  • "mobile": "string",
  • "language": "string",
  • "defaultAddress": { },
  • "marketingPreferences": { },
  • "notes": "string",
  • "tags": [
    ],
  • "sessionIds": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a customer

Authorizations:
MerchantJwt
path Parameters
customerId
required
string
Request Body schema: application/json
firstName
string
lastName
string
email
string <email>
mobile
string
language
string
object
object
notes
string
tags
Array of strings

Responses

Request samples

Content type
application/json
{
  • "firstName": "Ada",
  • "email": "ada@example.com"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "user@example.com",
  • "mobile": "string",
  • "language": "string",
  • "defaultAddress": { },
  • "marketingPreferences": { },
  • "notes": "string",
  • "tags": [
    ],
  • "sessionIds": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a customer

Authorizations:
MerchantJwt
path Parameters
customerId
required
string

Responses

Response samples

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

Customer payment history

Authorizations:
MerchantJwt
path Parameters
customerId
required
string
query Parameters
page
integer
Default: 1
limit
integer
Default: 10

Responses

Response samples

Content type
application/json
{
  • "payments": [
    ],
  • "total": 0,
  • "page": 0,
  • "limit": 0,
  • "totalPages": 0
}

Gateways

List the global gateway catalog

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "gateways": [
    ]
}

List gateways with their available currencies

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "gateways": [
    ]
}

Paginated lite gateway catalog for dropdowns

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

List an app's configured gateways

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
{
  • "gateways": [
    ]
}

Configure a gateway for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string
Request Body schema: application/json
name
required
string
Enum: "paypal" "stripe" "moyasar" "myfatoorah"
required
object
defaultCurrency
string = 3 characters
acceptedCurrencies
Array of strings
isDefault
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "name": "moyasar",
  • "config": {
    },
  • "defaultCurrency": "SAR",
  • "isDefault": true
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "name": "string",
  • "config": { },
  • "defaultCurrency": "string",
  • "acceptedCurrencies": [
    ],
  • "supportedPaymentMethods": [
    ],
  • "isDefault": true,
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Paginated list of an app's configured gateways

Authorizations:
MerchantJwt
path Parameters
appId
required
string
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Update an app gateway

Authorizations:
MerchantJwt
path Parameters
appId
required
string
gatewayId
required
string
Request Body schema: application/json
name
string
Enum: "paypal" "stripe" "moyasar" "myfatoorah"
object
defaultCurrency
string = 3 characters
acceptedCurrencies
Array of strings
isDefault
boolean
isActive
boolean

Responses

Request samples

Content type
application/json
{
  • "isActive": true,
  • "isDefault": true,
  • "defaultCurrency": "SAR"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "name": "string",
  • "config": { },
  • "defaultCurrency": "string",
  • "acceptedCurrencies": [
    ],
  • "supportedPaymentMethods": [
    ],
  • "isDefault": true,
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete an app gateway

Authorizations:
MerchantJwt
path Parameters
appId
required
string
gatewayId
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Gateway Requests

List gateway onboarding requests

Authorizations:
MerchantJwt
query Parameters
status
string
gateway
string

Responses

Response samples

Content type
application/json
{
  • "requests": [
    ]
}

Create a gateway onboarding request

Authorizations:
MerchantJwt
Request Body schema: application/json
gateway
required
string
required
object
required
object
required
object
object
Array of objects (GatewayRequestAttachment)

Responses

Request samples

Content type
application/json
{
  • "gateway": "moyasar",
  • "customer": {
    },
  • "company": {
    },
  • "website": {}
}

Response samples

Content type
application/json
{ }

Paginated gateway onboarding requests

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
status
string
gateway
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get a gateway request

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Update a draft gateway request

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
gateway
string
object
object
object
object
Array of objects (GatewayRequestAttachment)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{ }

Submit a gateway request

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Update request status (admin only)

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
status
required
string
Enum: "Draft" "Submitted" "InReview" "ActionRequired" "Approved" "Rejected" "Live"
note
string

Responses

Request samples

Content type
application/json
{
  • "status": "Submitted",
  • "note": "Ready for review"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "message": "string"
}

Add corrections to a request (admin only)

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
required
required
boolean
message
string
fields
Array of strings

Responses

Request samples

Content type
application/json
{
  • "required": true,
  • "message": "Upload a clearer CR document",
  • "fields": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "message": "string"
}

Forward a request to the gateway (admin only)

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "message": "string"
}

Gateway Rules

List gateway routing rules

Authorizations:
MerchantJwt
query Parameters
appId
required
string
environment
string (Environment)
Enum: "sandbox" "live"

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Create a gateway routing rule

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
name
required
string
description
string
ruleType
required
string
required
Array of objects non-empty
preferredGateway
required
string
environment
required
string (Environment)
Enum: "sandbox" "live"
score
number
priority
integer

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "name": "Prefer Moyasar for SAR",
  • "ruleType": "currency",
  • "conditions": [
    ],
  • "preferredGateway": "moyasar",
  • "environment": "sandbox",
  • "priority": 10
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Paginated gateway routing rules

Authorizations:
MerchantJwt
query Parameters
appId
required
string
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
environment
string (Environment)
Enum: "sandbox" "live"

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get a gateway rule

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Update a gateway rule

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
name
string
description
string
ruleType
string
Array of objects
preferredGateway
string
environment
string (Environment)
Enum: "sandbox" "live"
score
number
priority
integer
isActive
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "Prefer Moyasar for SAR",
  • "priority": 5,
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Delete a gateway rule

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Toggle a gateway rule active state

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Seed default gateway rules

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
environment
required
string (Environment)
Enum: "sandbox" "live"

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "environment": "sandbox"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Test gateway rule matching

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
environment
required
string (Environment)
Enum: "sandbox" "live"
required
object

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "environment": "sandbox",
  • "context": {
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": null,
  • "message": "string",
  • "error": "string"
}

Gateway Request Webhooks

Provider webhook for gateway request status

path Parameters
provider
required
string
Enum: "stripe" "paypal" "moyasar" "myfatoorah"
Request Body schema: application/json
externalId
required
string
status
required
string
Enum: "approved" "rejected" "pending" "live"
encryptedSecrets
string

Responses

Request samples

Content type
application/json
{
  • "externalId": "acct_123",
  • "status": "approved"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "request": { }
}

Reports

Dashboard statistics

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "statistics": {
    },
  • "latestSessions": [
    ],
  • "recentActivity": {
    },
  • "chartData": {
    },
  • "shortcuts": [
    ]
}

List all of the user's tokens

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • { }
]

Tokens

Create an SDK/client token

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
name
string
libraryIds
required
Array of strings non-empty
environment
string (Environment)
Enum: "sandbox" "live"
domains
Array of strings <uri>

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "name": "Storefront SDK",
  • "libraryIds": [
    ],
  • "environment": "sandbox",
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "libraryIds": [
    ],
  • "libraries": [
    ],
  • "token": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "environment": "sandbox",
  • "domains": [
    ],
  • "isActive": true,
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List tokens for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Paginated token list for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Paginated lite token list for dropdowns

Authorizations:
MerchantJwt
path Parameters
appId
required
string
query Parameters
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get a token

Authorizations:
MerchantJwt
path Parameters
tokenId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "libraryIds": [
    ],
  • "libraries": [
    ],
  • "token": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "environment": "sandbox",
  • "domains": [
    ],
  • "isActive": true,
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a token

Authorizations:
MerchantJwt
path Parameters
tokenId
required
string
Request Body schema: application/json
name
string
libraryIds
Array of strings non-empty
environment
string (Environment)
Enum: "sandbox" "live"
domains
Array of strings <uri>

Responses

Request samples

Content type
application/json
{
  • "name": "Storefront SDK",
  • "environment": "live"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "libraryIds": [
    ],
  • "libraries": [
    ],
  • "token": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "environment": "sandbox",
  • "domains": [
    ],
  • "isActive": true,
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a token

Authorizations:
MerchantJwt
path Parameters
tokenId
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Revoke a token

Authorizations:
MerchantJwt
path Parameters
tokenId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "libraryIds": [
    ],
  • "libraries": [
    ],
  • "token": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "environment": "sandbox",
  • "domains": [
    ],
  • "isActive": true,
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Add an allowed domain to a token

Authorizations:
MerchantJwt
path Parameters
tokenId
required
string
Request Body schema: application/json
domain
required
string

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "libraryIds": [
    ],
  • "libraries": [
    ],
  • "token": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "environment": "sandbox",
  • "domains": [
    ],
  • "isActive": true,
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Remove an allowed domain from a token

Authorizations:
MerchantJwt
path Parameters
tokenId
required
string
domain
required
string

URL-encoded domain.

Responses

Notifications

List active notification event types

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • { }
]

List available notification channels

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List webhook endpoints for an app

Authorizations:
MerchantJwt
query Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a webhook endpoint

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
url
required
string <uri>
description
string
authHeaderName
string
authHeaderValue
string

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "endpoint": {
    },
  • "secret": "string"
}

Paginated webhook endpoint list

Authorizations:
MerchantJwt
query Parameters
appId
required
string
page
integer
Default: 1
limit
integer <= 100
Default: 20
sortBy
string
Default: "createdAt"
sortOrder
string
Default: "desc"
Enum: "asc" "desc"
search
string
isActive
string
Enum: "true" "false"

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get a webhook endpoint

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "description": "string",
  • "secretEnc": "string",
  • "authHeaderName": "string",
  • "authHeaderValueEnc": "string",
  • "isActive": true,
  • "consecutiveFailures": 0,
  • "disabledReason": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a webhook endpoint

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
url
string <uri>
description
string
isActive
boolean
authHeaderName
string
authHeaderValue
string

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "description": "string",
  • "secretEnc": "string",
  • "authHeaderName": "string",
  • "authHeaderValueEnc": "string",
  • "isActive": true,
  • "consecutiveFailures": 0,
  • "disabledReason": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a webhook endpoint

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Rotate webhook endpoint signing secret

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

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

Send a test ping event to a webhook endpoint

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

List notification rules for an app

Authorizations:
MerchantJwt
query Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a notification rule

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
eventType
required
string
channel
required
string
recipient
required
string
isActive
boolean
Default: true
required
object

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "eventType": "payment.completed",
  • "channel": "webhook",
  • "recipient": "endpoint",
  • "isActive": true,
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "eventType": "string",
  • "channel": "string",
  • "recipient": "string",
  • "isActive": true,
  • "config": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a notification rule

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "eventType": "string",
  • "channel": "string",
  • "recipient": "string",
  • "isActive": true,
  • "config": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a notification rule

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
isActive
boolean
object

Responses

Request samples

Content type
application/json
{
  • "isActive": false
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "eventType": "string",
  • "channel": "string",
  • "recipient": "string",
  • "isActive": true,
  • "config": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a notification rule

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

List notification deliveries for an app

Authorizations:
MerchantJwt
query Parameters
appId
required
string
channel
string
status
string
eventType
string
page
integer
Default: 1
limit
integer <= 100
Default: 50

Responses

Response samples

Content type
application/json
{
  • "deliveries": [
    ],
  • "pagination": {
    }
}

Get a notification delivery

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "ruleId": "string",
  • "eventType": "string",
  • "channel": "string",
  • "recipient": "string",
  • "eventId": "string",
  • "target": "string",
  • "payloadSnapshot": { },
  • "status": "pending",
  • "attempts": 0,
  • "lastStatusCode": 0,
  • "lastResponseSnippet": "string",
  • "lastError": "string",
  • "durationMs": 0,
  • "nextRetryAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Request redelivery of a notification

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

List notification templates for an app

Authorizations:
MerchantJwt
query Parameters
appId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a notification template

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
string or null
channel
required
string
eventType
required
string
recipient
required
string
locale
string
Default: "en"
subject
string
body
required
string
isActive
boolean
Default: true

Responses

Request samples

Content type
application/json
{
  • "channel": "email",
  • "eventType": "payment.completed",
  • "recipient": "customer",
  • "subject": "Payment received",
  • "body": "Your payment of {{amount}} {{currency}} was completed."
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "channel": "string",
  • "eventType": "string",
  • "recipient": "string",
  • "locale": "string",
  • "subject": "string",
  • "body": "string",
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a notification template

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "channel": "string",
  • "eventType": "string",
  • "recipient": "string",
  • "locale": "string",
  • "subject": "string",
  • "body": "string",
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a notification template

Authorizations:
MerchantJwt
path Parameters
id
required
string
Request Body schema: application/json
subject
string
body
string
isActive
boolean

Responses

Request samples

Content type
application/json
{
  • "subject": "Payment received",
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "appId": "string",
  • "channel": "string",
  • "eventType": "string",
  • "recipient": "string",
  • "locale": "string",
  • "subject": "string",
  • "body": "string",
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a notification template

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

List in-app notifications for the current user

Authorizations:
MerchantJwt
query Parameters
page
integer
Default: 1
limit
integer <= 50
Default: 5

Responses

Response samples

Content type
application/json
{
  • "notifications": [
    ],
  • "unreadCount": 0,
  • "pagination": {
    }
}

Get unread in-app notification count

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "unreadCount": 0
}

Mark an in-app notification as viewed

Authorizations:
MerchantJwt
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "appId": "string",
  • "title": "string",
  • "body": "string",
  • "eventType": "string",
  • "channel": "string",
  • "viewed": true,
  • "viewedAt": "2019-08-24T14:15:22Z",
  • "metadata": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Mark all in-app notifications as viewed

Authorizations:
MerchantJwt

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Audit Logs

Query audit logs (admin only)

Requires admin role (requireAdmin).

Authorizations:
MerchantJwt
query Parameters
actorId
string
action
string
status
string
Enum: "success" "failure"
startDate
string <date-time>
endDate
string <date-time>
page
integer
Default: 1
limit
integer
Default: 50

Responses

Response samples

Content type
application/json
{
  • "logs": [
    ],
  • "pagination": {
    }
}

Get audit logs for the current user

Authorizations:
MerchantJwt
query Parameters
limit
integer
Default: 100

Responses

Response samples

Content type
application/json
{
  • "logs": [
    ]
}

Currencies

List currencies

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a currency

Authorizations:
MerchantJwt
Request Body schema: application/json
code
required
string = 3 characters
name
required
string
symbol
string
rateFromUsd
required
number > 0

Units of this currency per 1 USD (fastFOREX fetch-all shape). USD is always 1. This inverted the old USD-per-unit field — SAR is 3.7545, not 0.27.

minorUnitExponent
required
integer
Enum: 0 2 3

ISO 4217 exponent. 3 for KWD/BHD/OMR, 0 for JPY, 2 for most.

isActive
boolean

Responses

Request samples

Content type
application/json
{
  • "code": "USD",
  • "name": "US Dollar",
  • "symbol": "$",
  • "rateFromUsd": 1,
  • "minorUnitExponent": 2,
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "code": "SAR",
  • "name": "string",
  • "symbol": "string",
  • "rateFromUsd": 3.7545,
  • "minorUnitExponent": 2,
  • "rateUpdatedAt": "2019-08-24T14:15:22Z",
  • "rateProviderUpdatedAt": "2019-08-24T14:15:22Z",
  • "rateSource": "seed",
  • "isActive": true
}

Get a currency by ISO code

path Parameters
code
required
string
Example: USD

Responses

Response samples

Content type
application/json
{
  • "code": "SAR",
  • "name": "string",
  • "symbol": "string",
  • "rateFromUsd": 3.7545,
  • "minorUnitExponent": 2,
  • "rateUpdatedAt": "2019-08-24T14:15:22Z",
  • "rateProviderUpdatedAt": "2019-08-24T14:15:22Z",
  • "rateSource": "seed",
  • "isActive": true
}

Update a currency

Authorizations:
MerchantJwt
path Parameters
code
required
string
Example: USD
Request Body schema: application/json
name
string
symbol
string
rateFromUsd
number > 0

Units of this currency per 1 USD. A manually supplied rate sets rateSource to manual.

minorUnitExponent
integer
Enum: 0 2 3
isActive
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "US Dollar",
  • "rateFromUsd": 1,
  • "minorUnitExponent": 2,
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "code": "SAR",
  • "name": "string",
  • "symbol": "string",
  • "rateFromUsd": 3.7545,
  • "minorUnitExponent": 2,
  • "rateUpdatedAt": "2019-08-24T14:15:22Z",
  • "rateProviderUpdatedAt": "2019-08-24T14:15:22Z",
  • "rateSource": "seed",
  • "isActive": true
}

Convert an amount for a gateway

Request Body schema: application/json
amountMinor
required
integer <int64>
fromCurrency
required
string
gatewayId
required
string

Responses

Request samples

Content type
application/json
{
  • "amountMinor": 10000,
  • "fromCurrency": "USD",
  • "gatewayId": "gw_123"
}

Response samples

Content type
application/json
{
  • "original": {
    },
  • "converted": {
    },
  • "exchangeRate": 3.7545
}

Get a gateway's default currency

path Parameters
gatewayId
required
string

Responses

Response samples

Content type
application/json
{ }

Get a gateway's accepted currencies

path Parameters
gatewayId
required
string

Responses

Response samples

Content type
application/json
{ }

Validate a currency for a gateway

path Parameters
gatewayId
required
string
Request Body schema: application/json
currency
required
string

Responses

Request samples

Content type
application/json
{
  • "currency": "SAR"
}

Response samples

Content type
application/json
{ }

Domain Verification

Generate a domain verification file

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
domain
required
string

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "domain": "store.example.com"
}

Response samples

Content type
application/json
{ }

Verify domain ownership

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
domain
required
string

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "domain": "store.example.com"
}

Response samples

Content type
application/json
{ }

List verified domains for an app

Authorizations:
MerchantJwt
path Parameters
appId
required
string

Responses

Response samples

Content type
application/json
{ }

Check whether a domain is verified

Authorizations:
MerchantJwt
Request Body schema: application/json
appId
required
string
domain
required
string

Responses

Request samples

Content type
application/json
{
  • "appId": "app_123",
  • "domain": "store.example.com"
}

Response samples

Content type
application/json
{ }

Libraries

List libraries

Authorizations:
MerchantJwt
query Parameters
activeOnly
boolean
Default: true

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a library

Authorizations:
MerchantJwt
Request Body schema: application/json
identifier
required
string
name
required
string
description
string
scopes
required
Array of strings non-empty

Responses

Request samples

Content type
application/json
{
  • "identifier": "checkout-web",
  • "name": "Checkout Web",
  • "description": "Hosted checkout scopes",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "identifier": "string",
  • "name": "string",
  • "description": "string",
  • "scopes": [
    ],
  • "modules": [
    ],
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a library

Authorizations:
MerchantJwt
path Parameters
libraryId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "identifier": "string",
  • "name": "string",
  • "description": "string",
  • "scopes": [
    ],
  • "modules": [
    ],
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a library

Authorizations:
MerchantJwt
path Parameters
libraryId
required
string
Request Body schema: application/json
name
string
description
string
scopes
Array of strings
isActive
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "Checkout Web",
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "identifier": "string",
  • "name": "string",
  • "description": "string",
  • "scopes": [
    ],
  • "modules": [
    ],
  • "isActive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a library

Authorizations:
MerchantJwt
path Parameters
libraryId
required
string

Responses

Media

Upload a media file

Authorizations:
MerchantJwt
Request Body schema: multipart/form-data
file
required
string <binary>
appId
required
string

Responses

Request samples

Content type
multipart/form-data
{
  "appId": "app_123"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "type": "image",
  • "extension": "string",
  • "url": "string",
  • "name": "string",
  • "size": 0,
  • "mimeType": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

List media

Authorizations:
MerchantJwt
query Parameters
appId
required
string
type
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get media metadata

Authorizations:
MerchantJwt
path Parameters
mediaId
required
string

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "merchantId": "string",
  • "createdBy": "string",
  • "appId": "string",
  • "type": "image",
  • "extension": "string",
  • "url": "string",
  • "name": "string",
  • "size": 0,
  • "mimeType": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete media

Authorizations:
MerchantJwt
path Parameters
mediaId
required
string

Responses