Skip to content

API Reference

This reference section provides in-depth integration details of the TLPE API.

Environments

There are two environments of TLPE: TEST and LIVE.

Environment URL
TEST https://test-api.tlpe.io
LIVE https://api.tlpe.io

Security/Authentication

All requests must be sent over SSL.

All requests are authenticated against an Authorization header with an access token and IP whitelisting.

Versioning

All changes made to the API are backwards compatible, hence any major features that are
released, that would otherwise break existing implementations, will be released using a new
version.

HTTP Status Codes

For each request you send to our API the HTTP status code of the response will already tell you
the basic result.

Status Description
200 Successful request
400 Bad request. This might either point to a malformed syntax or values sent that cannot be understood by the system.
401 Unauthorized. Invalid authorization header provided, or IP not whitelisted.
403 Forbidden. Invalid access token provided or accessing restricted URL.
404 Not found. Requested resource or endpoint is not found. i.e., Endpoint/URL does not exist or has expired. This can also be caused by typographical errors.
422 Unprocessable Entity. Caused by invalid parameter values being sent.
500 Internal Server Error. A system errors.
503 Service Unavailable. Indicates that a server is not ready to handle the request.

For payments and transaction related, more fine-grained information to find out why a payment failed can be found in the response and error messages.

JSON Web Token (JWT) Payload Signing

JWT (JSON Web Token) is a compact, URL-safe token format used to securely transmit information between services as a JSON object. A JWT consists of a header, payload, and signature to ensure data integrity.
Checkout, Direct Payment, Card Registration, and Schedule request payloads must be encapsulated within a JWT. Inside the payload, claims are the information used to convey data needed for authentication, authorization, and validation. The claims and its values are case-sensitive.

TLPE requires that the JWT payload must contain the following claims:

Claim Required? Description Value
exp Required Expiration time which defines when the token expires (Unix timestamp). 3 minutes
path Required Restricts the token to a specific API endpoint (/checkout). Endpoint of the request, could either be the following:

/checkout
/payment
/card-registration
/schedule

Please note that this value is case-sensitive.
method Required Limits the allowed HTTP method. Method of the request (e.g., POST)

Please note that this value is case-sensitive.
jti Required A unique identifier for the token. Random UUID
data Required Contains the transaction request body. See API Reference > Transaction Body Payload Data

Finally, the payload must be signed using the secret issued to the merchant. If any required claims are missing or invalid, the request will be rejected with an unauthorized response . Below is an example of the final payload.

{
  "exp": 1780288691,
  "path": "/checkout",
  "jti": "2a174025-6ae2-4d6d-956e-e0a60c0e6f6d",
  "method": "POST",
  "data": {
    "time_offset": "+08:00",
    "customer_ip_address": "0.0.0.0",
    "customer": {
      "first_name": "Abel",
      "last_name": "Maclead",
      "billing_address":{
            "line1":"#88",
            "line2":"Boston Ave",
            "city_municipality":"Philadelphia",
            "zip":"19132",
            "state_province_region":"PA",
            "country_code":"US"
         },
         "shipping_address":{
            "line1":"#88",
            "line2":"Boston Ave",
            "city_municipality":"Philadelphia",
            "zip":"19132",
            "state_province_region":"PA",
            "country_code":"US"
         },
      "contact": {
        "email": "amaclead@domain.com",
        "mobile": "+6391234567"
      }
    },
    "payment": {
      "description": "Test transaction",
      "amount": "10",
      "currency": "USD",
      "option": "{generatedOptionKey}"
      "merchant_reference_id":"INV-100001_TEST",
      "other_references":[
            "REF1", "REF2"
      ]
    },
    "route":{
         "callback_url":"https://tlpe.io/thankyou",
         "notify_user":true
    }
    "time_offset":"+08:00"

  }
}

JWT Signing Samples

string GenerateJwt(string path, string dataJson){


    var key = new      SymmetricSecurityKey(Encoding.UTF8.GetBytes("your_secret_key"));
    var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);

    var claims = new[]
    {
        new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()),
        new Claim("path", path),
        new Claim("method", "POST"),
        new Claim("data", dataJson)
    };

    var token = new JwtSecurityToken(
        claims: claims,
        expires: DateTime.UtcNow.AddMinutes(3),
        signingCredentials: creds
    );

    return new JwtSecurityTokenHandler().WriteToken(token);
}
Function GenerateJwt(path As String, dataJson As String) As String
    Dim key = New SymmetricSecurityKey(Encoding.UTF8.GetBytes("your_secret_key"))
    Dim creds = New SigningCredentials(key, SecurityAlgorithms.HmacSha256)

    Dim claims = {
        New Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()),
        New Claim("path", path),
        New Claim("method", "POST"),
        New Claim("data", dataJson)
    }

    Dim token = New JwtSecurityToken(
        claims:=claims,
        expires:=DateTime.UtcNow.AddMinutes(3),
        signingCredentials:=creds
    )

    Return New JwtSecurityTokenHandler().WriteToken(token)
End Function
def generate_jwt(path, data):
    payload = {
        "exp": int(time.time()) + (3 * 60),
        "path": path,
        "jti": str(uuid.uuid4()),
        "method": "POST",
        "data": data
    }

    return jwt.encode(payload, "your_secret_key", algorithm="HS256")
<?php
use Firebase\JWT\JWT;

function generateJwt($path, $data) {
    $payload = [
        "exp" => time() + (3 * 60),
        "path" => $path,
        "jti" => uniqid(),
        "method" => "POST",
        "data" => $data
    ];

    return JWT::encode($payload, "your_secret_key", 'HS256');
}
def generate_jwt(path, data)
  payload = {
    exp: Time.now.to_i + (3 * 60),
    path: path,
    jti: SecureRandom.uuid,
    method: "POST",
    data: data
  }

  JWT.encode(payload, "your_secret_key", "HS256")
end
const jwt = require("jsonwebtoken");
const crypto = require("crypto");

function generateJwt(path, data) {
  const payload = {
    exp: Math.floor(Date.now() / 1000) + (3 * 60),
    path: path,
    jti: crypto.randomUUID(),
    method: "POST",
    data: data
  };

  return jwt.sign(payload, "your_secret_key");
}

Transaction Body Payload Data

Parameter Name Required? Description Format
credit_card Conditional1 Customer card information that is only required for direct or server-to-server integration. Refer to Card Data table
first_name Required Customer's first name Alphabet, hyphen, period, spaces {1-50}
last_name Required Customer's last name Alphabet, hyphen, period, spaces {1-50}
billing_address Required Address where the transaction will be billed Refer to Billing Address Data table
shipping_address Optional Address where the items will be delivered Refer to Shipping Address Data table
contact Required Customer's contact information Refer to Contact Data table
payment Required Transaction related information Refer to Payment Data table
route Required Integrator and customer communication Refer to Route Data table
3d_secure Conditional2 Contains device footprint and is only required for card brands and Refer to 3D Secure Data table
time_offset Required Client time zone ±[HH]:[MM]
customer_ip_address Conditional3 Client IP Address IP Address

¹credit_card object is required for direct or server-to-server integration
²3d_secure object is required for direct or server-to-server integration that is 3ds 2.0 enabled account
3parameter may be required for some integration or payment brands

Disbursement Body Payload Data

Parameter Name Required? Description Format
customer Required Customer or requester information of the transaction Refer to Transaction Body Payload Data table
payment Required Transaction related information Refer to Payment Data table
payment_instructions Required Beneficiary account information where the funds will be sent Refer to Payment Instructions Data table
route Required Integrator and customer communication Refer to Route Data table
transaction_compliance Conditional1 Sender and beneficiary information required for compliance Refer to Transaction Compliance Data table
time_offset Required Client time zone ±[HH]:[MM]
customer_ip_address Conditional2 Client IP Address IP Address

Payment Instructions

VEEM Facility

Parameter Name Required? Description Format
sub_industry Required Sub-industry classification of the beneficiary Alphanumeric {1-50}
entity Required Entity type of the beneficiary account PersonalUse, BusinessUse
tax_id Required Tax identification number of the beneficiary Numeric, hyphen {9}
bank_country Required 2-digit country code of the beneficiary bank ISO 3166-1 Alpha-2 code
routing_number Required Routing number of the beneficiary bank Numeric {9}

ZEN Facility

Parameter Name Required? Description Format
bic Conditional1 Bank identifier code of the beneficiary bank Alphanumeric
routing_code Conditional1 Routing code of the beneficiary bank Alphanumeric
routing_code_type Conditional2 Type of the routing code provided in routing_code Alphanumeric
purpose_code Conditional3 Purpose of the transaction, from the country-specific Purpose Codes table Refer to Purpose Codes table

1either bic or routing_code is required
2routing_code_type is required when routing_code is provided
3purpose_code is required when the beneficiary's country is AE, BH, or CN

Purpose Codes

AE (United Arab Emirates)

Code Description
FAM Family Support
GDE Goods sold
GDI Goods bought
GMS Fees for repair and maintenance services
OAT Own account transfer
SAL Salary
STR Travel
TTS Technical trade-related and other business services
UTL Utility Bill Payments

BH (Bahrain)

Code Description
AFA Own account transfer
FAM Family Support
GDE Goods sold
GDI Goods bought
GMS Fees for repair and maintenance services
SAL Salary
STR Travel
TTS Technical trade-related and other business services

CN (China)

Code Description
CTF Cross-border capital transfer
GOD Cross-border goods trade
OTF Other transfers
STR Cross-border service trade

AE and BH share most purpose codes (FAM, GDE, GDI, GMS, SAL, STR, TTS). AE additionally accepts OAT and UTL, and BH additionally accepts AFA. CN uses a separate cross-border code set (CTF, GOD, OTF, STR) that does not overlap with the AE or BH list.

Transaction Compliance Data

Parameter Name Required? Description Format
transaction_type Required Type of transaction between sender and beneficiary C2C, C2B, B2C, B2B
nature Required Nature of the transaction Alphanumeric {1-100}
sender Required Information of the sender of funds Refer to Sender Data table
beneficiary Required Information of the beneficiary of funds Refer to Beneficiary Data table

Sender Data

Parameter Name Required? Description Format
name Required Name of the sender Refer to Name Data table
birth_date Conditional1 Birth date of the sender YYYY-MM-DD
incorporation_date Conditional1 Incorporation date of the sender's business YYYY-MM-DD
place_of_birth Optional Place of birth of the sender Alphanumeric {1-100}
nationality Required Nationality of the sender Alphabet {1-50}
nature_of_business_or_employment Optional Business or employment of the sender Alphanumeric {1-100}
contact Required Contact information of the sender Refer to Contact Data table
identification Required Government-issued identification of the sender Refer to Identification Data table
present_address Required Present address of the sender Refer to Billing Address Data table
permanent_address Conditional2 Permanent address of the sender Refer to Billing Address Data table
is_same_as_present_address Optional Flag if permanent address is the same as present address true or false
source_of_funds Required Source of the funds being sent Alphanumeric {1-100}
purpose Required Purpose of the transaction Alphanumeric {1-100}
relationship_with_beneficiary Required Relationship of the sender with the beneficiary Alphanumeric {1-50}

1birth_date is required for individual sender and incorporation_date is required for business sender
2permanent_address is required if is_same_as_present_address is false

Beneficiary Data

Parameter Name Required? Description Format
beneficiary_type Required Type of beneficiary C2C, C2B, B2C, B2B
name Required Name of the beneficiary Refer to Name Data table
birth_date Conditional1 Birth date of the beneficiary YYYY-MM-DD
incorporation_date Conditional1 Incorporation date of the beneficiary's business YYYY-MM-DD
place_of_birth Optional Place of birth of the beneficiary Alphanumeric {1-100}
nationality Required Nationality of the beneficiary Alphabet {1-50}
nature_of_business_or_employment Optional Business or employment of the beneficiary Alphanumeric {1-100}
contact Required Contact information of the beneficiary Refer to Contact Data table
present_address Required Present address of the beneficiary Refer to Billing Address Data table
permanent_address Conditional2 Permanent address of the beneficiary Refer to Billing Address Data table
is_same_as_present_address Optional Flag if permanent address is the same as present address true or false
account Required Account of the beneficiary where the funds will be credited Refer to Beneficiary Account Data table

1birth_date is required for individual beneficiary and incorporation_date is required for business beneficiary
2permanent_address is required if is_same_as_present_address is false

Name Data

Parameter Name Required? Description Format
prefix Optional Name prefix Alphabet, period {1-10}
first_name Required First name Alphabet, hyphen, period, spaces {1-50}
middle_name Optional Middle name Alphabet, hyphen, period, spaces {1-50}
last_name Required Last name Alphabet, hyphen, period, spaces {1-50}
suffix Optional Name suffix Alphabet, period {1-10}
business_name Conditional1 Registered business name Alphanumeric, special characters {1-100}

1business_name is required for business sender or beneficiary

Identification Data

Parameter Name Required? Description Format
identification_type Required Type of identification presented Alphanumeric {1-50}
identification_number Required Identification number Alphanumeric {1-50}
issuing_authority Required Authority that issued the identification Alphanumeric {1-100}
issue_date Optional Date the identification was issued YYYY-MM-DD
expiry_date Optional Date the identification expires YYYY-MM-DD

Beneficiary Account Data

Parameter Name Required? Description Format
account_type Required Type of account Bank or E-Wallet
account_name Required Name registered to the account Alphabet, hyphen, period, spaces {1-100}
account_number Required Account number Alphanumeric {1-50}
bank_name Required Name of the bank or e-wallet Alphanumeric {1-100}
branch_name Optional Branch name of the bank Alphanumeric {1-100}
branch_address Optional Branch address of the bank Alphanumeric, special characters {1-200}

Card Data

Parameter Name Required? Description Format
card_holder_name Required Full name of card holder Alphabet
number Required Card number detail Numeric {15-16}
expiration_month Required Month of card expiration Numeric {2}
expiration_year Required Year of card expiration Numeric {2}
cvv Required Card security code Numeric {3-4}

Route Data

Parameter Name Required? Description Format
callback_url Conditional1 Integrator’s URL where customer will be redirected after payment https://{domain}/{path}
notify_user Optional Flag for sending email to customer true or false

¹callback_url is required for checkout payment integration and direct or server-to-server integration
with 3ds enabled accounts

Billing Address Data

Parameter Name Required? Description Format
line1 Required House/Lot No., Building, Street Alphanumeric, special characters {1-80}
line2 Required Area, District, or additional address line Alphanumeric, special characters {1-80}
city_municipality Required City address Alphanumeric {1-60}
zip Required Postal code Alphanumeric, hyphen, period {1-10}
state_province_region Required State, province, or region Alphanumeric {1-40}
country_code Required 2-digit country code ISO 3166-1 Alpha-2 code

Shipping Address Data

Parameter Name Required? Description Format
line1 Required Billing/Shipping Address line 1 Alphanumeric, special characters {1-80}
line2 Required Billing/Shipping Address line 2 Alphanumeric, special characters {1-80}
city_municipality Required Billing/Shipping city or municipality address Alphanumeric {1-60}
zip Required Billing/Shipping zip code Alphanumeric, hyphen, period {1-10}
state_province_region Required Billing/Shipping state, province, or region Alphanumeric {1-40}
country_code Required Billing/Shipping country 2-digit code ISO 3166-1 Alpha-2 code

Contact Data

Parameter Name Required? Description Format
email Required Customer's email address Valid email address
mobile Conditional1 Customer's mobile number Numeric

¹some payment methods or connectors requires mobile number

Schedule

The schedule data defines time at which the recurring payment is scheduled using CRON expression-like format. Each field specifies each component of the time and date when the payment is made.

    {
    "schedule": {
        "second": "0",        // start of the minute
        "minute": "0",        // start of the hour
        "hour": "0",          // start of the day or midnight
        "day_of_week": "?",   // ignore the day of the week
        "day_of_month": "17", // on the 17th of the month
        "month": "*"          // every month
        }
    }

The schedule above runs at exactly 12 AM or midnight on the 17th day every month.

Parameter Name Required? Description Format
second Required Second of the minute the schedule runs Numeric, *, ranges, steps, lists {0–59}
minute Required Minute of the hour the schedule runs Numeric, *, ranges, steps, lists {0–59}
hour Required Hour of the day the schedule runs Numeric, *, ranges, steps, lists {0–23}
day_of_week Required Day of the week the schedule runs Numeric, day names, *, ?, ranges, steps, lists, L {0–7 / SUN–SAT}
day_of_month Required Day of the month the schedule runs Numeric, *, ?, ranges, steps, lists, L, W {1–31}
month Required Month of the year the schedule runs Numeric, month names, *, ranges, steps, lists {1–12 / JAN–DEC}

CRON Symbols

Symbol Description Example
* For every time unit. * in the minute field indicates that the payment will be made every minute.
? “?” in day_of_month or day_of_week means “no specific value” and ignores the field. “?” in the day_of_week field indicates the payment will be made any day of the week.
- Determines a range of values. 10-15 in the hour field indicates the payment will be made between the 10th and 15th hours.
, Determines multiple values. MON, WED, FRI in the day_of_week field indicates the payment will be made on Monday, Wednesday, and Friday.
/ Determines incremental values. 5/15 in the minute field indicates the payment will be made on 5, 20, 35, and 50 minutes in an hour.
L Used in day_of_month and day_of_week fields; indicates the last day of the month or the last occurrence of the specified weekday in a month. Supports offset values. L in day_of_month – the last day of the month, e.g., January 31 or February 28/29.
# Determines the “N-th” occurrence of a weekday of the month. , format: DAY_OF_THE_WEEK#OCCURRENCE_NUMBER 5#3 in day_of_week means the third Friday of the month.

Payment Data

Parameter Name Required? Description Format
description Optional Transaction or item description Alphanumeric {1-200}
amount Required Transaction amount Decimal number
currency Required 3-digit currency code ISO 4217 standard
option Required Generated token from /options endpoint Alphanumeric (token)
merchant_reference_id Required Integrator’s own reference number Alphanumeric {1-45}
other_references Optional Integrator’s other reference number/s Alphanumeric {1-45}

3D Secure Data

The following parameters should be coming from the device footprint where the transaction is being processed.

Parameter Name Required? Format
timezone Conditional1 ±[HH][MM]
browser_color_depth Required Numeric
browser_language Required Alphanumeric, special characters
browser_screen_height Required Numeric
browser_screen_width Required Numeric
os Required Alphanumeric
browser_accept_header Required Alphanumeric, special characters
user_agent Required Alphanumeric, special characters
browser_javascript_enabled Required true or false
browser_java_enabled Required true or false
accept_content Required Alphanumeric, special characters

¹some payment methods or connectors requires this in the request payload.
with 3ds enabled accounts

Notify Status Payload Body Claims

Parameter Name Description
iss Issuer – claim identifies the principal that issued the JWT
sub Subject – claim identifies the principal that is the subject of the JWT
aud Audience – claim identifies the recipients that the JWT is intended for
exp Expiration Time – claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing
iat Issued at – claim identifies the time at which the JWT was issued
jti JWT ID – claim provides a unique identifier for the JWT
first_name Customer’s first name provided for the transaction
last_name Customer’s last name provided for the transaction
email Customer’s email provided for the transaction
mobile Customer's contact number provided for the transaction
billing_address Address where the transaction will be billed
shipping_address Address where the transaction will be shipped
amount Total amount of transaction
currency Currency of the transaction
option Payment option used to pay for the transaction
description Transaction or item description
merchant_reference_id Integrator provided reference number of the transaction
other_references Integrator provided reference number of the transaction
status_code Status code of the payment transaction
message Status message of the payment transaction
timestamp Date and time of the payment for the transaction in UTC
transaction_id TLPE generated transaction reference number
custom_parameters Other custom parameters passed for the transaction

Response Status Codes

Status Code Description
OK.00.00 Payment Successful
OK.00.10 Payment Pending
OK.01.00 Waiting for payment (Checkout)
OK.02.00 Full Refund Successful
OK.02.10 Full Refund Pending
OK.03.00 Full Refund Waiting
OK.04.00 Partial Refund Successful
OK.04.10 Partial Refund Pending
OK.05.00 Partial Refund Waiting
OK.06.00 Reversal Successful
OK.06.10 Reversal Pending
OK.07.00 Reversal Waiting
OK.08.10 Preauthorization Pending
OK.08.00 Preauthorization Successful
OK.09.00 Capture Successful
OK.11.10 Card registration pending
OK.11.20 Card registration deletion successful
OK.12.00 Payment scheduling successful
OK.12.10 Payment schedule deletion successful
OK.13.00 Disbursement Successful
OK.13.10 Waiting for disbursement
OK.13.20 Disbursement Pending

Error Codes

Error Code Description
ER.00.00 Payment Failed
ER.01.00 Internal Error
ER.01.10 Internal unauthorized
ER.01.20 Internal bad request
ER.01.30 Internal invalid request
ER.01.40 Internal timeout
ER.02.00 Client Error
ER.02.10 Client unauthorized
ER.02.20 Client bad request
ER.02.30 Client invalid request
ER.02.40 Client timeout
ER.03.00 Server Error
ER.03.10 Server unauthorized
ER.03.20 Server bad request
ER.03.30 Server invalid request
ER.03.40 Server timeout
ER.20.00 Refund Failed
ER.20.10 Transaction not refundable
ER.20.20 Transaction already refunded
ER.20.30 Invalid refund amount
ER.20.40 Maximum refund request count exceeded
ER.20.50 Transaction has pending refunds
ER.20.60 Insufficient refundable amount
ER.30.00 Reversal Failed
ER.30.10 Transaction not reversable
ER.30.20 Transaction already reversed
ER.40.00 Preauthorization Failed
ER.70.00 Card registration failed
ER.70.10 Card registration deletion failed
ER.80.00 Payment scheduling failed
ER.80.10 Payment schedule deletion failed
ER.90.00 Disbursement Failed

Test Cards

Card Brand Card Number Card Expiry CVV
American Express 3411 111111 11111 Any future date 1234
China UnionPay 6250947000000014

Mobile #: +852 11112222
Any future date 123

SMS Code: 111111/123456
MasterCard 5105 1051 0510 5100 Any future date Any 3-digit code
MasterCard (3D) 5204 2427 5008 5996 Any future date Any 3-digit code
Visa 4111 1111 1111 1111 Any future date Any 3-digit code
Visa (3D) 4000 0000 0000 1091 Any future date Any 3-digit code
Visa (3D2) 4200 0000 0000 0000 Any future date Any 3-digit code
Diners Club International 3696 190300 0009 Future date 123
Discover Card Network 6011492100005191 Future date 123

Postman Collection

Collection Endpoint
TLPE Integration /Options
TLPE Integration /Checkout
TLPE Integration /Payment
TLPE Integration /EPL
TLPE Integration /Refund
TLPE Integration /Sync
TLPE Integration /All