NAV
curl HTTP JavaScript Node.JS Python Ruby Go

Layup API Documentation v1.4.13

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Welcome to The Layup Documentation page. This page contains detailed explanations with code examples. For an interactive approach see the Swagger page at api-documentation.layup.co.za.

Introduction

What is LayUp

LayUp is a layby payment solution. LayUp Schedules payments and ensure that your clients pay securely, effectively and on time. Depending on your parameters LayUp schedules a payment plan for your clients. Once a payment plan has been completed we notify you. There are 3 stories that are of importance to a merchant.

  1. Order Creation
  2. Deposit Received (and holding Stock for your client)
  3. Order Completion.

LayUp allows you to take full control over the entire payment process if you wish to do so. We also provide a convenient front-end for users to use. The front-end should significantly reduce the time to integrate and get you started using LayUp as soon as possible.

Once an order is completed a notification will be sent to the merchant so that you can provide the client with their product.

How to use LayUp

The best recourse would be to create an order representing what the user has selected and POST that to the LayUp API (With respect to the parameters set out by LayUp documentation). LayUp will return a Order ID to you, to save time, you can direct a user to the LayUp UI: shopper.layup.co.za/order/{orderId} (or respective to the environment you’re working in, sandbox.layup.co.za/order/{orderId} is also valid). For more information see fig. 1.a).

Terminology

Term Desc
Client A merchant client, someone who is looking to purchase something from a merchant.
User Anyone who interacts with LayUp’s UI or API
LayUp API Often interchanged with “back-end”. A REST-ful based api which the front-end and other integrations use to access the LayUp’s payment and other business applications.
LayUp UI Often referred to as the “front-end” is the external interface users can use to interact with the LayUp API
Database Internal Storage for LayUp, containing all data stored and used within the LayUp API
LayBy A system of paying a deposit to secure an article for later purchase.
Code Compiled or translated, the building blocks that make up the means of interaction between a user and a database or set of rules.
Order Goods to be purchased along with the terms of the LayBy agreement set within the parameters of the LayUp API
Payment Plan Payments scheduled summarising a portion (if not all) of the funds require to complete an Order
Payment Paid or to be paid in the future, the aggregate of which should eventually complete the Payment Plan and Order alike.
Payment Types Contribution, Deposit, Recurring or Refund
Payment Methods Card, EFT, Offline, Debicheck or Transfer
Documentation The API Documentation provided to you by a LayUp consultant and can also be found at: https://documentation.layup.co.za
Split Payments The process of splitting up an Order between multiple Payment Plans
Weekly Payments Weekly frequency of instalments as opposed to the default monthly.
Order Cloning Cloning allows multiple copies of the same Order.
Deposit Types Percentage, Flat or First Instalment
Auto Cancellation Automatically cancel any order when a customer is missing payments.
Grace Period How long a customer has to catch up on their payments before the order is finally cancelled through auto cancellation.
Cancellation Type Trigger auto cancellation through either number of missed installments or a percentage by a certain time.
Cancellation Policy Deposit, percentage or flat fee
Cancellation Fee On cancellation a fee is determined through the cancellation policy and added as a product on the order (negative)
Cancellation Interval Time interval over which the percentage cancellation type applies. A certain percentage must be paid a number of days before the final payment day.
Order Expiry If the deposit is not paid in full by a configurable time, the order will expire.
Good Standing Order is in good standing if the cancellation terms are not breached
Notifications Each notification can be disabled, enabled or enabled to be sent to a specific email.
Payment Notifications Successful payment, failing to collect or missed instalment.
Order Notifications New, amended, expired, cancelled, percentage completed, completed order and cancellation request.

Typical User Journeys

Success Journey

A typical successful client journey:

  1. Client clicks checkout with LayUp on Merchant’s website.
  2. Merchant creates an Order on LayUp
    • Parameters that dictates the structure of the payment plans:
    • Products - The list that determines the total value of the Order
    • Reference and name - Descriptions which will be included in notifications
    • Dates (max and min) - A range of dates that determines the payment plan length.
    • notifyUrl - optional query parameter to return the customer after making their deposit payment.
  3. Client is directed to LayUp.co.za/orders/:orderId
  4. Client selects payment period
  5. Client pays deposit
  6. Client is redirected back to the merchant
  7. Merchant is notified of deposit being paid successfully
  8. Merchant withholds stock for the client.
  9. Client pays monthly on billing cycle.
  10. Client Payment Plan is completed
  11. Merchant is notified
  12. Payments are settled to the merchant based on settlement options.

Failed Journey (Deposit Missed)

What happens when a client fails to meet the deposit value:

  1. Client clicks checkout with LayUp on Merchant’s website.
  2. Merchant creates an Order on LayUp with 2 hours expire option
  3. Client is directed to LayUp.co.za/orders/:orderId
  4. Client selects payment period
  5. Client drops off
  6. Client does not Pay within 2 hours
  7. Order is expired (merchant notified)

Failed Journey (Cancellation)

What happens when a client exceeds his payment period and does not meet the Order full amount:

  1. Client clicks checkout with LayUp on Merchant’s website.
  2. Merchant creates an Order on LayUp
  3. Client is directed to LayUp.co.za/orders/:orderId
  4. Client selects payment period
  5. Client pays deposit
  6. Client is redirected back to the merchant
  7. Merchant is notified of deposit being paid successfully
  8. Merchant withholds stock for the client.
  9. Client fails to make the required number of instalments.
  10. Order enters grace period
  11. Client fails to catch up on payments
  12. Order is cancelled
  13. Cancellation fee is sent to merchant
  14. Remainder is refunded to client

Cancellations

A cancellation term can be configured by a merchant. If the client accepts the terms then the client will have an option to cancel an order. If the terms has not been configured then the client will not be able to start the cancellation process and will have to wait for the order to cancel automatically due to missed payments.

Additionally a merchant can configure a global default term along with additional terms on a per order basis. Orders that do not have terms configured specifically for it will apply the global default term automatically.

WebHooks

Webhooks can be viewed as a basic remote tigger or event notification.

Webhook remote endpoints are not verified by the system as this would require manual input evertime webhook is defined or changed. If a merchant enters an incorrect endpoint the webhook will, as one would expect, send the payload to the wrong destination. This is one example why webhook payloads will only contain basic information and references.

Failed webhooks will retry up to 5 times with an exponential back off delay each time the webhook fails.

Optionally if a merchant's network infrastructure makes use of an Access Control List (ACL) please make sure that the following address: 99.81.244.160 is allowed to send network traffic. Webhook requests will always be sent from that address.

For more information see the modelWebHookPayload under the Schemas section.

Order Webhooks

Order webhooks will send notifications when an order changes state.

The MerchantService notifyUrl definitions shows how to set a remote endpoint for order webhooks.

Payment Webhooks

Payment webhooks will send notifications when a payment changes state.

The MerchantService paymentNotifyUrl definitions shows how to set a remote endpoint for payment webhooks.

API Keys

The primary method of authentication with the Layup API is API-key based. It should be possible to use sessions but is not a supported method when interacting with the API.

API-keys are set with a HTTP-header and should always be present in queries to interact with the RESTful web interface.

The response "Unauthorized" will typically be shown when your API-key is missing or invalid.

An API key will be generated once the merchant sign up process is complete.

How to set a API key header using cURL: curl -X GET https://sandbox-api.layup.co.za/v1/users -H 'Accept: application/json' -H 'apikey: your-unique-api-key'

Note: In practice the host domain would point to Staging or Production since the sandbox environment does not use API keys.

Suspended state

If set an order will also be suspended automatically upon breaching the cancellation terms. On suspension a webhook and email / sms notifications will be sent. LayUp will not try to automatically collect on suspended orders. Setting suspend on cancel on an existing order (in javascript):

const orderId = "123orderId";
const apikey = "123apikey";
const inputBody = '{"suspendOnCancel": true}';
const headers = {'Content-Type':'application/json',   'Accept':'application/json',   'apikey': apikey};
fetch('https://sandbox-api.layup.co.za/v1/orders/'+orderId, {method: 'PUT',   body: inputBody,   headers: headers})

A LayUp order can be suspended by customer or merchant. An order can be unsuspended at any time, but will be suspended again if the cancellation terms are still breached. Typically either a payment or amendment should be made before unsuspending an order. If any payment is made towards an order in “good standing” or the payment puts the order in “good standing” the order will be unsuspended and unsuspended webhook / notifications will be sent.

Amortisation configuration

By default amortiseOnAmend is false and amortiseOnMissed is true, because LayUp orders allow customers to miss instalments and catch them up later through automatic amortisation. If a fixed instalment plan is required amortiseOnMissed needs to be set to false on the order. amortiseOnMissed false instructs the system to not amortise missed payments over the remaining period of the payment plan. For example with amortisedOnMissed true and false:

A customer has a payment plan of R100 per month for 3 months. The customer misses their second instalment. At the moment the payment is missed the system will be in this state:

Due Amount Paid Missed
28/01 R100.00 true false
28/02 R100.00 false true
28/03 R100.00 false false

Normally the 2nd instalment would be amortised to the 3rd instalment and the 3rd instalment will increase to R200. However, if amortiseOnMissed is set to false the state will remain as in the table above. To tie this example up with the other options, consider that the cancellation terms are now breached and suspendOnCancel is set, then this order will move to a suspended state until the customer makes a payment of R100.

Another aspect of the system a merchant user can configure is how payment plans are re-created after amendments. By default LayUp splits the total value over the number of instalments, but this can be controlled with the amortiseOnAmend option. Since amortisation divides the remainder of the plan into the remaining instalments it’s desired in some cases over an divide over all instalments. Continuing from the previous example:

Suppose that there is an order which is currently suspended because the customer missed one instalment. The total order value is R300 over 3 months and we are currently in the 2nd month of the plan. If the merchant and customer comes to an agreement that month 2 will be skipped and the payment plan resumed the merchant can amend the order by reducing the total order value to R200. However, if amortiseOnAmend is false the remaining R200 will be split over the 3 instalments and there will still be one missed instalment which will keep the order suspended and not in “good standing”.

Due Amount Paid Missed
28/01 R100.00 true false
28/02 R50.00 false true
28/03 R50.00 false false

If amortiseOnAmend is set then the remainder of the order will be divided only into future instalments.

Due Amount Paid Missed
28/01 R100.00 true false
28/02 R0.00 false false
28/03 R100.00 false false

This also has an interaction with the cancellation terms, when the order is amended in this way with amortiseOnAmend true, the number of missed instalments will be 0 and the order will always be in "good standing".

Some bash examples, take notice of variables such us merchantApiKey and orderId. One of the example also use a tool called jq, which is just a simple json parser.

orderResponse=$(curl 'https://sandbox-api.layup.co.za/v1/orders' -X POST -H 'Content-Type: application/json;charset=utf-8' -H "apikey: $merchantApiKey" \
--data-binary @- << EOF
{
   "endDateMax":"2022-09-28",
   "endDateMin":"2022-07-26",
   "products":[{"amount":30000,"sku":"sku-5555","name":"amortiseOnAmend"}],
   "state":"PARTIAL",
   "depositType":"FLAT",
   "depositAmount":10000,
   "name":"amortiseOnAmend",
   "reference":"amortiseOnAmend reference",
   "amortiseOnAmend": true,
   "amortiseOnMissed": false,
   "suspendOnCancel": true
}
EOF
)
orderId=$(echo $orderResponse | jq -r ._id)

Send customer to payment widget https://sandbox.layup.co.za/order/$orderId

echo "https://sandbox.layup.co.za/order/$orderId"

To increase the order period and instalemnts amend date and products. The payment plan will be extended by 1 month for each month the order end date is extended. End dates cannot be set less than the current end date.

curl "https://sandbox-api.layup.co.za/v1/orders/$orderId" -X PUT -H 'Content-Type: application/json;charset=utf-8' -H "apikey: $merchantApiKey" \
--data-binary @- << EOF
{
   "endDateMax":"2022-11-30",
   "products":[{"amount":40000,"sku":"sku-5555","name":"amortiseOnAmend"}]
}
EOF

The instalment amount can be increased without adding extra instalments. For example 10% increase.

curl "https://sandbox-api.layup.co.za/v1/orders/$orderId" -X PUT -H 'Content-Type: application/json;charset=utf-8' -H "apikey: $merchantApiKey" \
--data-binary @- << EOF
{
   "products":[{"amount":43000,"sku":"sku-5555","name":"amortiseOnAmend"}]
}
EOF

When order is suspended due to a breach of terms, merchant user can un-suspend by moving the order to a "PLACED" state, or cancel by moving to "CANCELLED" state.

curl "https://sandbox-api.layup.co.za/v1/orders/$orderId" -X PUT -H 'Content-Type: application/json;charset=utf-8' -H "apikey: $merchantApiKey" \
--data-binary '{"state":"PLACED"}'
curl "https://sandbox-api.layup.co.za/v1/orders/$orderId" -X PUT -H 'Content-Type: application/json;charset=utf-8' -H "apikey: $merchantApiKey" \
--data-binary '{"state":"CANCELLED"}'

If the order is suspended for a month and the instalment for that month needs to be skipped. Simply reduce the order value. Due to the amortise on amend option the unpaid amount will be distributed to future instalemnts only.

curl "https://sandbox-api.layup.co.za/v1/orders/$orderId" -X PUT -H 'Content-Type: application/json;charset=utf-8' -H "apikey: $merchantApiKey" \
--data-binary @- << EOF
{
   "products":[{"amount":30000,"sku":"sku-5555","name":"amortiseOnAmend"}]
}
EOF

Base URLs:

Authentication

AuthService

AuthService_Login

Code samples

# You can also use wget
curl -X POST https://sandbox-api.layup.co.za/v1/auth/login \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

POST https://sandbox-api.layup.co.za/v1/auth/login HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "password": "pa$$word",
  "username": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/auth/login',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.post('https://sandbox-api.layup.co.za/v1/auth/login', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.post 'https://sandbox-api.layup.co.za/v1/auth/login',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox-api.layup.co.za/v1/auth/login", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v1/auth/login

Authenticate your user

Body parameter

{
  "password": "pa$$word",
  "username": "string"
}

Parameters

Name In Type Required Description
body body modelLoginRequest true none

Example responses

200 Response

{
  "Id": "string",
  "active": true,
  "address": "string",
  "bankDetails": {
    "account": {
      "value": "string",
      "verified": true
    },
    "accountType": {
      "value": "string",
      "verified": true
    },
    "bankName": {
      "value": "string",
      "verified": true
    },
    "branchCode": {
      "value": "string",
      "verified": true
    },
    "cellNumber": {
      "value": "string",
      "verified": true
    },
    "clientName": {
      "value": "string",
      "verified": true
    },
    "email": {
      "value": "string",
      "verified": true
    },
    "idNumber": {
      "value": "string",
      "verified": true
    },
    "initials": {
      "value": "string",
      "verified": true
    },
    "verified": true
  },
  "bankValidationPendingReference": "string",
  "cellNumber": "string",
  "city": "string",
  "country": "string",
  "dateOfBirth": "string",
  "email": "[email protected]",
  "hasPassword": true,
  "idNumber": "string",
  "merchantId": "string",
  "merchantOnboarding": {
    "name": "string",
    "physicalAddress": {
      "city": "string",
      "country": "string",
      "postalCode": "string",
      "province": "string",
      "streetAddress": "string"
    }
  },
  "merchantRole": "string",
  "name": "string",
  "oneTimePass": "string",
  "postalCode": "string",
  "province": "string",
  "role": "CLIENT",
  "timestamp": 0,
  "username": "string",
  "verified": true,
  "verifiedEmail": true,
  "verifiedMobile": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelUserResponse
204 No Content Successfully processed the request, no content. None
403 Forbidden Returned when the user does not have permission to access the resource. None
404 Not Found Returned when the resource does not exist. None

MerchantService

MerchantService_Get

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/merchants/{Id} \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/merchants/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/merchants/{Id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/merchants/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/merchants/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/merchants/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/merchants/{Id}

Retrieve your merchant Object.

You will only be able to retrieve your own Merchant Object.

Parameters

Name In Type Required Description
Id path string true none

Example responses

200 Response

{
  "Id": "string",
  "absorbsFee": true,
  "accountType": "string",
  "active": true,
  "adminPercFee": 0,
  "amendmentOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "autoSettlement": true,
  "bankDetails": {
    "accountNumber": "string",
    "accountType": "string",
    "bankName": "string",
    "branchCode": "string",
    "verified": true
  },
  "bankDetailsValidation": {
    "account": {
      "value": "string",
      "verified": true
    },
    "accountType": {
      "value": "string",
      "verified": true
    },
    "bankName": {
      "value": "string",
      "verified": true
    },
    "branchCode": {
      "value": "string",
      "verified": true
    },
    "cellNumber": {
      "value": "string",
      "verified": true
    },
    "clientName": {
      "value": "string",
      "verified": true
    },
    "email": {
      "value": "string",
      "verified": true
    },
    "idNumber": {
      "value": "string",
      "verified": true
    },
    "initials": {
      "value": "string",
      "verified": true
    },
    "verified": true
  },
  "bankValidationPendingReference": "string",
  "billingAddress": {
    "city": "string",
    "country": "string",
    "postalCode": "string",
    "province": "string",
    "streetAddress": "string"
  },
  "cancellationRequest": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "completedOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "completedOrder75": {
    "emails": [
      "string"
    ],
    "enabled": true,
    "value": 0
  },
  "contractDocumentId": "string",
  "contractUpdated": true,
  "contractUrl": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "domain": "string",
  "expire": 0,
  "expiredOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "failedPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "features": {
    "enableAutoCancellation": true,
    "enableCreditCard": true,
    "enableCustomEmailLogo": true,
    "enableCustomWidgetLogo": true,
    "enableDebiCheck": true,
    "enableDefaultPaymentPlanImage": true,
    "enableInstantEFT": true,
    "enableManualCancellation": true
  },
  "flatFee": 0,
  "imageUrl": "string",
  "invoices": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "merchantBankingPercFee": 0,
  "merchantContractSigned": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "missedPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "name": "string",
  "newOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "notifyUrl": "string",
  "onboardingState": "string",
  "paymentNotifyUrl": "string",
  "paymentPlans": {
    "debiCheckMinimum": {
      "enabled": true,
      "value": 0
    },
    "defaultDepositType": {
      "depositType": "string",
      "enabled": true,
      "flat": 0,
      "percentage": 0
    },
    "editPaymentPlanSettings": true,
    "maxMonths": {
      "enabled": true,
      "value": 0
    },
    "minMonths": {
      "enabled": true,
      "value": 0
    },
    "orderExpiry": {
      "enabled": true,
      "value": 0
    },
    "paymentMethods": {
      "creditOrDebitCard": true,
      "debiCheck": true,
      "eft": true
    },
    "splitPayments": true,
    "weeklyPayments": true
  },
  "percFee": 0,
  "refunds": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "registeredEntity": "string",
  "settlementDay": 0,
  "settlementFrequency": "string",
  "settlementType": "string",
  "settlements": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "successfulPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "supportEmail": "string",
  "supportMobile": "string",
  "timestamp": 0,
  "transfers": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "users": [
    {
      "Id": "string",
      "active": true,
      "address": "string",
      "cellNumber": "string",
      "city": "string",
      "country": "string",
      "dateOfBirth": "string",
      "email": "[email protected]",
      "idNumber": "string",
      "merchantId": "string",
      "merchantRole": "string",
      "name": "string",
      "postalCode": "string",
      "province": "string",
      "role": "CLIENT",
      "username": "string",
      "verified": true,
      "verifiedEmail": true,
      "verifiedMobile": true
    }
  ],
  "vatNo": "string",
  "weeklyPayments": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelMerchantResponse

MerchantService_Update

Code samples

# You can also use wget
curl -X PUT https://sandbox-api.layup.co.za/v1/merchants/{Id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

PUT https://sandbox-api.layup.co.za/v1/merchants/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "domain": "string",
  "name": "string",
  "notifyUrl": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/merchants/{Id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.put('https://sandbox-api.layup.co.za/v1/merchants/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.put 'https://sandbox-api.layup.co.za/v1/merchants/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://sandbox-api.layup.co.za/v1/merchants/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v1/merchants/{Id}

Update your merchant Object.

You will only be able to update your own merchant Object. The layup api will post to the notificationUrl when an Order State has changed or when an Order was amended. See the WebHookPayload model for more information

Body parameter

{
  "domain": "string",
  "name": "string",
  "notifyUrl": "string"
}

Parameters

Name In Type Required Description
Id path string true none
webhook.type query string false none
webhook.body.orderId query string false none
webhook.body.orderRef query string false none
webhook.body.paymentId query string false none
body body publicModelMerchantRequest true none

Example responses

200 Response

{
  "Id": "string",
  "absorbsFee": true,
  "accountType": "string",
  "active": true,
  "adminPercFee": 0,
  "amendmentOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "autoSettlement": true,
  "bankDetails": {
    "accountNumber": "string",
    "accountType": "string",
    "bankName": "string",
    "branchCode": "string",
    "verified": true
  },
  "bankDetailsValidation": {
    "account": {
      "value": "string",
      "verified": true
    },
    "accountType": {
      "value": "string",
      "verified": true
    },
    "bankName": {
      "value": "string",
      "verified": true
    },
    "branchCode": {
      "value": "string",
      "verified": true
    },
    "cellNumber": {
      "value": "string",
      "verified": true
    },
    "clientName": {
      "value": "string",
      "verified": true
    },
    "email": {
      "value": "string",
      "verified": true
    },
    "idNumber": {
      "value": "string",
      "verified": true
    },
    "initials": {
      "value": "string",
      "verified": true
    },
    "verified": true
  },
  "bankValidationPendingReference": "string",
  "billingAddress": {
    "city": "string",
    "country": "string",
    "postalCode": "string",
    "province": "string",
    "streetAddress": "string"
  },
  "cancellationRequest": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "completedOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "completedOrder75": {
    "emails": [
      "string"
    ],
    "enabled": true,
    "value": 0
  },
  "contractDocumentId": "string",
  "contractUpdated": true,
  "contractUrl": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "domain": "string",
  "expire": 0,
  "expiredOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "failedPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "features": {
    "enableAutoCancellation": true,
    "enableCreditCard": true,
    "enableCustomEmailLogo": true,
    "enableCustomWidgetLogo": true,
    "enableDebiCheck": true,
    "enableDefaultPaymentPlanImage": true,
    "enableInstantEFT": true,
    "enableManualCancellation": true
  },
  "flatFee": 0,
  "imageUrl": "string",
  "invoices": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "merchantBankingPercFee": 0,
  "merchantContractSigned": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "missedPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "name": "string",
  "newOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "notifyUrl": "string",
  "onboardingState": "string",
  "paymentNotifyUrl": "string",
  "paymentPlans": {
    "debiCheckMinimum": {
      "enabled": true,
      "value": 0
    },
    "defaultDepositType": {
      "depositType": "string",
      "enabled": true,
      "flat": 0,
      "percentage": 0
    },
    "editPaymentPlanSettings": true,
    "maxMonths": {
      "enabled": true,
      "value": 0
    },
    "minMonths": {
      "enabled": true,
      "value": 0
    },
    "orderExpiry": {
      "enabled": true,
      "value": 0
    },
    "paymentMethods": {
      "creditOrDebitCard": true,
      "debiCheck": true,
      "eft": true
    },
    "splitPayments": true,
    "weeklyPayments": true
  },
  "percFee": 0,
  "refunds": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "registeredEntity": "string",
  "settlementDay": 0,
  "settlementFrequency": "string",
  "settlementType": "string",
  "settlements": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "successfulPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "supportEmail": "string",
  "supportMobile": "string",
  "timestamp": 0,
  "transfers": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "users": [
    {
      "Id": "string",
      "active": true,
      "address": "string",
      "cellNumber": "string",
      "city": "string",
      "country": "string",
      "dateOfBirth": "string",
      "email": "[email protected]",
      "idNumber": "string",
      "merchantId": "string",
      "merchantRole": "string",
      "name": "string",
      "postalCode": "string",
      "province": "string",
      "role": "CLIENT",
      "username": "string",
      "verified": true,
      "verifiedEmail": true,
      "verifiedMobile": true
    }
  ],
  "vatNo": "string",
  "weeklyPayments": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelMerchantResponse

OrderService

OrderService_GetMany

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/orders \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/orders HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/orders', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/orders

Retrieve all your Orders


Note: All currency values are stored in cents.

Parameters

Name In Type Required Description
populate query array[string] false none
limit query integer(int32) false none
skip query integer(int32) false none
userId query string false none
state query string false none
from query string(date) false none
to query string(date) false none
select query string false none
populateObject.path query string false none
populateObject.select query string false none
populateObject.populate.path query string false none
populateObject.populate.select query string false none
search query string false none
reference query string false none
sort query string false none
stateUpdatedAt query string false none
cloneOriginalId query string false none
groupPaymentPlan query string false none

Example responses

200 Response

{
  "orders": [
    {
      "Id": "string",
      "absorbsFee": true,
      "acceptedProposedCancellationTerms": true,
      "amountDue": 0,
      "cancellationTerms": {
        "active": true,
        "definition": [
          {
            "end": 0,
            "gracePeriod": 0,
            "policy": {
              "definition": {
                "deposit": true,
                "flatFee": 0,
                "percentage": 0
              },
              "name": "Deposit"
            },
            "start": 0,
            "type": {
              "definition": {
                "missed": 0,
                "percentage": 0
              },
              "name": "string"
            }
          }
        ]
      },
      "cancelledBy": "string",
      "cloneCount": 0,
      "cloneExpiry": 0,
      "createdAt": "string",
      "customFeatures": {
        "imageUrl": {
          "enabled": true,
          "value": "string"
        },
        "logo": {
          "enabled": true,
          "value": "string"
        },
        "paymentWidget": {
          "enabled": true,
          "value": "string"
        }
      },
      "debiCheckMinimum": {
        "enabled": true,
        "value": 0
      },
      "depositAmount": 0,
      "depositPerc": 0,
      "depositType": "INSTALMENT",
      "enablesSplit": true,
      "endDateMax": "2019-08-24T14:15:22Z",
      "endDateMin": "2019-08-24T14:15:22Z",
      "expire": "string",
      "flatFee": 0,
      "groupPaymentPlan": {
        "cloneLimit": 0,
        "enabled": true,
        "expiry": 0
      },
      "imageUrl": "string",
      "initiatorId": "string",
      "merchantLink": "string",
      "merchantName": "string",
      "merchantTermsLink": "string",
      "name": "string",
      "notifications": [
        {
          "change": "string",
          "date": "string",
          "details": "string",
          "name": "string",
          "read": true,
          "reason": "string",
          "userId": "string"
        }
      ],
      "orderCancellationRequest": "string",
      "paymentMethods": {
        "creditOrDebitCard": true,
        "debiCheck": true,
        "eft": true
      },
      "percFee": 0,
      "plans": [
        {
          "Id": "string",
          "amountDue": 0,
          "amountDueExcludingFee": 0,
          "automaticBilling": true,
          "benefactor": {
            "Id": "string",
            "email": "string",
            "name": "string"
          },
          "benefactorId": "string",
          "completed": true,
          "debicheckLastFailedReasons": [
            "string"
          ],
          "debicheckStatus": "string",
          "depositDue": 0,
          "depositDueExcludingFee": 0,
          "frequency": "WEEKLY",
          "offset": 0,
          "order": {},
          "orderId": "string",
          "payments": [
            {
              "Id": "string",
              "amount": 0,
              "amountExcludingFee": 0,
              "due": "string",
              "failed": true,
              "fee": 0,
              "paid": true,
              "paymentMethod": "string",
              "paymentType": "string",
              "pending": true,
              "reconciliated": true,
              "timestamp": 0
            }
          ],
          "quantity": 0,
          "timestamp": 0
        }
      ],
      "previewFee": "string",
      "products": [
        {
          "Id": "string",
          "amount": 0,
          "depositType": "string",
          "link": "http://example.com",
          "name": "string",
          "sku": "string"
        }
      ],
      "reference": "string",
      "state": "PARTIAL",
      "stateUpdatedAt": "string",
      "supplier": {
        "Id": "string",
        "email": "string",
        "name": "string"
      },
      "supplierId": "string",
      "timestamp": 0,
      "updatedAt": "string",
      "weeklyPayments": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelOrderResponseMany

OrderService_Create

Code samples

# You can also use wget
curl -X POST https://sandbox-api.layup.co.za/v1/orders \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

POST https://sandbox-api.layup.co.za/v1/orders HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "amount": 10,
  "depositPerc": 5,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "name": "string",
  "products": "ProductCreateRequest",
  "reference": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/orders',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.post('https://sandbox-api.layup.co.za/v1/orders', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.post 'https://sandbox-api.layup.co.za/v1/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox-api.layup.co.za/v1/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v1/orders

Create an Order Request

An Order describes the parameters wherein the Payment Plan can operate.
Orders with a 'PARTIAL' state (deposit outstanding) will expire after expire minutes.
expire, paymentMethods, cancellationTerms are optional if you want to overwrite the default values from the merchant account settings. 'endDateMin' and 'endDateMax' should be ISO Dates when sent to the API. e.g.: '2019-02-18T01:02:56.277Z'
Note: All currency values are stored in cents.

Body parameter

{
  "amount": 10,
  "depositPerc": 5,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "name": "string",
  "products": "ProductCreateRequest",
  "reference": "string"
}

Parameters

Name In Type Required Description
clone query string false none
body body modelOrderRequest true none

Example responses

200 Response

{
  "Id": "string",
  "absorbsFee": true,
  "acceptedProposedCancellationTerms": true,
  "amountDue": 0,
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledBy": "string",
  "cloneCount": 0,
  "cloneExpiry": 0,
  "createdAt": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "enablesSplit": true,
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "expire": "string",
  "flatFee": 0,
  "groupPaymentPlan": {
    "cloneLimit": 0,
    "enabled": true,
    "expiry": 0
  },
  "imageUrl": "string",
  "initiatorId": "string",
  "merchantLink": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "name": "string",
  "notifications": [
    {
      "change": "string",
      "date": "string",
      "details": "string",
      "name": "string",
      "read": true,
      "reason": "string",
      "userId": "string"
    }
  ],
  "orderCancellationRequest": "string",
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "percFee": 0,
  "plans": [
    {
      "Id": "string",
      "amountDue": 0,
      "amountDueExcludingFee": 0,
      "automaticBilling": true,
      "benefactor": {
        "Id": "string",
        "email": "string",
        "name": "string"
      },
      "benefactorId": "string",
      "completed": true,
      "debicheckLastFailedReasons": [
        "string"
      ],
      "debicheckStatus": "string",
      "depositDue": 0,
      "depositDueExcludingFee": 0,
      "frequency": "WEEKLY",
      "offset": 0,
      "order": {
        "Id": "string",
        "absorbsFee": true,
        "acceptedProposedCancellationTerms": true,
        "amountDue": 0,
        "cancellationTerms": {
          "active": true,
          "definition": [
            {
              "end": 0,
              "gracePeriod": 0,
              "policy": {
                "definition": {
                  "deposit": true,
                  "flatFee": 0,
                  "percentage": 0
                },
                "name": "Deposit"
              },
              "start": 0,
              "type": {
                "definition": {
                  "missed": 0,
                  "percentage": 0
                },
                "name": "string"
              }
            }
          ]
        },
        "cancelledBy": "string",
        "cloneCount": 0,
        "cloneExpiry": 0,
        "createdAt": "string",
        "customFeatures": {
          "imageUrl": {
            "enabled": true,
            "value": "string"
          },
          "logo": {
            "enabled": true,
            "value": "string"
          },
          "paymentWidget": {
            "enabled": true,
            "value": "string"
          }
        },
        "debiCheckMinimum": {
          "enabled": true,
          "value": 0
        },
        "depositAmount": 0,
        "depositPerc": 0,
        "depositType": "INSTALMENT",
        "enablesSplit": true,
        "endDateMax": "2019-08-24T14:15:22Z",
        "endDateMin": "2019-08-24T14:15:22Z",
        "expire": "string",
        "flatFee": 0,
        "groupPaymentPlan": {
          "cloneLimit": 0,
          "enabled": true,
          "expiry": 0
        },
        "imageUrl": "string",
        "initiatorId": "string",
        "merchantLink": "string",
        "merchantName": "string",
        "merchantTermsLink": "string",
        "name": "string",
        "notifications": [
          {
            "change": "string",
            "date": "string",
            "details": "string",
            "name": "string",
            "read": true,
            "reason": "string",
            "userId": "string"
          }
        ],
        "orderCancellationRequest": "string",
        "paymentMethods": {
          "creditOrDebitCard": true,
          "debiCheck": true,
          "eft": true
        },
        "percFee": 0,
        "plans": [],
        "previewFee": "string",
        "products": [
          {
            "Id": "string",
            "amount": 0,
            "depositType": "string",
            "link": "http://example.com",
            "name": "string",
            "sku": "string"
          }
        ],
        "reference": "string",
        "state": "PARTIAL",
        "stateUpdatedAt": "string",
        "supplier": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "supplierId": "string",
        "timestamp": 0,
        "updatedAt": "string",
        "weeklyPayments": true
      },
      "orderId": "string",
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "paid": true,
          "paymentMethod": "string",
          "paymentType": "string",
          "pending": true,
          "reconciliated": true,
          "timestamp": 0
        }
      ],
      "quantity": 0,
      "timestamp": 0
    }
  ],
  "previewFee": "string",
  "products": [
    {
      "Id": "string",
      "amount": 0,
      "depositType": "string",
      "link": "http://example.com",
      "name": "string",
      "sku": "string"
    }
  ],
  "reference": "string",
  "state": "PARTIAL",
  "stateUpdatedAt": "string",
  "supplier": {
    "Id": "string",
    "email": "string",
    "name": "string"
  },
  "supplierId": "string",
  "timestamp": 0,
  "updatedAt": "string",
  "weeklyPayments": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelOrderResponse
400 Bad Request Bad Request:
'depositPerc' is required to create an Order;
'depositPerc' should be of type 'Number' to create an Order;
'products' are required to create an Order;
'endDateMax' is required to create an Order;
'endDateMax' must be of valid DATE format to create an Order;
'reference' is required to create an Order;
'name' is required to create an Order
None

OrderService_SendOrderRequest

Code samples

# You can also use wget
curl -X POST https://sandbox-api.layup.co.za/v1/orders-send-request \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

POST https://sandbox-api.layup.co.za/v1/orders-send-request HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "contact": "[email protected]",
  "message": "string",
  "orderId": "123f7f1496bd78001d6852f3",
  "orderUrl": "https://shopper.layup.co.za/order/123f7f1496bd78001d6852f3",
  "type": "email"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/orders-send-request',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.post('https://sandbox-api.layup.co.za/v1/orders-send-request', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.post 'https://sandbox-api.layup.co.za/v1/orders-send-request',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox-api.layup.co.za/v1/orders-send-request", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v1/orders-send-request

Sends Order to client via Email OR SMS

Note: 'contact' should be valid Email address || cellphone number. Note: 'contact' via number must be in E.164 format. Note: 'orderUrl' is optional and should generally not be included as the API uses the 'orderId' to generate a URL for you. Note: 'message' is only used for the sms 'type'.

Body parameter

{
  "contact": "[email protected]",
  "message": "string",
  "orderId": "123f7f1496bd78001d6852f3",
  "orderUrl": "https://shopper.layup.co.za/order/123f7f1496bd78001d6852f3",
  "type": "email"
}

Parameters

Name In Type Required Description
body body modelOrderSendRequest true none

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelOrderSendRequestResponse
400 Bad Request Bad Request:
If type = 'sms' Message length 120 exceeded
None

OrderService_Get

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/orders/{Id} \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/orders/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/orders/{Id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/orders/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/orders/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/orders/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/orders/{Id}

Retrieve an Order


Note: All currency values are stored in cents.

Parameters

Name In Type Required Description
Id path string true none
populate query array[string] false none

Example responses

200 Response

{
  "Id": "string",
  "absorbsFee": true,
  "acceptedProposedCancellationTerms": true,
  "amountDue": 0,
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledBy": "string",
  "cloneCount": 0,
  "cloneExpiry": 0,
  "createdAt": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "enablesSplit": true,
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "expire": "string",
  "flatFee": 0,
  "groupPaymentPlan": {
    "cloneLimit": 0,
    "enabled": true,
    "expiry": 0
  },
  "imageUrl": "string",
  "initiatorId": "string",
  "merchantLink": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "name": "string",
  "notifications": [
    {
      "change": "string",
      "date": "string",
      "details": "string",
      "name": "string",
      "read": true,
      "reason": "string",
      "userId": "string"
    }
  ],
  "orderCancellationRequest": "string",
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "percFee": 0,
  "plans": [
    {
      "Id": "string",
      "amountDue": 0,
      "amountDueExcludingFee": 0,
      "automaticBilling": true,
      "benefactor": {
        "Id": "string",
        "email": "string",
        "name": "string"
      },
      "benefactorId": "string",
      "completed": true,
      "debicheckLastFailedReasons": [
        "string"
      ],
      "debicheckStatus": "string",
      "depositDue": 0,
      "depositDueExcludingFee": 0,
      "frequency": "WEEKLY",
      "offset": 0,
      "order": {
        "Id": "string",
        "absorbsFee": true,
        "acceptedProposedCancellationTerms": true,
        "amountDue": 0,
        "cancellationTerms": {
          "active": true,
          "definition": [
            {
              "end": 0,
              "gracePeriod": 0,
              "policy": {
                "definition": {
                  "deposit": true,
                  "flatFee": 0,
                  "percentage": 0
                },
                "name": "Deposit"
              },
              "start": 0,
              "type": {
                "definition": {
                  "missed": 0,
                  "percentage": 0
                },
                "name": "string"
              }
            }
          ]
        },
        "cancelledBy": "string",
        "cloneCount": 0,
        "cloneExpiry": 0,
        "createdAt": "string",
        "customFeatures": {
          "imageUrl": {
            "enabled": true,
            "value": "string"
          },
          "logo": {
            "enabled": true,
            "value": "string"
          },
          "paymentWidget": {
            "enabled": true,
            "value": "string"
          }
        },
        "debiCheckMinimum": {
          "enabled": true,
          "value": 0
        },
        "depositAmount": 0,
        "depositPerc": 0,
        "depositType": "INSTALMENT",
        "enablesSplit": true,
        "endDateMax": "2019-08-24T14:15:22Z",
        "endDateMin": "2019-08-24T14:15:22Z",
        "expire": "string",
        "flatFee": 0,
        "groupPaymentPlan": {
          "cloneLimit": 0,
          "enabled": true,
          "expiry": 0
        },
        "imageUrl": "string",
        "initiatorId": "string",
        "merchantLink": "string",
        "merchantName": "string",
        "merchantTermsLink": "string",
        "name": "string",
        "notifications": [
          {
            "change": "string",
            "date": "string",
            "details": "string",
            "name": "string",
            "read": true,
            "reason": "string",
            "userId": "string"
          }
        ],
        "orderCancellationRequest": "string",
        "paymentMethods": {
          "creditOrDebitCard": true,
          "debiCheck": true,
          "eft": true
        },
        "percFee": 0,
        "plans": [],
        "previewFee": "string",
        "products": [
          {
            "Id": "string",
            "amount": 0,
            "depositType": "string",
            "link": "http://example.com",
            "name": "string",
            "sku": "string"
          }
        ],
        "reference": "string",
        "state": "PARTIAL",
        "stateUpdatedAt": "string",
        "supplier": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "supplierId": "string",
        "timestamp": 0,
        "updatedAt": "string",
        "weeklyPayments": true
      },
      "orderId": "string",
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "paid": true,
          "paymentMethod": "string",
          "paymentType": "string",
          "pending": true,
          "reconciliated": true,
          "timestamp": 0
        }
      ],
      "quantity": 0,
      "timestamp": 0
    }
  ],
  "previewFee": "string",
  "products": [
    {
      "Id": "string",
      "amount": 0,
      "depositType": "string",
      "link": "http://example.com",
      "name": "string",
      "sku": "string"
    }
  ],
  "reference": "string",
  "state": "PARTIAL",
  "stateUpdatedAt": "string",
  "supplier": {
    "Id": "string",
    "email": "string",
    "name": "string"
  },
  "supplierId": "string",
  "timestamp": 0,
  "updatedAt": "string",
  "weeklyPayments": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelOrderResponse

OrderService_Update

Code samples

# You can also use wget
curl -X PUT https://sandbox-api.layup.co.za/v1/orders/{Id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

PUT https://sandbox-api.layup.co.za/v1/orders/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "amount": 10,
  "depositPerc": 5,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "name": "string",
  "products": "ProductCreateRequest",
  "reference": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/orders/{Id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.put('https://sandbox-api.layup.co.za/v1/orders/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.put 'https://sandbox-api.layup.co.za/v1/orders/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://sandbox-api.layup.co.za/v1/orders/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v1/orders/{Id}

Update your Order


Note: All currency values are stored in cents.

Body parameter

{
  "amount": 10,
  "depositPerc": 5,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "name": "string",
  "products": "ProductCreateRequest",
  "reference": "string"
}

Parameters

Name In Type Required Description
Id path string true none
clone query string false none
body body modelOrderRequest true none

Example responses

200 Response

{
  "Id": "string",
  "absorbsFee": true,
  "acceptedProposedCancellationTerms": true,
  "amountDue": 0,
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledBy": "string",
  "cloneCount": 0,
  "cloneExpiry": 0,
  "createdAt": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "enablesSplit": true,
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "expire": "string",
  "flatFee": 0,
  "groupPaymentPlan": {
    "cloneLimit": 0,
    "enabled": true,
    "expiry": 0
  },
  "imageUrl": "string",
  "initiatorId": "string",
  "merchantLink": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "name": "string",
  "notifications": [
    {
      "change": "string",
      "date": "string",
      "details": "string",
      "name": "string",
      "read": true,
      "reason": "string",
      "userId": "string"
    }
  ],
  "orderCancellationRequest": "string",
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "percFee": 0,
  "plans": [
    {
      "Id": "string",
      "amountDue": 0,
      "amountDueExcludingFee": 0,
      "automaticBilling": true,
      "benefactor": {
        "Id": "string",
        "email": "string",
        "name": "string"
      },
      "benefactorId": "string",
      "completed": true,
      "debicheckLastFailedReasons": [
        "string"
      ],
      "debicheckStatus": "string",
      "depositDue": 0,
      "depositDueExcludingFee": 0,
      "frequency": "WEEKLY",
      "offset": 0,
      "order": {
        "Id": "string",
        "absorbsFee": true,
        "acceptedProposedCancellationTerms": true,
        "amountDue": 0,
        "cancellationTerms": {
          "active": true,
          "definition": [
            {
              "end": 0,
              "gracePeriod": 0,
              "policy": {
                "definition": {
                  "deposit": true,
                  "flatFee": 0,
                  "percentage": 0
                },
                "name": "Deposit"
              },
              "start": 0,
              "type": {
                "definition": {
                  "missed": 0,
                  "percentage": 0
                },
                "name": "string"
              }
            }
          ]
        },
        "cancelledBy": "string",
        "cloneCount": 0,
        "cloneExpiry": 0,
        "createdAt": "string",
        "customFeatures": {
          "imageUrl": {
            "enabled": true,
            "value": "string"
          },
          "logo": {
            "enabled": true,
            "value": "string"
          },
          "paymentWidget": {
            "enabled": true,
            "value": "string"
          }
        },
        "debiCheckMinimum": {
          "enabled": true,
          "value": 0
        },
        "depositAmount": 0,
        "depositPerc": 0,
        "depositType": "INSTALMENT",
        "enablesSplit": true,
        "endDateMax": "2019-08-24T14:15:22Z",
        "endDateMin": "2019-08-24T14:15:22Z",
        "expire": "string",
        "flatFee": 0,
        "groupPaymentPlan": {
          "cloneLimit": 0,
          "enabled": true,
          "expiry": 0
        },
        "imageUrl": "string",
        "initiatorId": "string",
        "merchantLink": "string",
        "merchantName": "string",
        "merchantTermsLink": "string",
        "name": "string",
        "notifications": [
          {
            "change": "string",
            "date": "string",
            "details": "string",
            "name": "string",
            "read": true,
            "reason": "string",
            "userId": "string"
          }
        ],
        "orderCancellationRequest": "string",
        "paymentMethods": {
          "creditOrDebitCard": true,
          "debiCheck": true,
          "eft": true
        },
        "percFee": 0,
        "plans": [],
        "previewFee": "string",
        "products": [
          {
            "Id": "string",
            "amount": 0,
            "depositType": "string",
            "link": "http://example.com",
            "name": "string",
            "sku": "string"
          }
        ],
        "reference": "string",
        "state": "PARTIAL",
        "stateUpdatedAt": "string",
        "supplier": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "supplierId": "string",
        "timestamp": 0,
        "updatedAt": "string",
        "weeklyPayments": true
      },
      "orderId": "string",
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "paid": true,
          "paymentMethod": "string",
          "paymentType": "string",
          "pending": true,
          "reconciliated": true,
          "timestamp": 0
        }
      ],
      "quantity": 0,
      "timestamp": 0
    }
  ],
  "previewFee": "string",
  "products": [
    {
      "Id": "string",
      "amount": 0,
      "depositType": "string",
      "link": "http://example.com",
      "name": "string",
      "sku": "string"
    }
  ],
  "reference": "string",
  "state": "PARTIAL",
  "stateUpdatedAt": "string",
  "supplier": {
    "Id": "string",
    "email": "string",
    "name": "string"
  },
  "supplierId": "string",
  "timestamp": 0,
  "updatedAt": "string",
  "weeklyPayments": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelOrderResponse

OrderService_StatementRequest

Code samples

# You can also use wget
curl -X POST https://sandbox-api.layup.co.za/v1/statement \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

POST https://sandbox-api.layup.co.za/v1/statement HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email": "string",
  "orderId": "string",
  "type": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/statement',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.post('https://sandbox-api.layup.co.za/v1/statement', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.post 'https://sandbox-api.layup.co.za/v1/statement',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox-api.layup.co.za/v1/statement", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v1/statement

Sends statement to client OR downloads statement

Note: 'email' should be valid Email address.

Body parameter

{
  "email": "string",
  "orderId": "string",
  "type": "string"
}

Parameters

Name In Type Required Description
body body modelStatementRequest true none

Example responses

200 Response

{
  "success": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelStatementRequestResponse
400 Bad Request Bad Request:
If type = 'email' email is invalid
None

UserService

UserService_GetMany

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/users \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/users HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/users', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/users',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/users

Retrieves all your users

Parameters

Name In Type Required Description
limit query integer(int32) false none
orderId query string false none

Example responses

200 Response

{
  "users": [
    {
      "Id": "string",
      "active": true,
      "address": "string",
      "bankDetails": {
        "account": {
          "value": "string",
          "verified": true
        },
        "accountType": {
          "value": "string",
          "verified": true
        },
        "bankName": {
          "value": "string",
          "verified": true
        },
        "branchCode": {
          "value": "string",
          "verified": true
        },
        "cellNumber": {
          "value": "string",
          "verified": true
        },
        "clientName": {
          "value": "string",
          "verified": true
        },
        "email": {
          "value": "string",
          "verified": true
        },
        "idNumber": {
          "value": "string",
          "verified": true
        },
        "initials": {
          "value": "string",
          "verified": true
        },
        "verified": true
      },
      "bankValidationPendingReference": "string",
      "cellNumber": "string",
      "city": "string",
      "country": "string",
      "dateOfBirth": "string",
      "email": "[email protected]",
      "hasPassword": true,
      "idNumber": "string",
      "merchantId": "string",
      "merchantOnboarding": {
        "name": "string",
        "physicalAddress": {
          "city": "string",
          "country": "string",
          "postalCode": "string",
          "province": "string",
          "streetAddress": "string"
        }
      },
      "merchantRole": "string",
      "name": "string",
      "oneTimePass": "string",
      "postalCode": "string",
      "province": "string",
      "role": "CLIENT",
      "timestamp": 0,
      "username": "string",
      "verified": true,
      "verifiedEmail": true,
      "verifiedMobile": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelUserResponseMany

UserService_Get

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/users/{Id} \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/users/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/users/{Id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/users/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/users/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/users/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/users/{Id}

Retrieve your user Object.

You will only be able to retrieve your own User Object.

Parameters

Name In Type Required Description
Id path string true none

Example responses

200 Response

{
  "Id": "string",
  "active": true,
  "address": "string",
  "bankDetails": {
    "account": {
      "value": "string",
      "verified": true
    },
    "accountType": {
      "value": "string",
      "verified": true
    },
    "bankName": {
      "value": "string",
      "verified": true
    },
    "branchCode": {
      "value": "string",
      "verified": true
    },
    "cellNumber": {
      "value": "string",
      "verified": true
    },
    "clientName": {
      "value": "string",
      "verified": true
    },
    "email": {
      "value": "string",
      "verified": true
    },
    "idNumber": {
      "value": "string",
      "verified": true
    },
    "initials": {
      "value": "string",
      "verified": true
    },
    "verified": true
  },
  "bankValidationPendingReference": "string",
  "cellNumber": "string",
  "city": "string",
  "country": "string",
  "dateOfBirth": "string",
  "email": "[email protected]",
  "hasPassword": true,
  "idNumber": "string",
  "merchantId": "string",
  "merchantOnboarding": {
    "name": "string",
    "physicalAddress": {
      "city": "string",
      "country": "string",
      "postalCode": "string",
      "province": "string",
      "streetAddress": "string"
    }
  },
  "merchantRole": "string",
  "name": "string",
  "oneTimePass": "string",
  "postalCode": "string",
  "province": "string",
  "role": "CLIENT",
  "timestamp": 0,
  "username": "string",
  "verified": true,
  "verifiedEmail": true,
  "verifiedMobile": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelUserResponse

PaymentService

PaymentService_GetMany

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/payments \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/payments HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/payments', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/payments", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/payments

Retrieve all your Payments

This should give an Object Array of Payments

Parameters

Name In Type Required Description
skip query integer(int32) false none
limit query integer(int32) false none
paid query boolean false none
orderId query string false none
paymentPlanId query string false none
userId query string false none
fromDate query string(date) false none
toDate query string(date) false none
method query string false none
type query string false none
search query string false none
fromDatePayments query string false none
toDatePayments query string false none
settled query string false none
sort query array[string] false none
failed query boolean false none

Example responses

200 Response

{
  "payments": [
    {
      "Id": "string",
      "amount": 0,
      "amountExcludingFee": 0,
      "due": "string",
      "failed": true,
      "fee": 0,
      "locked": true,
      "note": "string",
      "orderStatus": "string",
      "paid": true,
      "paymentMethod": "string",
      "paymentPlanId": "string",
      "paymentType": "string",
      "pending": true,
      "reference": "string",
      "timestamp": 0,
      "userId": "string",
      "verifyError": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelPaymentResponseMany

PaymentService_Get

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/payments-verification/{Id} \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/payments-verification/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/payments-verification/{Id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/payments-verification/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/payments-verification/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/payments-verification/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/payments-verification/{Id}

Verifies a Payment

Parameters

Name In Type Required Description
Id path string true none
verify query string false none
force query string false none
msisdn query string false none
token query string false none

Example responses

200 Response

{
  "Id": "string",
  "amount": 0,
  "amountExcludingFee": 0,
  "due": "string",
  "failed": true,
  "fee": 0,
  "locked": true,
  "note": "string",
  "orderStatus": "string",
  "paid": true,
  "paymentMethod": "string",
  "paymentPlanId": "string",
  "paymentType": "string",
  "pending": true,
  "reference": "string",
  "timestamp": 0,
  "userId": "string",
  "verifyError": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelPaymentResponse

SettlementService

SettlementService_GetMany

Code samples

# You can also use wget
curl -X GET https://sandbox-api.layup.co.za/v1/settlements \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

GET https://sandbox-api.layup.co.za/v1/settlements HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/settlements',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.get('https://sandbox-api.layup.co.za/v1/settlements', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.get 'https://sandbox-api.layup.co.za/v1/settlements',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://sandbox-api.layup.co.za/v1/settlements", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1/settlements

Get all Settlements

Parameters

Name In Type Required Description
reference query string false none
fromDate query string(date) false none
toDate query string(date) false none
perPage query integer(int32) false none
page query integer(int32) false none
settled query boolean false none
search query string false none
group query string false none
sort query string false none

Example responses

200 Response

{
  "settlements": [
    {
      "amount": 0,
      "batch": "string",
      "batchType": "string",
      "dateSettled": "string",
      "fees": 0,
      "merchantAccount": {
        "Id": "string",
        "absorbsFee": true,
        "accountType": "string",
        "active": true,
        "adminPercFee": 0,
        "amendmentOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "autoSettlement": true,
        "bankDetails": {
          "accountNumber": "string",
          "accountType": "string",
          "bankName": "string",
          "branchCode": "string",
          "verified": true
        },
        "bankDetailsValidation": {
          "account": {
            "value": "string",
            "verified": true
          },
          "accountType": {
            "value": "string",
            "verified": true
          },
          "bankName": {
            "value": "string",
            "verified": true
          },
          "branchCode": {
            "value": "string",
            "verified": true
          },
          "cellNumber": {
            "value": "string",
            "verified": true
          },
          "clientName": {
            "value": "string",
            "verified": true
          },
          "email": {
            "value": "string",
            "verified": true
          },
          "idNumber": {
            "value": "string",
            "verified": true
          },
          "initials": {
            "value": "string",
            "verified": true
          },
          "verified": true
        },
        "bankValidationPendingReference": "string",
        "billingAddress": {
          "city": "string",
          "country": "string",
          "postalCode": "string",
          "province": "string",
          "streetAddress": "string"
        },
        "cancellationRequest": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "cancellationTerms": {
          "active": true,
          "definition": [
            {
              "end": 0,
              "gracePeriod": 0,
              "policy": {
                "definition": {
                  "deposit": true,
                  "flatFee": 0,
                  "percentage": 0
                },
                "name": "Deposit"
              },
              "start": 0,
              "type": {
                "definition": {
                  "missed": 0,
                  "percentage": 0
                },
                "name": "string"
              }
            }
          ]
        },
        "cancelledOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "completedOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "completedOrder75": {
          "emails": [
            "string"
          ],
          "enabled": true,
          "value": 0
        },
        "contractDocumentId": "string",
        "contractUpdated": true,
        "contractUrl": "string",
        "customFeatures": {
          "imageUrl": {
            "enabled": true,
            "value": "string"
          },
          "logo": {
            "enabled": true,
            "value": "string"
          },
          "paymentWidget": {
            "enabled": true,
            "value": "string"
          }
        },
        "domain": "string",
        "expire": 0,
        "expiredOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "failedPayment": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "features": {
          "enableAutoCancellation": true,
          "enableCreditCard": true,
          "enableCustomEmailLogo": true,
          "enableCustomWidgetLogo": true,
          "enableDebiCheck": true,
          "enableDefaultPaymentPlanImage": true,
          "enableInstantEFT": true,
          "enableManualCancellation": true
        },
        "flatFee": 0,
        "imageUrl": "string",
        "invoices": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "merchantBankingPercFee": 0,
        "merchantContractSigned": "string",
        "merchantName": "string",
        "merchantTermsLink": "string",
        "missedPayment": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "name": "string",
        "newOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "notifyUrl": "string",
        "onboardingState": "string",
        "paymentNotifyUrl": "string",
        "paymentPlans": {
          "debiCheckMinimum": {
            "enabled": true,
            "value": 0
          },
          "defaultDepositType": {
            "depositType": "string",
            "enabled": true,
            "flat": 0,
            "percentage": 0
          },
          "editPaymentPlanSettings": true,
          "maxMonths": {
            "enabled": true,
            "value": 0
          },
          "minMonths": {
            "enabled": true,
            "value": 0
          },
          "orderExpiry": {
            "enabled": true,
            "value": 0
          },
          "paymentMethods": {
            "creditOrDebitCard": true,
            "debiCheck": true,
            "eft": true
          },
          "splitPayments": true,
          "weeklyPayments": true
        },
        "percFee": 0,
        "refunds": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "registeredEntity": "string",
        "settlementDay": 0,
        "settlementFrequency": "string",
        "settlementType": "string",
        "settlements": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "successfulPayment": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "supportEmail": "string",
        "supportMobile": "string",
        "timestamp": 0,
        "transfers": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "users": [
          {
            "Id": "string",
            "active": true,
            "address": "string",
            "cellNumber": "string",
            "city": "string",
            "country": "string",
            "dateOfBirth": "string",
            "email": "[email protected]",
            "idNumber": "string",
            "merchantId": "string",
            "merchantRole": "string",
            "name": "string",
            "postalCode": "string",
            "province": "string",
            "role": "CLIENT",
            "username": "string",
            "verified": true,
            "verifiedEmail": true,
            "verifiedMobile": true
          }
        ],
        "vatNo": "string",
        "weeklyPayments": true
      },
      "merchantAccountId": "string",
      "merchantId": "string",
      "merchantUser": {
        "Id": "string",
        "active": true,
        "address": "string",
        "bankDetails": {
          "account": {
            "value": "string",
            "verified": true
          },
          "accountType": {
            "value": "string",
            "verified": true
          },
          "bankName": {
            "value": "string",
            "verified": true
          },
          "branchCode": {
            "value": "string",
            "verified": true
          },
          "cellNumber": {
            "value": "string",
            "verified": true
          },
          "clientName": {
            "value": "string",
            "verified": true
          },
          "email": {
            "value": "string",
            "verified": true
          },
          "idNumber": {
            "value": "string",
            "verified": true
          },
          "initials": {
            "value": "string",
            "verified": true
          },
          "verified": true
        },
        "bankValidationPendingReference": "string",
        "cellNumber": "string",
        "city": "string",
        "country": "string",
        "dateOfBirth": "string",
        "email": "[email protected]",
        "hasPassword": true,
        "idNumber": "string",
        "merchantId": "string",
        "merchantOnboarding": {
          "name": "string",
          "physicalAddress": {
            "city": "string",
            "country": "string",
            "postalCode": "string",
            "province": "string",
            "streetAddress": "string"
          }
        },
        "merchantRole": "string",
        "name": "string",
        "oneTimePass": "string",
        "postalCode": "string",
        "province": "string",
        "role": "CLIENT",
        "timestamp": 0,
        "username": "string",
        "verified": true,
        "verifiedEmail": true,
        "verifiedMobile": true
      },
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "locked": true,
          "note": "string",
          "orderStatus": "string",
          "paid": true,
          "paymentMethod": "string",
          "paymentPlanId": "string",
          "paymentType": "string",
          "pending": true,
          "reference": "string",
          "timestamp": 0,
          "userId": "string",
          "verifyError": "string"
        }
      ],
      "reconciled": true,
      "reference": "string",
      "settled": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelSettlementResponseMany

PaymentPlanService

PaymentPlanService_CreateOffline

Code samples

# You can also use wget
curl -X POST https://sandbox-api.layup.co.za/v1/offline-payments \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

POST https://sandbox-api.layup.co.za/v1/offline-payments HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "amount": 13333,
  "note": "Processed by employeeX",
  "orderId": "123f7f1496bd78001d6852f3",
  "paymentPlanId": "123f7f242c3d68f1aa26ebce",
  "reference": "Cash in hand",
  "verifiedAt": "2022-01-27T14:00:00.000Z"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/offline-payments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.post('https://sandbox-api.layup.co.za/v1/offline-payments', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.post 'https://sandbox-api.layup.co.za/v1/offline-payments',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox-api.layup.co.za/v1/offline-payments", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v1/offline-payments

Create Offline Payment

Body parameter

{
  "amount": 13333,
  "note": "Processed by employeeX",
  "orderId": "123f7f1496bd78001d6852f3",
  "paymentPlanId": "123f7f242c3d68f1aa26ebce",
  "reference": "Cash in hand",
  "verifiedAt": "2022-01-27T14:00:00.000Z"
}

Parameters

Name In Type Required Description
body body modelOfflinePaymentRequest true none

Example responses

200 Response

{
  "Id": "string",
  "amount": 0,
  "amountExcludingFee": 0,
  "due": "string",
  "failed": true,
  "fee": 0,
  "locked": true,
  "note": "string",
  "orderStatus": "string",
  "paid": true,
  "paymentMethod": "string",
  "paymentPlanId": "string",
  "paymentType": "string",
  "pending": true,
  "reference": "string",
  "timestamp": 0,
  "userId": "string",
  "verifyError": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelPaymentResponse
400 Bad Request Make sure that the payment plan must already exists. None

PaymentPlanService_DeleteOffline

Code samples

# You can also use wget
curl -X DELETE https://sandbox-api.layup.co.za/v1/offline-payments/{Id} \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

DELETE https://sandbox-api.layup.co.za/v1/offline-payments/{Id} HTTP/1.1
Host: sandbox-api.layup.co.za
Accept: application/json


const headers = {
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/offline-payments/{Id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.delete('https://sandbox-api.layup.co.za/v1/offline-payments/{Id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.delete 'https://sandbox-api.layup.co.za/v1/offline-payments/{Id}',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://sandbox-api.layup.co.za/v1/offline-payments/{Id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v1/offline-payments/{Id}

Delete Offline Payment

Parameters

Name In Type Required Description
Id path string true none

Example responses

200 Response

{
  "Id": "string",
  "amount": 0,
  "amountExcludingFee": 0,
  "due": "string",
  "failed": true,
  "fee": 0,
  "locked": true,
  "note": "string",
  "orderStatus": "string",
  "paid": true,
  "paymentMethod": "string",
  "paymentPlanId": "string",
  "paymentType": "string",
  "pending": true,
  "reference": "string",
  "timestamp": 0,
  "userId": "string",
  "verifyError": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelPaymentResponse

PaymentPlanService_CreatePreview

Code samples

# You can also use wget
curl -X POST https://sandbox-api.layup.co.za/v1/payment-plan/preview \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'apikey: API_KEY'

POST https://sandbox-api.layup.co.za/v1/payment-plan/preview HTTP/1.1
Host: sandbox-api.layup.co.za
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "absorbsFee": true,
  "amountDue": 0,
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "flatFee": 0,
  "frequency": "WEEKLY",
  "offset": 0,
  "paymentPlanId": "string",
  "percFee": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'apikey':'API_KEY'
};

fetch('https://sandbox-api.layup.co.za/v1/payment-plan/preview',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'apikey': 'API_KEY'
}

r = requests.post('https://sandbox-api.layup.co.za/v1/payment-plan/preview', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'apikey' => 'API_KEY'
}

result = RestClient.post 'https://sandbox-api.layup.co.za/v1/payment-plan/preview',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "apikey": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://sandbox-api.layup.co.za/v1/payment-plan/preview", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v1/payment-plan/preview

Create a Payment Plan Preview

This endpoint will generate all available payment plans an item can allow.
This will also showcase each Payment Plan's monthly installments.
Note: 'endDateMin' and 'endDateMax' should be ISO Dates when sent to the API. e.g.: '2019-02-18T01:02:56.277Z'
Note: 'amountDue' must be greater than 0
Note: All currency values are stored in cents.

Body parameter

{
  "absorbsFee": true,
  "amountDue": 0,
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "flatFee": 0,
  "frequency": "WEEKLY",
  "offset": 0,
  "paymentPlanId": "string",
  "percFee": 0
}

Parameters

Name In Type Required Description
body body modelPaymentPlanPreviewRequest true none

Example responses

200 Response

{
  "amountDue": 0,
  "amountDueExcludingFee": 0,
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "depositAmount": 0,
  "depositDue": 0,
  "depositDueExcludingFee": 0,
  "depositType": "INSTALMENT",
  "enablesSplit": true,
  "endDateMax": "string",
  "flatFee": 0,
  "groupPaymentPlan": {
    "cloneLimit": 0,
    "enabled": true,
    "expiry": 0
  },
  "imageUrl": "string",
  "initiatorId": "string",
  "merchant": "string",
  "merchantTermsLink": "string",
  "orderName": "string",
  "orderState": "string",
  "orderToClone": {
    "Id": "string",
    "absorbsFee": true,
    "acceptedProposedCancellationTerms": true,
    "amountDue": 0,
    "cancellationTerms": {
      "active": true,
      "definition": [
        {
          "end": 0,
          "gracePeriod": 0,
          "policy": {
            "definition": {
              "deposit": true,
              "flatFee": 0,
              "percentage": 0
            },
            "name": "Deposit"
          },
          "start": 0,
          "type": {
            "definition": {
              "missed": 0,
              "percentage": 0
            },
            "name": "string"
          }
        }
      ]
    },
    "cancelledBy": "string",
    "cloneCount": 0,
    "cloneExpiry": 0,
    "createdAt": "string",
    "customFeatures": {
      "imageUrl": {
        "enabled": true,
        "value": "string"
      },
      "logo": {
        "enabled": true,
        "value": "string"
      },
      "paymentWidget": {
        "enabled": true,
        "value": "string"
      }
    },
    "debiCheckMinimum": {
      "enabled": true,
      "value": 0
    },
    "depositAmount": 0,
    "depositPerc": 0,
    "depositType": "INSTALMENT",
    "enablesSplit": true,
    "endDateMax": "2019-08-24T14:15:22Z",
    "endDateMin": "2019-08-24T14:15:22Z",
    "expire": "string",
    "flatFee": 0,
    "groupPaymentPlan": {
      "cloneLimit": 0,
      "enabled": true,
      "expiry": 0
    },
    "imageUrl": "string",
    "initiatorId": "string",
    "merchantLink": "string",
    "merchantName": "string",
    "merchantTermsLink": "string",
    "name": "string",
    "notifications": [
      {
        "change": "string",
        "date": "string",
        "details": "string",
        "name": "string",
        "read": true,
        "reason": "string",
        "userId": "string"
      }
    ],
    "orderCancellationRequest": "string",
    "paymentMethods": {
      "creditOrDebitCard": true,
      "debiCheck": true,
      "eft": true
    },
    "percFee": 0,
    "plans": [
      {
        "Id": "string",
        "amountDue": 0,
        "amountDueExcludingFee": 0,
        "automaticBilling": true,
        "benefactor": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "benefactorId": "string",
        "completed": true,
        "debicheckLastFailedReasons": [
          "string"
        ],
        "debicheckStatus": "string",
        "depositDue": 0,
        "depositDueExcludingFee": 0,
        "frequency": "WEEKLY",
        "offset": 0,
        "order": {},
        "orderId": "string",
        "payments": [
          {
            "Id": "string",
            "amount": 0,
            "amountExcludingFee": 0,
            "due": "string",
            "failed": true,
            "fee": 0,
            "paid": true,
            "paymentMethod": "string",
            "paymentType": "string",
            "pending": true,
            "reconciliated": true,
            "timestamp": 0
          }
        ],
        "quantity": 0,
        "timestamp": 0
      }
    ],
    "previewFee": "string",
    "products": [
      {
        "Id": "string",
        "amount": 0,
        "depositType": "string",
        "link": "http://example.com",
        "name": "string",
        "sku": "string"
      }
    ],
    "reference": "string",
    "state": "PARTIAL",
    "stateUpdatedAt": "string",
    "supplier": {
      "Id": "string",
      "email": "string",
      "name": "string"
    },
    "supplierId": "string",
    "timestamp": 0,
    "updatedAt": "string",
    "weeklyPayments": true
  },
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "paymentPlans": [
    {
      "deposit": 0,
      "months": 0,
      "orderState": "string",
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "locked": true,
          "note": "string",
          "orderStatus": "string",
          "paid": true,
          "paymentMethod": "string",
          "paymentPlanId": "string",
          "paymentType": "string",
          "pending": true,
          "reference": "string",
          "timestamp": 0,
          "userId": "string",
          "verifyError": "string"
        }
      ],
      "quantity": 0
    }
  ],
  "percFee": 0,
  "products": [
    {
      "Id": "string",
      "amount": 0,
      "depositType": "string",
      "link": "http://example.com",
      "name": "string",
      "sku": "string"
    }
  ],
  "reference": "string",
  "validDates": [
    0
  ],
  "validDays": [
    0
  ],
  "weeklyPayments": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. modelPaymentPlanPreviewResponseMany
400 Bad Request Bad Request:
'amountDue' is required to create a Payment Plan Preview
'depositPerc' is required to create a Payment Plan Preview
'depositPerc' should be of type Number to create a Payment Plan Preview
'endDateMax' is required to create a Payment Plan Preview
'endDateMax' must be of valid Date format to create a Payment Plan Preview
'endDateMin' is required to create a Payment Plan Preview
'endDateMin' must be of valid Date format to create a Payment Plan Preview
'absorbsFee' should be of type Boolean to create a Payment Plan Preview
None

Schemas

modelBankDetails

{
  "accountNumber": "string",
  "accountType": "string",
  "bankName": "string",
  "branchCode": "string",
  "verified": true
}

Properties

Name Type Required Restrictions Description
accountNumber string false none none
accountType string false none none
bankName string false none none
branchCode string false none none
verified boolean false none none

modelBankInfo

{
  "account": {
    "value": "string",
    "verified": true
  },
  "accountType": {
    "value": "string",
    "verified": true
  },
  "bankName": {
    "value": "string",
    "verified": true
  },
  "branchCode": {
    "value": "string",
    "verified": true
  },
  "cellNumber": {
    "value": "string",
    "verified": true
  },
  "clientName": {
    "value": "string",
    "verified": true
  },
  "email": {
    "value": "string",
    "verified": true
  },
  "idNumber": {
    "value": "string",
    "verified": true
  },
  "initials": {
    "value": "string",
    "verified": true
  },
  "verified": true
}

Properties

Name Type Required Restrictions Description
account modelBankValidation false none none
accountType modelBankValidation false none none
bankName modelBankValidation false none none
branchCode modelBankValidation false none none
cellNumber modelBankValidation false none none
clientName modelBankValidation false none none
email modelBankValidation false none none
idNumber modelBankValidation false none none
initials modelBankValidation false none none
verified boolean false none none

modelBankValidation

{
  "value": "string",
  "verified": true
}

Properties

Name Type Required Restrictions Description
value string false none none
verified boolean false none none

modelBillingAddress

{
  "city": "string",
  "country": "string",
  "postalCode": "string",
  "province": "string",
  "streetAddress": "string"
}

Properties

Name Type Required Restrictions Description
city string false none none
country string false none none
postalCode string false none none
province string false none none
streetAddress string false none none

modelCancellationDefinition

{
  "end": 0,
  "gracePeriod": 0,
  "policy": {
    "definition": {
      "deposit": true,
      "flatFee": 0,
      "percentage": 0
    },
    "name": "Deposit"
  },
  "start": 0,
  "type": {
    "definition": {
      "missed": 0,
      "percentage": 0
    },
    "name": "string"
  }
}

Properties

Name Type Required Restrictions Description
end integer(int32) false none none
gracePeriod integer(int32) false none none
policy modelCancellationPolicy false none none
start integer(int32) false none none
type modelCancellationType false none none

modelCancellationPolicy

{
  "definition": {
    "deposit": true,
    "flatFee": 0,
    "percentage": 0
  },
  "name": "Deposit"
}

Properties

Name Type Required Restrictions Description
definition modelCancellationPolicyDefinition false none none
name string false none none

Enumerated Values

Property Value
name Deposit
name Percentage
name FlatFee
name Combination

modelCancellationPolicyDefinition

{
  "deposit": true,
  "flatFee": 0,
  "percentage": 0
}

Properties

Name Type Required Restrictions Description
deposit boolean false none none
flatFee integer(int32) false none none
percentage integer(int32) false none none

modelCancellationTermRequest

{
  "active": true,
  "definition": [
    {
      "end": 0,
      "gracePeriod": 0,
      "policy": {
        "definition": {
          "deposit": true,
          "flatFee": 0,
          "percentage": 0
        },
        "name": "Deposit"
      },
      "start": 0,
      "type": {
        "definition": {
          "missed": 0,
          "percentage": 0
        },
        "name": "string"
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
active boolean false none none
definition [modelCancellationDefinition] false none none

modelCancellationType

{
  "definition": {
    "missed": 0,
    "percentage": 0
  },
  "name": "string"
}

Properties

Name Type Required Restrictions Description
definition modelCancellationTypeDefinition false none none
name string false none none

modelCancellationTypeDefinition

{
  "missed": 0,
  "percentage": 0
}

Properties

Name Type Required Restrictions Description
missed integer(int32) false none none
percentage integer(int32) false none none

modelCustomize

{
  "imageUrl": {
    "enabled": true,
    "value": "string"
  },
  "logo": {
    "enabled": true,
    "value": "string"
  },
  "paymentWidget": {
    "enabled": true,
    "value": "string"
  }
}

Properties

Name Type Required Restrictions Description
imageUrl modelImageUrl false none none
logo modelLogo false none none
paymentWidget modelPaymentWidgetLogo false none none

modelDefaultDepositType

{
  "depositType": "string",
  "enabled": true,
  "flat": 0,
  "percentage": 0
}

Properties

Name Type Required Restrictions Description
depositType string false none none
enabled boolean false none none
flat integer(int32) false none none
percentage integer(int32) false none none

modelFeature

{
  "enableAutoCancellation": true,
  "enableCreditCard": true,
  "enableCustomEmailLogo": true,
  "enableCustomWidgetLogo": true,
  "enableDebiCheck": true,
  "enableDefaultPaymentPlanImage": true,
  "enableInstantEFT": true,
  "enableManualCancellation": true
}

Properties

Name Type Required Restrictions Description
enableAutoCancellation boolean false none none
enableCreditCard boolean false none none
enableCustomEmailLogo boolean false none none
enableCustomWidgetLogo boolean false none none
enableDebiCheck boolean false none none
enableDefaultPaymentPlanImage boolean false none none
enableInstantEFT boolean false none none
enableManualCancellation boolean false none none

modelGroupPayment

{
  "cloneLimit": 0,
  "enabled": true,
  "expiry": 0
}

Properties

Name Type Required Restrictions Description
cloneLimit integer(int32) false none none
enabled boolean false none none
expiry integer(int32) false none none

modelImageUrl

{
  "enabled": true,
  "value": "string"
}

Properties

Name Type Required Restrictions Description
enabled boolean false none none
value string false none none

modelLoginRequest

{
  "password": "pa$$word",
  "username": "string"
}

Properties

Name Type Required Restrictions Description
password string(password) false none none
username string false none none

{
  "enabled": true,
  "value": "string"
}

Properties

Name Type Required Restrictions Description
enabled boolean false none none
value string false none none

modelMerchantOnboarding

{
  "name": "string",
  "physicalAddress": {
    "city": "string",
    "country": "string",
    "postalCode": "string",
    "province": "string",
    "streetAddress": "string"
  }
}

Properties

Name Type Required Restrictions Description
name string false none none
physicalAddress modelBillingAddress false none none

modelMerchantResponse

{
  "Id": "string",
  "absorbsFee": true,
  "accountType": "string",
  "active": true,
  "adminPercFee": 0,
  "amendmentOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "autoSettlement": true,
  "bankDetails": {
    "accountNumber": "string",
    "accountType": "string",
    "bankName": "string",
    "branchCode": "string",
    "verified": true
  },
  "bankDetailsValidation": {
    "account": {
      "value": "string",
      "verified": true
    },
    "accountType": {
      "value": "string",
      "verified": true
    },
    "bankName": {
      "value": "string",
      "verified": true
    },
    "branchCode": {
      "value": "string",
      "verified": true
    },
    "cellNumber": {
      "value": "string",
      "verified": true
    },
    "clientName": {
      "value": "string",
      "verified": true
    },
    "email": {
      "value": "string",
      "verified": true
    },
    "idNumber": {
      "value": "string",
      "verified": true
    },
    "initials": {
      "value": "string",
      "verified": true
    },
    "verified": true
  },
  "bankValidationPendingReference": "string",
  "billingAddress": {
    "city": "string",
    "country": "string",
    "postalCode": "string",
    "province": "string",
    "streetAddress": "string"
  },
  "cancellationRequest": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "completedOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "completedOrder75": {
    "emails": [
      "string"
    ],
    "enabled": true,
    "value": 0
  },
  "contractDocumentId": "string",
  "contractUpdated": true,
  "contractUrl": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "domain": "string",
  "expire": 0,
  "expiredOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "failedPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "features": {
    "enableAutoCancellation": true,
    "enableCreditCard": true,
    "enableCustomEmailLogo": true,
    "enableCustomWidgetLogo": true,
    "enableDebiCheck": true,
    "enableDefaultPaymentPlanImage": true,
    "enableInstantEFT": true,
    "enableManualCancellation": true
  },
  "flatFee": 0,
  "imageUrl": "string",
  "invoices": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "merchantBankingPercFee": 0,
  "merchantContractSigned": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "missedPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "name": "string",
  "newOrder": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "notifyUrl": "string",
  "onboardingState": "string",
  "paymentNotifyUrl": "string",
  "paymentPlans": {
    "debiCheckMinimum": {
      "enabled": true,
      "value": 0
    },
    "defaultDepositType": {
      "depositType": "string",
      "enabled": true,
      "flat": 0,
      "percentage": 0
    },
    "editPaymentPlanSettings": true,
    "maxMonths": {
      "enabled": true,
      "value": 0
    },
    "minMonths": {
      "enabled": true,
      "value": 0
    },
    "orderExpiry": {
      "enabled": true,
      "value": 0
    },
    "paymentMethods": {
      "creditOrDebitCard": true,
      "debiCheck": true,
      "eft": true
    },
    "splitPayments": true,
    "weeklyPayments": true
  },
  "percFee": 0,
  "refunds": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "registeredEntity": "string",
  "settlementDay": 0,
  "settlementFrequency": "string",
  "settlementType": "string",
  "settlements": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "successfulPayment": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "supportEmail": "string",
  "supportMobile": "string",
  "timestamp": 0,
  "transfers": {
    "emails": [
      "string"
    ],
    "enabled": true
  },
  "users": [
    {
      "Id": "string",
      "active": true,
      "address": "string",
      "cellNumber": "string",
      "city": "string",
      "country": "string",
      "dateOfBirth": "string",
      "email": "[email protected]",
      "idNumber": "string",
      "merchantId": "string",
      "merchantRole": "string",
      "name": "string",
      "postalCode": "string",
      "province": "string",
      "role": "CLIENT",
      "username": "string",
      "verified": true,
      "verifiedEmail": true,
      "verifiedMobile": true
    }
  ],
  "vatNo": "string",
  "weeklyPayments": true
}

Properties

Name Type Required Restrictions Description
Id string false none none
absorbsFee boolean false none none
accountType string false none none
active boolean false none none
adminPercFee integer(int32) false none none
amendmentOrder modelNotification false none none
autoSettlement boolean false none none
bankDetails modelBankDetails false none none
bankDetailsValidation modelBankInfo false none none
bankValidationPendingReference string false none none
billingAddress modelBillingAddress false none none
cancellationRequest modelNotification false none none
cancellationTerms modelCancellationTermRequest false none none
cancelledOrder modelNotification false none none
completedOrder modelNotification false none none
completedOrder75 modelNotification_Percentage false none none
contractDocumentId string false none none
contractUpdated boolean false none none
contractUrl string false none none
customFeatures modelCustomize false none none
domain string false none none
expire integer(int32) false none none
expiredOrder modelNotification false none none
failedPayment modelNotification false none none
features modelFeature false none none
flatFee integer(int32) false none none
imageUrl string false none none
invoices modelNotification false none none
merchantBankingPercFee integer(int32) false none none
merchantContractSigned string false none none
merchantName string false none none
merchantTermsLink string false none none
missedPayment modelNotification false none none
name string false none none
newOrder modelNotification false none none
notifyUrl string false none none
onboardingState string false none none
paymentNotifyUrl string false none none
paymentPlans modelPaymentPlanSettings false none none
percFee number(double) false none none
refunds modelNotification false none none
registeredEntity string false none none
settlementDay integer(int32) false none none
settlementFrequency string false none none
settlementType string false none none
settlements modelNotification false none none
successfulPayment modelNotification false none none
supportEmail string false none none
supportMobile string false none none
timestamp number(double) false none none
transfers modelNotification false none none
users [modelUser] false none [This user is loaded in by the authentication middleware.]
vatNo string false none none
weeklyPayments boolean false none none

modelNote

{
  "change": "string",
  "date": "string",
  "details": "string",
  "name": "string",
  "read": true,
  "reason": "string",
  "userId": "string"
}

Properties

Name Type Required Restrictions Description
change string false none none
date string false none none
details string false none none
name string false none none
read boolean false none none
reason string false none none
userId string false none none

modelNotification

{
  "emails": [
    "string"
  ],
  "enabled": true
}

Properties

Name Type Required Restrictions Description
emails [string] false none none
enabled boolean false none none

modelNotification_Percentage

{
  "emails": [
    "string"
  ],
  "enabled": true,
  "value": 0
}

Properties

Name Type Required Restrictions Description
emails [string] false none none
enabled boolean false none none
value integer(int32) false none none

modelOfflinePaymentRequest

{
  "amount": 13333,
  "note": "Processed by employeeX",
  "orderId": "123f7f1496bd78001d6852f3",
  "paymentPlanId": "123f7f242c3d68f1aa26ebce",
  "reference": "Cash in hand",
  "verifiedAt": "2022-01-27T14:00:00.000Z"
}

Properties

Name Type Required Restrictions Description
amount integer(int32) false none none
excludeFees boolean false none none
note string false none none
paymentPlanId string false none none
paymentType string false none none
reference string false none none
settled boolean false none none
verifiedAt string false none none

modelOrderExpiry

{
  "enabled": true,
  "value": 0
}

Properties

Name Type Required Restrictions Description
enabled boolean false none none
value integer(int32) false none none

modelOrderRequest

{
  "amount": 10,
  "depositPerc": 5,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "name": "string",
  "products": "ProductCreateRequest",
  "reference": "string"
}

Properties

Name Type Required Restrictions Description
absorbsFee boolean false none none
acceptedProposedCancellationTerms boolean false none none
amortiseOnAmend boolean false none none
amortiseOnMissed boolean false none none
cancellationPolicy modelCancellationPolicy false none none
cancellationTerms modelCancellationTermRequest false none none
cloneExpiry integer(int32) false none none
customFeatures modelCustomize false none none
depositAmount integer(int32) false none none
depositPerc number(double) false none none
depositType string false none none
enablesSplit boolean false none none
endDateMax string(date-time) false none none
endDateMin string(date-time) false none none
expire integer(int32) false none none
groupPaymentPlan modelGroupPayment false none none
imageUrl string false none none
name string false none none
notifications [modelNote] false none none
orderCancellationRequest string false none none
paymentMethods modelPaymentMethod false none none
products [modelProductCreateRequest] false none none
reference string false none none
suspendOnCancel boolean false none none
weeklyPayments boolean false none none

Enumerated Values

Property Value
depositType INSTALMENT
depositType FLAT
depositType PERCENTAGE

modelOrderResponse

{
  "Id": "string",
  "absorbsFee": true,
  "acceptedProposedCancellationTerms": true,
  "amountDue": 0,
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "cancelledBy": "string",
  "cloneCount": 0,
  "cloneExpiry": 0,
  "createdAt": "string",
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "enablesSplit": true,
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "expire": "string",
  "flatFee": 0,
  "groupPaymentPlan": {
    "cloneLimit": 0,
    "enabled": true,
    "expiry": 0
  },
  "imageUrl": "string",
  "initiatorId": "string",
  "merchantLink": "string",
  "merchantName": "string",
  "merchantTermsLink": "string",
  "name": "string",
  "notifications": [
    {
      "change": "string",
      "date": "string",
      "details": "string",
      "name": "string",
      "read": true,
      "reason": "string",
      "userId": "string"
    }
  ],
  "orderCancellationRequest": "string",
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "percFee": 0,
  "plans": [
    {
      "Id": "string",
      "amountDue": 0,
      "amountDueExcludingFee": 0,
      "automaticBilling": true,
      "benefactor": {
        "Id": "string",
        "email": "string",
        "name": "string"
      },
      "benefactorId": "string",
      "completed": true,
      "debicheckLastFailedReasons": [
        "string"
      ],
      "debicheckStatus": "string",
      "depositDue": 0,
      "depositDueExcludingFee": 0,
      "frequency": "WEEKLY",
      "offset": 0,
      "order": {
        "Id": "string",
        "absorbsFee": true,
        "acceptedProposedCancellationTerms": true,
        "amountDue": 0,
        "cancellationTerms": {
          "active": true,
          "definition": [
            {
              "end": 0,
              "gracePeriod": 0,
              "policy": {
                "definition": {
                  "deposit": true,
                  "flatFee": 0,
                  "percentage": 0
                },
                "name": "Deposit"
              },
              "start": 0,
              "type": {
                "definition": {
                  "missed": 0,
                  "percentage": 0
                },
                "name": "string"
              }
            }
          ]
        },
        "cancelledBy": "string",
        "cloneCount": 0,
        "cloneExpiry": 0,
        "createdAt": "string",
        "customFeatures": {
          "imageUrl": {
            "enabled": true,
            "value": "string"
          },
          "logo": {
            "enabled": true,
            "value": "string"
          },
          "paymentWidget": {
            "enabled": true,
            "value": "string"
          }
        },
        "debiCheckMinimum": {
          "enabled": true,
          "value": 0
        },
        "depositAmount": 0,
        "depositPerc": 0,
        "depositType": "INSTALMENT",
        "enablesSplit": true,
        "endDateMax": "2019-08-24T14:15:22Z",
        "endDateMin": "2019-08-24T14:15:22Z",
        "expire": "string",
        "flatFee": 0,
        "groupPaymentPlan": {
          "cloneLimit": 0,
          "enabled": true,
          "expiry": 0
        },
        "imageUrl": "string",
        "initiatorId": "string",
        "merchantLink": "string",
        "merchantName": "string",
        "merchantTermsLink": "string",
        "name": "string",
        "notifications": [
          {
            "change": "string",
            "date": "string",
            "details": "string",
            "name": "string",
            "read": true,
            "reason": "string",
            "userId": "string"
          }
        ],
        "orderCancellationRequest": "string",
        "paymentMethods": {
          "creditOrDebitCard": true,
          "debiCheck": true,
          "eft": true
        },
        "percFee": 0,
        "plans": [],
        "previewFee": "string",
        "products": [
          {
            "Id": "string",
            "amount": 0,
            "depositType": "string",
            "link": "http://example.com",
            "name": "string",
            "sku": "string"
          }
        ],
        "reference": "string",
        "state": "PARTIAL",
        "stateUpdatedAt": "string",
        "supplier": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "supplierId": "string",
        "timestamp": 0,
        "updatedAt": "string",
        "weeklyPayments": true
      },
      "orderId": "string",
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "paid": true,
          "paymentMethod": "string",
          "paymentType": "string",
          "pending": true,
          "reconciliated": true,
          "timestamp": 0
        }
      ],
      "quantity": 0,
      "timestamp": 0
    }
  ],
  "previewFee": "string",
  "products": [
    {
      "Id": "string",
      "amount": 0,
      "depositType": "string",
      "link": "http://example.com",
      "name": "string",
      "sku": "string"
    }
  ],
  "reference": "string",
  "state": "PARTIAL",
  "stateUpdatedAt": "string",
  "supplier": {
    "Id": "string",
    "email": "string",
    "name": "string"
  },
  "supplierId": "string",
  "timestamp": 0,
  "updatedAt": "string",
  "weeklyPayments": true
}

Properties

Name Type Required Restrictions Description
Id string false none none
absorbsFee boolean false none none
acceptedProposedCancellationTerms boolean false none none
amountDue integer(int32) false none none
cancellationTerms modelCancellationTermRequest false none none
cancelledBy string false none none
cloneCount integer(int32) false none none
cloneExpiry integer(int32) false none none
createdAt string false none none
customFeatures modelCustomize false none none
debiCheckMinimum modelValueEnabledPair false none none
depositAmount integer(int32) false none none
depositPerc number(double) false none none
depositType string false none none
enablesSplit boolean false none none
endDateMax string(date-time) false none none
endDateMin string(date-time) false none none
expire string false none none
flatFee integer(int32) false none none
groupPaymentPlan modelGroupPayment false none none
imageUrl string false none none
initiatorId string false none none
merchantLink string false none none
merchantName string false none none
merchantTermsLink string false none none
name string false none none
notifications [modelNote] false none none
orderCancellationRequest string false none none
paymentMethods modelPaymentMethod false none none
percFee number(double) false none none
plans [modelPaymentPlanResponse] false none none
previewFee string false none none
products [modelProductResponse] false none none
reference string false none none
state string false none none
stateUpdatedAt string false none none
supplier modelPaymentPlanBenefactor false none none
supplierId string false none none
timestamp number(double) false none none
updatedAt string false none none
weeklyPayments boolean false none none

Enumerated Values

Property Value
depositType INSTALMENT
depositType FLAT
depositType PERCENTAGE
state PARTIAL
state PLACED
state COMPLETED
state CANCELLED

modelOrderResponseMany

{
  "orders": [
    {
      "Id": "string",
      "absorbsFee": true,
      "acceptedProposedCancellationTerms": true,
      "amountDue": 0,
      "cancellationTerms": {
        "active": true,
        "definition": [
          {
            "end": 0,
            "gracePeriod": 0,
            "policy": {
              "definition": {
                "deposit": true,
                "flatFee": 0,
                "percentage": 0
              },
              "name": "Deposit"
            },
            "start": 0,
            "type": {
              "definition": {
                "missed": 0,
                "percentage": 0
              },
              "name": "string"
            }
          }
        ]
      },
      "cancelledBy": "string",
      "cloneCount": 0,
      "cloneExpiry": 0,
      "createdAt": "string",
      "customFeatures": {
        "imageUrl": {
          "enabled": true,
          "value": "string"
        },
        "logo": {
          "enabled": true,
          "value": "string"
        },
        "paymentWidget": {
          "enabled": true,
          "value": "string"
        }
      },
      "debiCheckMinimum": {
        "enabled": true,
        "value": 0
      },
      "depositAmount": 0,
      "depositPerc": 0,
      "depositType": "INSTALMENT",
      "enablesSplit": true,
      "endDateMax": "2019-08-24T14:15:22Z",
      "endDateMin": "2019-08-24T14:15:22Z",
      "expire": "string",
      "flatFee": 0,
      "groupPaymentPlan": {
        "cloneLimit": 0,
        "enabled": true,
        "expiry": 0
      },
      "imageUrl": "string",
      "initiatorId": "string",
      "merchantLink": "string",
      "merchantName": "string",
      "merchantTermsLink": "string",
      "name": "string",
      "notifications": [
        {
          "change": "string",
          "date": "string",
          "details": "string",
          "name": "string",
          "read": true,
          "reason": "string",
          "userId": "string"
        }
      ],
      "orderCancellationRequest": "string",
      "paymentMethods": {
        "creditOrDebitCard": true,
        "debiCheck": true,
        "eft": true
      },
      "percFee": 0,
      "plans": [
        {
          "Id": "string",
          "amountDue": 0,
          "amountDueExcludingFee": 0,
          "automaticBilling": true,
          "benefactor": {
            "Id": "string",
            "email": "string",
            "name": "string"
          },
          "benefactorId": "string",
          "completed": true,
          "debicheckLastFailedReasons": [
            "string"
          ],
          "debicheckStatus": "string",
          "depositDue": 0,
          "depositDueExcludingFee": 0,
          "frequency": "WEEKLY",
          "offset": 0,
          "order": {},
          "orderId": "string",
          "payments": [
            {
              "Id": "string",
              "amount": 0,
              "amountExcludingFee": 0,
              "due": "string",
              "failed": true,
              "fee": 0,
              "paid": true,
              "paymentMethod": "string",
              "paymentType": "string",
              "pending": true,
              "reconciliated": true,
              "timestamp": 0
            }
          ],
          "quantity": 0,
          "timestamp": 0
        }
      ],
      "previewFee": "string",
      "products": [
        {
          "Id": "string",
          "amount": 0,
          "depositType": "string",
          "link": "http://example.com",
          "name": "string",
          "sku": "string"
        }
      ],
      "reference": "string",
      "state": "PARTIAL",
      "stateUpdatedAt": "string",
      "supplier": {
        "Id": "string",
        "email": "string",
        "name": "string"
      },
      "supplierId": "string",
      "timestamp": 0,
      "updatedAt": "string",
      "weeklyPayments": true
    }
  ]
}

Properties

Name Type Required Restrictions Description
orders [modelOrderResponse] false none none

modelOrderSendRequest

{
  "contact": "[email protected]",
  "message": "string",
  "orderId": "123f7f1496bd78001d6852f3",
  "orderUrl": "https://shopper.layup.co.za/order/123f7f1496bd78001d6852f3",
  "type": "email"
}

Properties

Name Type Required Restrictions Description
contact string false none none
message string false none none
orderId string false none none
orderUrl string false none none
type string false none none

modelOrderSendRequestResponse

{
  "success": true
}

Properties

Name Type Required Restrictions Description
success boolean false none none

modelPaymentMethod

{
  "creditOrDebitCard": true,
  "debiCheck": true,
  "eft": true
}

Properties

Name Type Required Restrictions Description
creditOrDebitCard boolean false none none
debiCheck boolean false none none
eft boolean false none none

modelPaymentPlanBenefactor

{
  "Id": "string",
  "email": "string",
  "name": "string"
}

Properties

Name Type Required Restrictions Description
Id string false none none
email string false none none
name string false none none

modelPaymentPlanPreviewRequest

{
  "absorbsFee": true,
  "amountDue": 0,
  "depositAmount": 0,
  "depositPerc": 0,
  "depositType": "INSTALMENT",
  "endDateMax": "2019-08-24T14:15:22Z",
  "endDateMin": "2019-08-24T14:15:22Z",
  "flatFee": 0,
  "frequency": "WEEKLY",
  "offset": 0,
  "paymentPlanId": "string",
  "percFee": 0
}

Properties

Name Type Required Restrictions Description
absorbsFee boolean false none none
amountDue integer false none none
depositAmount integer(int32) false none none
depositPerc number false none none
depositType string false none none
endDateMax string(date-time) false none none
endDateMin string(date-time) false none none
flatFee number(double) false none none
frequency string false none none
offset integer(int32) false none none
paymentPlanId string false none none
percFee number(double) false none none

Enumerated Values

Property Value
depositType INSTALMENT
depositType FLAT
depositType PERCENTAGE
frequency WEEKLY
frequency MONTHLY

modelPaymentPlanPreviewResponse

{
  "deposit": 0,
  "months": 0,
  "orderState": "string",
  "payments": [
    {
      "Id": "string",
      "amount": 0,
      "amountExcludingFee": 0,
      "due": "string",
      "failed": true,
      "fee": 0,
      "locked": true,
      "note": "string",
      "orderStatus": "string",
      "paid": true,
      "paymentMethod": "string",
      "paymentPlanId": "string",
      "paymentType": "string",
      "pending": true,
      "reference": "string",
      "timestamp": 0,
      "userId": "string",
      "verifyError": "string"
    }
  ],
  "quantity": 0
}

Properties

Name Type Required Restrictions Description
deposit integer(int32) false none none
months integer(int32) false none none
orderState string false none none
payments [modelPaymentResponse] false none none
quantity integer(int32) false none none

modelPaymentPlanPreviewResponseMany

{
  "amountDue": 0,
  "amountDueExcludingFee": 0,
  "cancellationTerms": {
    "active": true,
    "definition": [
      {
        "end": 0,
        "gracePeriod": 0,
        "policy": {
          "definition": {
            "deposit": true,
            "flatFee": 0,
            "percentage": 0
          },
          "name": "Deposit"
        },
        "start": 0,
        "type": {
          "definition": {
            "missed": 0,
            "percentage": 0
          },
          "name": "string"
        }
      }
    ]
  },
  "customFeatures": {
    "imageUrl": {
      "enabled": true,
      "value": "string"
    },
    "logo": {
      "enabled": true,
      "value": "string"
    },
    "paymentWidget": {
      "enabled": true,
      "value": "string"
    }
  },
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "depositAmount": 0,
  "depositDue": 0,
  "depositDueExcludingFee": 0,
  "depositType": "INSTALMENT",
  "enablesSplit": true,
  "endDateMax": "string",
  "flatFee": 0,
  "groupPaymentPlan": {
    "cloneLimit": 0,
    "enabled": true,
    "expiry": 0
  },
  "imageUrl": "string",
  "initiatorId": "string",
  "merchant": "string",
  "merchantTermsLink": "string",
  "orderName": "string",
  "orderState": "string",
  "orderToClone": {
    "Id": "string",
    "absorbsFee": true,
    "acceptedProposedCancellationTerms": true,
    "amountDue": 0,
    "cancellationTerms": {
      "active": true,
      "definition": [
        {
          "end": 0,
          "gracePeriod": 0,
          "policy": {
            "definition": {
              "deposit": true,
              "flatFee": 0,
              "percentage": 0
            },
            "name": "Deposit"
          },
          "start": 0,
          "type": {
            "definition": {
              "missed": 0,
              "percentage": 0
            },
            "name": "string"
          }
        }
      ]
    },
    "cancelledBy": "string",
    "cloneCount": 0,
    "cloneExpiry": 0,
    "createdAt": "string",
    "customFeatures": {
      "imageUrl": {
        "enabled": true,
        "value": "string"
      },
      "logo": {
        "enabled": true,
        "value": "string"
      },
      "paymentWidget": {
        "enabled": true,
        "value": "string"
      }
    },
    "debiCheckMinimum": {
      "enabled": true,
      "value": 0
    },
    "depositAmount": 0,
    "depositPerc": 0,
    "depositType": "INSTALMENT",
    "enablesSplit": true,
    "endDateMax": "2019-08-24T14:15:22Z",
    "endDateMin": "2019-08-24T14:15:22Z",
    "expire": "string",
    "flatFee": 0,
    "groupPaymentPlan": {
      "cloneLimit": 0,
      "enabled": true,
      "expiry": 0
    },
    "imageUrl": "string",
    "initiatorId": "string",
    "merchantLink": "string",
    "merchantName": "string",
    "merchantTermsLink": "string",
    "name": "string",
    "notifications": [
      {
        "change": "string",
        "date": "string",
        "details": "string",
        "name": "string",
        "read": true,
        "reason": "string",
        "userId": "string"
      }
    ],
    "orderCancellationRequest": "string",
    "paymentMethods": {
      "creditOrDebitCard": true,
      "debiCheck": true,
      "eft": true
    },
    "percFee": 0,
    "plans": [
      {
        "Id": "string",
        "amountDue": 0,
        "amountDueExcludingFee": 0,
        "automaticBilling": true,
        "benefactor": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "benefactorId": "string",
        "completed": true,
        "debicheckLastFailedReasons": [
          "string"
        ],
        "debicheckStatus": "string",
        "depositDue": 0,
        "depositDueExcludingFee": 0,
        "frequency": "WEEKLY",
        "offset": 0,
        "order": {},
        "orderId": "string",
        "payments": [
          {
            "Id": "string",
            "amount": 0,
            "amountExcludingFee": 0,
            "due": "string",
            "failed": true,
            "fee": 0,
            "paid": true,
            "paymentMethod": "string",
            "paymentType": "string",
            "pending": true,
            "reconciliated": true,
            "timestamp": 0
          }
        ],
        "quantity": 0,
        "timestamp": 0
      }
    ],
    "previewFee": "string",
    "products": [
      {
        "Id": "string",
        "amount": 0,
        "depositType": "string",
        "link": "http://example.com",
        "name": "string",
        "sku": "string"
      }
    ],
    "reference": "string",
    "state": "PARTIAL",
    "stateUpdatedAt": "string",
    "supplier": {
      "Id": "string",
      "email": "string",
      "name": "string"
    },
    "supplierId": "string",
    "timestamp": 0,
    "updatedAt": "string",
    "weeklyPayments": true
  },
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "paymentPlans": [
    {
      "deposit": 0,
      "months": 0,
      "orderState": "string",
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "locked": true,
          "note": "string",
          "orderStatus": "string",
          "paid": true,
          "paymentMethod": "string",
          "paymentPlanId": "string",
          "paymentType": "string",
          "pending": true,
          "reference": "string",
          "timestamp": 0,
          "userId": "string",
          "verifyError": "string"
        }
      ],
      "quantity": 0
    }
  ],
  "percFee": 0,
  "products": [
    {
      "Id": "string",
      "amount": 0,
      "depositType": "string",
      "link": "http://example.com",
      "name": "string",
      "sku": "string"
    }
  ],
  "reference": "string",
  "validDates": [
    0
  ],
  "validDays": [
    0
  ],
  "weeklyPayments": true
}

Properties

Name Type Required Restrictions Description
amountDue integer(int32) false none none
amountDueExcludingFee integer(int32) false none none
cancellationTerms modelCancellationTermRequest false none none
customFeatures modelCustomize false none none
debiCheckMinimum modelValueEnabledPair false none none
depositAmount integer(int32) false none none
depositDue integer(int32) false none none
depositDueExcludingFee integer(int32) false none none
depositType string false none none
enablesSplit boolean false none none
endDateMax string false none none
flatFee number(double) false none none
groupPaymentPlan modelGroupPayment false none none
imageUrl string false none none
initiatorId string false none none
merchant string false none none
merchantTermsLink string false none none
orderName string false none none
orderState string false none none
orderToClone modelOrderResponse false none none
paymentMethods modelPaymentMethod false none none
paymentPlans [modelPaymentPlanPreviewResponse] false none none
percFee number(double) false none none
products [modelProductResponse] false none none
reference string false none none
validDates [integer] false none none
validDays [integer] false none none
weeklyPayments boolean false none none

Enumerated Values

Property Value
depositType INSTALMENT
depositType FLAT
depositType PERCENTAGE

modelPaymentPlanResponse

{
  "Id": "string",
  "amountDue": 0,
  "amountDueExcludingFee": 0,
  "automaticBilling": true,
  "benefactor": {
    "Id": "string",
    "email": "string",
    "name": "string"
  },
  "benefactorId": "string",
  "completed": true,
  "debicheckLastFailedReasons": [
    "string"
  ],
  "debicheckStatus": "string",
  "depositDue": 0,
  "depositDueExcludingFee": 0,
  "frequency": "WEEKLY",
  "offset": 0,
  "order": {
    "Id": "string",
    "absorbsFee": true,
    "acceptedProposedCancellationTerms": true,
    "amountDue": 0,
    "cancellationTerms": {
      "active": true,
      "definition": [
        {
          "end": 0,
          "gracePeriod": 0,
          "policy": {
            "definition": {
              "deposit": true,
              "flatFee": 0,
              "percentage": 0
            },
            "name": "Deposit"
          },
          "start": 0,
          "type": {
            "definition": {
              "missed": 0,
              "percentage": 0
            },
            "name": "string"
          }
        }
      ]
    },
    "cancelledBy": "string",
    "cloneCount": 0,
    "cloneExpiry": 0,
    "createdAt": "string",
    "customFeatures": {
      "imageUrl": {
        "enabled": true,
        "value": "string"
      },
      "logo": {
        "enabled": true,
        "value": "string"
      },
      "paymentWidget": {
        "enabled": true,
        "value": "string"
      }
    },
    "debiCheckMinimum": {
      "enabled": true,
      "value": 0
    },
    "depositAmount": 0,
    "depositPerc": 0,
    "depositType": "INSTALMENT",
    "enablesSplit": true,
    "endDateMax": "2019-08-24T14:15:22Z",
    "endDateMin": "2019-08-24T14:15:22Z",
    "expire": "string",
    "flatFee": 0,
    "groupPaymentPlan": {
      "cloneLimit": 0,
      "enabled": true,
      "expiry": 0
    },
    "imageUrl": "string",
    "initiatorId": "string",
    "merchantLink": "string",
    "merchantName": "string",
    "merchantTermsLink": "string",
    "name": "string",
    "notifications": [
      {
        "change": "string",
        "date": "string",
        "details": "string",
        "name": "string",
        "read": true,
        "reason": "string",
        "userId": "string"
      }
    ],
    "orderCancellationRequest": "string",
    "paymentMethods": {
      "creditOrDebitCard": true,
      "debiCheck": true,
      "eft": true
    },
    "percFee": 0,
    "plans": [
      {
        "Id": "string",
        "amountDue": 0,
        "amountDueExcludingFee": 0,
        "automaticBilling": true,
        "benefactor": {
          "Id": "string",
          "email": "string",
          "name": "string"
        },
        "benefactorId": "string",
        "completed": true,
        "debicheckLastFailedReasons": [
          "string"
        ],
        "debicheckStatus": "string",
        "depositDue": 0,
        "depositDueExcludingFee": 0,
        "frequency": "WEEKLY",
        "offset": 0,
        "order": {},
        "orderId": "string",
        "payments": [
          {
            "Id": "string",
            "amount": 0,
            "amountExcludingFee": 0,
            "due": "string",
            "failed": true,
            "fee": 0,
            "paid": true,
            "paymentMethod": "string",
            "paymentType": "string",
            "pending": true,
            "reconciliated": true,
            "timestamp": 0
          }
        ],
        "quantity": 0,
        "timestamp": 0
      }
    ],
    "previewFee": "string",
    "products": [
      {
        "Id": "string",
        "amount": 0,
        "depositType": "string",
        "link": "http://example.com",
        "name": "string",
        "sku": "string"
      }
    ],
    "reference": "string",
    "state": "PARTIAL",
    "stateUpdatedAt": "string",
    "supplier": {
      "Id": "string",
      "email": "string",
      "name": "string"
    },
    "supplierId": "string",
    "timestamp": 0,
    "updatedAt": "string",
    "weeklyPayments": true
  },
  "orderId": "string",
  "payments": [
    {
      "Id": "string",
      "amount": 0,
      "amountExcludingFee": 0,
      "due": "string",
      "failed": true,
      "fee": 0,
      "paid": true,
      "paymentMethod": "string",
      "paymentType": "string",
      "pending": true,
      "reconciliated": true,
      "timestamp": 0
    }
  ],
  "quantity": 0,
  "timestamp": 0
}

Properties

Name Type Required Restrictions Description
Id string false none none
amountDue integer(int32) false none none
amountDueExcludingFee integer(int32) false none none
automaticBilling boolean false none none
benefactor modelPaymentPlanBenefactor false none none
benefactorId string false none none
completed boolean false none none
debicheckLastFailedReasons [string] false none none
debicheckStatus string false none none
depositDue integer(int32) false none none
depositDueExcludingFee integer(int32) false none none
frequency string false none none
offset integer(int32) false none none
order modelOrderResponse false none none
orderId string false none none
payments [modelPlan] false none none
quantity integer(int32) false none none
timestamp number(double) false none none

Enumerated Values

Property Value
frequency WEEKLY
frequency MONTHLY

modelPaymentPlanSettings

{
  "debiCheckMinimum": {
    "enabled": true,
    "value": 0
  },
  "defaultDepositType": {
    "depositType": "string",
    "enabled": true,
    "flat": 0,
    "percentage": 0
  },
  "editPaymentPlanSettings": true,
  "maxMonths": {
    "enabled": true,
    "value": 0
  },
  "minMonths": {
    "enabled": true,
    "value": 0
  },
  "orderExpiry": {
    "enabled": true,
    "value": 0
  },
  "paymentMethods": {
    "creditOrDebitCard": true,
    "debiCheck": true,
    "eft": true
  },
  "splitPayments": true,
  "weeklyPayments": true
}

Properties

Name Type Required Restrictions Description
debiCheckMinimum modelValueEnabledPair false none none
defaultDepositType modelDefaultDepositType false none none
editPaymentPlanSettings boolean false none none
maxMonths modelValueEnabledPair false none none
minMonths modelValueEnabledPair false none none
orderExpiry modelOrderExpiry false none none
paymentMethods modelPaymentMethod false none none
splitPayments boolean false none none
weeklyPayments boolean false none none

modelPaymentResponse

{
  "Id": "string",
  "amount": 0,
  "amountExcludingFee": 0,
  "due": "string",
  "failed": true,
  "fee": 0,
  "locked": true,
  "note": "string",
  "orderStatus": "string",
  "paid": true,
  "paymentMethod": "string",
  "paymentPlanId": "string",
  "paymentType": "string",
  "pending": true,
  "reference": "string",
  "timestamp": 0,
  "userId": "string",
  "verifyError": "string"
}

Properties

Name Type Required Restrictions Description
Id string false none none
amount integer(int32) false none none
amountExcludingFee integer(int32) false none none
due string false none none
failed boolean false none none
fee integer(int32) false none none
locked boolean false none none
note string false none none
orderStatus string false none none
paid boolean false none none
paymentMethod string false none none
paymentPlanId string false none none
paymentType string false none none
pending boolean false none none
reference string false none none
timestamp number(double) false none none
userId string false none none
verifyError string false none none

modelPaymentResponseMany

{
  "payments": [
    {
      "Id": "string",
      "amount": 0,
      "amountExcludingFee": 0,
      "due": "string",
      "failed": true,
      "fee": 0,
      "locked": true,
      "note": "string",
      "orderStatus": "string",
      "paid": true,
      "paymentMethod": "string",
      "paymentPlanId": "string",
      "paymentType": "string",
      "pending": true,
      "reference": "string",
      "timestamp": 0,
      "userId": "string",
      "verifyError": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
payments [modelPaymentResponse] false none none

{
  "enabled": true,
  "value": "string"
}

Properties

Name Type Required Restrictions Description
enabled boolean false none none
value string false none none

modelPlan

{
  "Id": "string",
  "amount": 0,
  "amountExcludingFee": 0,
  "due": "string",
  "failed": true,
  "fee": 0,
  "paid": true,
  "paymentMethod": "string",
  "paymentType": "string",
  "pending": true,
  "reconciliated": true,
  "timestamp": 0
}

Properties

Name Type Required Restrictions Description
Id string false none none
amount integer(int32) false none none
amountExcludingFee integer(int32) false none none
due string false none none
failed boolean false none none
fee integer(int32) false none none
paid boolean false none none
paymentMethod string false none none
paymentType string false none none
pending boolean false none none
reconciliated boolean false none none
timestamp number(double) false none none

modelPopulate

{
  "path": "string",
  "populate": {
    "path": "string",
    "select": "string"
  },
  "select": "string"
}

Properties

Name Type Required Restrictions Description
path string false none none
populate modelPopulateNested false none none
select string false none none

modelPopulateNested

{
  "path": "string",
  "select": "string"
}

Properties

Name Type Required Restrictions Description
path string false none none
select string false none none

modelProductCreateRequest

{
  "amount": 0,
  "depositType": "string",
  "description": "string",
  "link": "http://example.com",
  "name": "string",
  "sku": "string"
}

Properties

Name Type Required Restrictions Description
amount integer(int32) false none none
depositType string false none none
description string false none none
link string(uri) false none none
name string false none none
sku string false none none

modelProductResponse

{
  "Id": "string",
  "amount": 0,
  "depositType": "string",
  "link": "http://example.com",
  "name": "string",
  "sku": "string"
}

Properties

Name Type Required Restrictions Description
Id string false none none
amount integer(int32) false none none
depositType string false none none
link string(uri) false none none
name string false none none
sku string false none none

modelSettlementPayload

{
  "amount": 0,
  "batch": "string",
  "batchType": "string",
  "dateSettled": "string",
  "fees": 0,
  "merchantAccount": {
    "Id": "string",
    "absorbsFee": true,
    "accountType": "string",
    "active": true,
    "adminPercFee": 0,
    "amendmentOrder": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "autoSettlement": true,
    "bankDetails": {
      "accountNumber": "string",
      "accountType": "string",
      "bankName": "string",
      "branchCode": "string",
      "verified": true
    },
    "bankDetailsValidation": {
      "account": {
        "value": "string",
        "verified": true
      },
      "accountType": {
        "value": "string",
        "verified": true
      },
      "bankName": {
        "value": "string",
        "verified": true
      },
      "branchCode": {
        "value": "string",
        "verified": true
      },
      "cellNumber": {
        "value": "string",
        "verified": true
      },
      "clientName": {
        "value": "string",
        "verified": true
      },
      "email": {
        "value": "string",
        "verified": true
      },
      "idNumber": {
        "value": "string",
        "verified": true
      },
      "initials": {
        "value": "string",
        "verified": true
      },
      "verified": true
    },
    "bankValidationPendingReference": "string",
    "billingAddress": {
      "city": "string",
      "country": "string",
      "postalCode": "string",
      "province": "string",
      "streetAddress": "string"
    },
    "cancellationRequest": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "cancellationTerms": {
      "active": true,
      "definition": [
        {
          "end": 0,
          "gracePeriod": 0,
          "policy": {
            "definition": {
              "deposit": true,
              "flatFee": 0,
              "percentage": 0
            },
            "name": "Deposit"
          },
          "start": 0,
          "type": {
            "definition": {
              "missed": 0,
              "percentage": 0
            },
            "name": "string"
          }
        }
      ]
    },
    "cancelledOrder": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "completedOrder": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "completedOrder75": {
      "emails": [
        "string"
      ],
      "enabled": true,
      "value": 0
    },
    "contractDocumentId": "string",
    "contractUpdated": true,
    "contractUrl": "string",
    "customFeatures": {
      "imageUrl": {
        "enabled": true,
        "value": "string"
      },
      "logo": {
        "enabled": true,
        "value": "string"
      },
      "paymentWidget": {
        "enabled": true,
        "value": "string"
      }
    },
    "domain": "string",
    "expire": 0,
    "expiredOrder": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "failedPayment": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "features": {
      "enableAutoCancellation": true,
      "enableCreditCard": true,
      "enableCustomEmailLogo": true,
      "enableCustomWidgetLogo": true,
      "enableDebiCheck": true,
      "enableDefaultPaymentPlanImage": true,
      "enableInstantEFT": true,
      "enableManualCancellation": true
    },
    "flatFee": 0,
    "imageUrl": "string",
    "invoices": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "merchantBankingPercFee": 0,
    "merchantContractSigned": "string",
    "merchantName": "string",
    "merchantTermsLink": "string",
    "missedPayment": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "name": "string",
    "newOrder": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "notifyUrl": "string",
    "onboardingState": "string",
    "paymentNotifyUrl": "string",
    "paymentPlans": {
      "debiCheckMinimum": {
        "enabled": true,
        "value": 0
      },
      "defaultDepositType": {
        "depositType": "string",
        "enabled": true,
        "flat": 0,
        "percentage": 0
      },
      "editPaymentPlanSettings": true,
      "maxMonths": {
        "enabled": true,
        "value": 0
      },
      "minMonths": {
        "enabled": true,
        "value": 0
      },
      "orderExpiry": {
        "enabled": true,
        "value": 0
      },
      "paymentMethods": {
        "creditOrDebitCard": true,
        "debiCheck": true,
        "eft": true
      },
      "splitPayments": true,
      "weeklyPayments": true
    },
    "percFee": 0,
    "refunds": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "registeredEntity": "string",
    "settlementDay": 0,
    "settlementFrequency": "string",
    "settlementType": "string",
    "settlements": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "successfulPayment": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "supportEmail": "string",
    "supportMobile": "string",
    "timestamp": 0,
    "transfers": {
      "emails": [
        "string"
      ],
      "enabled": true
    },
    "users": [
      {
        "Id": "string",
        "active": true,
        "address": "string",
        "cellNumber": "string",
        "city": "string",
        "country": "string",
        "dateOfBirth": "string",
        "email": "[email protected]",
        "idNumber": "string",
        "merchantId": "string",
        "merchantRole": "string",
        "name": "string",
        "postalCode": "string",
        "province": "string",
        "role": "CLIENT",
        "username": "string",
        "verified": true,
        "verifiedEmail": true,
        "verifiedMobile": true
      }
    ],
    "vatNo": "string",
    "weeklyPayments": true
  },
  "merchantAccountId": "string",
  "merchantId": "string",
  "merchantUser": {
    "Id": "string",
    "active": true,
    "address": "string",
    "bankDetails": {
      "account": {
        "value": "string",
        "verified": true
      },
      "accountType": {
        "value": "string",
        "verified": true
      },
      "bankName": {
        "value": "string",
        "verified": true
      },
      "branchCode": {
        "value": "string",
        "verified": true
      },
      "cellNumber": {
        "value": "string",
        "verified": true
      },
      "clientName": {
        "value": "string",
        "verified": true
      },
      "email": {
        "value": "string",
        "verified": true
      },
      "idNumber": {
        "value": "string",
        "verified": true
      },
      "initials": {
        "value": "string",
        "verified": true
      },
      "verified": true
    },
    "bankValidationPendingReference": "string",
    "cellNumber": "string",
    "city": "string",
    "country": "string",
    "dateOfBirth": "string",
    "email": "[email protected]",
    "hasPassword": true,
    "idNumber": "string",
    "merchantId": "string",
    "merchantOnboarding": {
      "name": "string",
      "physicalAddress": {
        "city": "string",
        "country": "string",
        "postalCode": "string",
        "province": "string",
        "streetAddress": "string"
      }
    },
    "merchantRole": "string",
    "name": "string",
    "oneTimePass": "string",
    "postalCode": "string",
    "province": "string",
    "role": "CLIENT",
    "timestamp": 0,
    "username": "string",
    "verified": true,
    "verifiedEmail": true,
    "verifiedMobile": true
  },
  "payments": [
    {
      "Id": "string",
      "amount": 0,
      "amountExcludingFee": 0,
      "due": "string",
      "failed": true,
      "fee": 0,
      "locked": true,
      "note": "string",
      "orderStatus": "string",
      "paid": true,
      "paymentMethod": "string",
      "paymentPlanId": "string",
      "paymentType": "string",
      "pending": true,
      "reference": "string",
      "timestamp": 0,
      "userId": "string",
      "verifyError": "string"
    }
  ],
  "reconciled": true,
  "reference": "string",
  "settled": true
}

Properties

Name Type Required Restrictions Description
amount integer(int32) false none none
batch string false none none
batchType string false none none
dateSettled string false none none
fees integer(int32) false none none
merchantAccount modelMerchantResponse false none none
merchantAccountId string false none none
merchantId string false none none
merchantUser modelUserResponse false none none
payments [modelPaymentResponse] false none none
reconciled boolean false none none
reference string false none none
settled boolean false none none

modelSettlementResponseMany

{
  "settlements": [
    {
      "amount": 0,
      "batch": "string",
      "batchType": "string",
      "dateSettled": "string",
      "fees": 0,
      "merchantAccount": {
        "Id": "string",
        "absorbsFee": true,
        "accountType": "string",
        "active": true,
        "adminPercFee": 0,
        "amendmentOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "autoSettlement": true,
        "bankDetails": {
          "accountNumber": "string",
          "accountType": "string",
          "bankName": "string",
          "branchCode": "string",
          "verified": true
        },
        "bankDetailsValidation": {
          "account": {
            "value": "string",
            "verified": true
          },
          "accountType": {
            "value": "string",
            "verified": true
          },
          "bankName": {
            "value": "string",
            "verified": true
          },
          "branchCode": {
            "value": "string",
            "verified": true
          },
          "cellNumber": {
            "value": "string",
            "verified": true
          },
          "clientName": {
            "value": "string",
            "verified": true
          },
          "email": {
            "value": "string",
            "verified": true
          },
          "idNumber": {
            "value": "string",
            "verified": true
          },
          "initials": {
            "value": "string",
            "verified": true
          },
          "verified": true
        },
        "bankValidationPendingReference": "string",
        "billingAddress": {
          "city": "string",
          "country": "string",
          "postalCode": "string",
          "province": "string",
          "streetAddress": "string"
        },
        "cancellationRequest": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "cancellationTerms": {
          "active": true,
          "definition": [
            {
              "end": 0,
              "gracePeriod": 0,
              "policy": {
                "definition": {
                  "deposit": true,
                  "flatFee": 0,
                  "percentage": 0
                },
                "name": "Deposit"
              },
              "start": 0,
              "type": {
                "definition": {
                  "missed": 0,
                  "percentage": 0
                },
                "name": "string"
              }
            }
          ]
        },
        "cancelledOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "completedOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "completedOrder75": {
          "emails": [
            "string"
          ],
          "enabled": true,
          "value": 0
        },
        "contractDocumentId": "string",
        "contractUpdated": true,
        "contractUrl": "string",
        "customFeatures": {
          "imageUrl": {
            "enabled": true,
            "value": "string"
          },
          "logo": {
            "enabled": true,
            "value": "string"
          },
          "paymentWidget": {
            "enabled": true,
            "value": "string"
          }
        },
        "domain": "string",
        "expire": 0,
        "expiredOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "failedPayment": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "features": {
          "enableAutoCancellation": true,
          "enableCreditCard": true,
          "enableCustomEmailLogo": true,
          "enableCustomWidgetLogo": true,
          "enableDebiCheck": true,
          "enableDefaultPaymentPlanImage": true,
          "enableInstantEFT": true,
          "enableManualCancellation": true
        },
        "flatFee": 0,
        "imageUrl": "string",
        "invoices": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "merchantBankingPercFee": 0,
        "merchantContractSigned": "string",
        "merchantName": "string",
        "merchantTermsLink": "string",
        "missedPayment": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "name": "string",
        "newOrder": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "notifyUrl": "string",
        "onboardingState": "string",
        "paymentNotifyUrl": "string",
        "paymentPlans": {
          "debiCheckMinimum": {
            "enabled": true,
            "value": 0
          },
          "defaultDepositType": {
            "depositType": "string",
            "enabled": true,
            "flat": 0,
            "percentage": 0
          },
          "editPaymentPlanSettings": true,
          "maxMonths": {
            "enabled": true,
            "value": 0
          },
          "minMonths": {
            "enabled": true,
            "value": 0
          },
          "orderExpiry": {
            "enabled": true,
            "value": 0
          },
          "paymentMethods": {
            "creditOrDebitCard": true,
            "debiCheck": true,
            "eft": true
          },
          "splitPayments": true,
          "weeklyPayments": true
        },
        "percFee": 0,
        "refunds": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "registeredEntity": "string",
        "settlementDay": 0,
        "settlementFrequency": "string",
        "settlementType": "string",
        "settlements": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "successfulPayment": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "supportEmail": "string",
        "supportMobile": "string",
        "timestamp": 0,
        "transfers": {
          "emails": [
            "string"
          ],
          "enabled": true
        },
        "users": [
          {
            "Id": "string",
            "active": true,
            "address": "string",
            "cellNumber": "string",
            "city": "string",
            "country": "string",
            "dateOfBirth": "string",
            "email": "[email protected]",
            "idNumber": "string",
            "merchantId": "string",
            "merchantRole": "string",
            "name": "string",
            "postalCode": "string",
            "province": "string",
            "role": "CLIENT",
            "username": "string",
            "verified": true,
            "verifiedEmail": true,
            "verifiedMobile": true
          }
        ],
        "vatNo": "string",
        "weeklyPayments": true
      },
      "merchantAccountId": "string",
      "merchantId": "string",
      "merchantUser": {
        "Id": "string",
        "active": true,
        "address": "string",
        "bankDetails": {
          "account": {
            "value": "string",
            "verified": true
          },
          "accountType": {
            "value": "string",
            "verified": true
          },
          "bankName": {
            "value": "string",
            "verified": true
          },
          "branchCode": {
            "value": "string",
            "verified": true
          },
          "cellNumber": {
            "value": "string",
            "verified": true
          },
          "clientName": {
            "value": "string",
            "verified": true
          },
          "email": {
            "value": "string",
            "verified": true
          },
          "idNumber": {
            "value": "string",
            "verified": true
          },
          "initials": {
            "value": "string",
            "verified": true
          },
          "verified": true
        },
        "bankValidationPendingReference": "string",
        "cellNumber": "string",
        "city": "string",
        "country": "string",
        "dateOfBirth": "string",
        "email": "[email protected]",
        "hasPassword": true,
        "idNumber": "string",
        "merchantId": "string",
        "merchantOnboarding": {
          "name": "string",
          "physicalAddress": {
            "city": "string",
            "country": "string",
            "postalCode": "string",
            "province": "string",
            "streetAddress": "string"
          }
        },
        "merchantRole": "string",
        "name": "string",
        "oneTimePass": "string",
        "postalCode": "string",
        "province": "string",
        "role": "CLIENT",
        "timestamp": 0,
        "username": "string",
        "verified": true,
        "verifiedEmail": true,
        "verifiedMobile": true
      },
      "payments": [
        {
          "Id": "string",
          "amount": 0,
          "amountExcludingFee": 0,
          "due": "string",
          "failed": true,
          "fee": 0,
          "locked": true,
          "note": "string",
          "orderStatus": "string",
          "paid": true,
          "paymentMethod": "string",
          "paymentPlanId": "string",
          "paymentType": "string",
          "pending": true,
          "reference": "string",
          "timestamp": 0,
          "userId": "string",
          "verifyError": "string"
        }
      ],
      "reconciled": true,
      "reference": "string",
      "settled": true
    }
  ]
}

Properties

Name Type Required Restrictions Description
settlements [modelSettlementPayload] false none none

modelStatementRequest

{
  "email": "string",
  "orderId": "string",
  "type": "string"
}

Properties

Name Type Required Restrictions Description
email string false none none
orderId string false none none
type string false none none

modelStatementRequestResponse

{
  "success": true
}

Properties

Name Type Required Restrictions Description
success boolean false none none

modelUser

{
  "Id": "string",
  "active": true,
  "address": "string",
  "cellNumber": "string",
  "city": "string",
  "country": "string",
  "dateOfBirth": "string",
  "email": "[email protected]",
  "idNumber": "string",
  "merchantId": "string",
  "merchantRole": "string",
  "name": "string",
  "postalCode": "string",
  "province": "string",
  "role": "CLIENT",
  "username": "string",
  "verified": true,
  "verifiedEmail": true,
  "verifiedMobile": true
}

This user is loaded in by the authentication middleware.

Properties

Name Type Required Restrictions Description
Id string false none none
active boolean false none none
address string false none none
cellNumber string false none none
city string false none none
country string false none none
dateOfBirth string false none none
email string(email) false none none
idNumber string false none none
merchantId string false none none
merchantRole string false none none
name string false none none
postalCode string false none none
province string false none none
role string false none none
username string false none none
verified boolean false none none
verifiedEmail boolean false none none
verifiedMobile boolean false none none

Enumerated Values

Property Value
role CLIENT
role MERCHANT
role ADMIN

modelUserResponse

{
  "Id": "string",
  "active": true,
  "address": "string",
  "bankDetails": {
    "account": {
      "value": "string",
      "verified": true
    },
    "accountType": {
      "value": "string",
      "verified": true
    },
    "bankName": {
      "value": "string",
      "verified": true
    },
    "branchCode": {
      "value": "string",
      "verified": true
    },
    "cellNumber": {
      "value": "string",
      "verified": true
    },
    "clientName": {
      "value": "string",
      "verified": true
    },
    "email": {
      "value": "string",
      "verified": true
    },
    "idNumber": {
      "value": "string",
      "verified": true
    },
    "initials": {
      "value": "string",
      "verified": true
    },
    "verified": true
  },
  "bankValidationPendingReference": "string",
  "cellNumber": "string",
  "city": "string",
  "country": "string",
  "dateOfBirth": "string",
  "email": "[email protected]",
  "hasPassword": true,
  "idNumber": "string",
  "merchantId": "string",
  "merchantOnboarding": {
    "name": "string",
    "physicalAddress": {
      "city": "string",
      "country": "string",
      "postalCode": "string",
      "province": "string",
      "streetAddress": "string"
    }
  },
  "merchantRole": "string",
  "name": "string",
  "oneTimePass": "string",
  "postalCode": "string",
  "province": "string",
  "role": "CLIENT",
  "timestamp": 0,
  "username": "string",
  "verified": true,
  "verifiedEmail": true,
  "verifiedMobile": true
}

Properties

Name Type Required Restrictions Description
Id string false none none
active boolean false none none
address string false none none
bankDetails modelBankInfo false none none
bankValidationPendingReference string false none none
cellNumber string false none none
city string false none none
country string false none none
dateOfBirth string false none none
email string(email) false none none
hasPassword boolean false none none
idNumber string false none none
merchantId string false none none
merchantOnboarding modelMerchantOnboarding false none none
merchantRole string false none none
name string false none none
oneTimePass string false none none
postalCode string false none none
province string false none none
role string false none none
timestamp number(double) false none none
username string false none none
verified boolean false none none
verifiedEmail boolean false none none
verifiedMobile boolean false none none

Enumerated Values

Property Value
role CLIENT
role MERCHANT
role ADMIN

modelUserResponseMany

{
  "users": [
    {
      "Id": "string",
      "active": true,
      "address": "string",
      "bankDetails": {
        "account": {
          "value": "string",
          "verified": true
        },
        "accountType": {
          "value": "string",
          "verified": true
        },
        "bankName": {
          "value": "string",
          "verified": true
        },
        "branchCode": {
          "value": "string",
          "verified": true
        },
        "cellNumber": {
          "value": "string",
          "verified": true
        },
        "clientName": {
          "value": "string",
          "verified": true
        },
        "email": {
          "value": "string",
          "verified": true
        },
        "idNumber": {
          "value": "string",
          "verified": true
        },
        "initials": {
          "value": "string",
          "verified": true
        },
        "verified": true
      },
      "bankValidationPendingReference": "string",
      "cellNumber": "string",
      "city": "string",
      "country": "string",
      "dateOfBirth": "string",
      "email": "use[email protected]",
      "hasPassword": true,
      "idNumber": "string",
      "merchantId": "string",
      "merchantOnboarding": {
        "name": "string",
        "physicalAddress": {
          "city": "string",
          "country": "string",
          "postalCode": "string",
          "province": "string",
          "streetAddress": "string"
        }
      },
      "merchantRole": "string",
      "name": "string",
      "oneTimePass": "string",
      "postalCode": "string",
      "province": "string",
      "role": "CLIENT",
      "timestamp": 0,
      "username": "string",
      "verified": true,
      "verifiedEmail": true,
      "verifiedMobile": true
    }
  ]
}

Properties

Name Type Required Restrictions Description
users [modelUserResponse] false none none

modelValueEnabledPair

{
  "enabled": true,
  "value": 0
}

Properties

Name Type Required Restrictions Description
enabled boolean false none none
value integer(int32) false none none

modelWebHookBody

{
  "orderId": "string",
  "orderRef": "string",
  "paymentId": "string"
}

Properties

Name Type Required Restrictions Description
orderId string false none none
orderRef string false none none
paymentId string false none none

modelWebHookPayload

{
  "body": {
    "orderId": "string",
    "orderRef": "string",
    "paymentId": "string"
  },
  "type": "ORDERPLACED"
}

Properties

Name Type Required Restrictions Description
body modelWebHookBody false none none
type string false none none

Enumerated Values

Property Value
type ORDERPLACED
type ORDERCOMPLETED
type ORDERCANCELLED
type ORDERAMENDED
type PAYMENTSUCCESSFUL
type PAYMENTFAILED

publicModelMerchantRequest

{
  "domain": "string",
  "name": "string",
  "notifyUrl": "string"
}

Properties

Name Type Required Restrictions Description
domain string false none none
name string false none none
notifyUrl string false none none