Skip to content

Easy Payment Link

Easy Payment Link is an option for connecting parties to utilize for a seamless, quick, and secure
payment acceptance implementation.

Payment link has two types, the STATIC and DYNAMIC strategy.

Static Payment Link


Static Payment Link is a unique URL which can be sent out to customers to accept payment
directly when accessed, without the need to integrate. TLPE provides the ease of use by
providing a customize-able input field names and company logo.

Post Direct Payment Erroneous Response Parameters!

Dynamic Payment Link


Dynamic Payment Link requires minimal integration to create a payment form. Send the request
body parameters via POST to the unique payment URL.

POST/{paymentLink}

RESPONSE SCHEMA: application/json

customer
object
Contains transaction-related response

first_name
string
Customer's first name

last_name
string
Customer's last name

contact
string
Customer's contact information

mobile
string
Customer's mobile number

email
string
Customer's email address

billing_address
object
Customer address where the transaction will be billed

line1
string
House/Lot No., building, street

line2
string
Area, district, or barangay

city_municipality
string
City or municipality address

zip
string
Postal code

state_province_region
string
State, province, or region

country_code
string
2-letter country code (ISO3166-1 Alpha-2)

payment
object
Transaction information

merchant_reference_id
string
Integrator’s own reference number. Must be unique in every request.

currency
string
3-letter currency code (ISO 4217 standard)

amount
string
Transaction amount in two decimal places

description
string
Transaction or item description

route
object
HTTP status code message/description

callback_url
string
Integrator’s URL where customers will be redirected after payment. URL parameter transaction_id will be appended.

notify_user
string
Flag for sending email to customer

key
string
Unique identifier of integrator

See API Reference > Transaction Body Payload Data for a guided requirement.

Note

Above fields are the default request body, but integrator can customize fields to be filled by the
system and to be filled by customer in the payment page to be generated.
Customization must be coordinated with the support to be implemented.

Request Samples

curl
    -X POST "{paymentLink}" \
    -H "Content-Type: application/json" \
    -d "{
            "customer":{
                "first_name":"Abel",
                "last_name":"Maclead",
                "billing_address":{
                    "line1":"#88",
                    "line2":"5 Boston Ave",
                    "city_municipality":"Philadelphia",
                    "zip":"19132",
                    "state_province_region":"PA",
                    "country_code":"US"
                },
                "contact":{
                    "email":"amaclead@domain.com",
                    "mobile":"+1415552671"
                }
            },
            "payment":{
                "description":"Payment for a product",
                "amount":1000.50,
                "currency":"USD",
                "merchant_reference_id":"INV-100001_TEST"
            },
            "route":{
                "callback_url":"https://tlpe.io/thankyou",
                "notify_user":true
            },
            "key":"{authorizationToken}"
        }"
public Dictionary<string, dynamic> EPL()
    {
        Dictionary<string, dynamic> responseData;
        string payload = "{\"customer\":{" +
            "\"first_name\":\"Abel\"," +
            "\"last_name\":\"Maclead\"," +
            "\"billing_address\":{" +
                        "\"line1\": \"#88\", " +
                        "\"line2\": \"5 Boston Ave\"," +
                        "\"city_municipality\":\"Philadelphia\"," +
                        "\"zip\": \"19132\"," +
                        "\"state_province_region\":\"PA\"," +
                        "\"country_code\":\"US\"}," +
           "\"contact\": { " +
                       "\"email\": \"amaclead@domain.com\"," +
                       "\"mobile\": \"+1415552671\"}" +
    "}," +
            "\"payment\": { " +
                 "\"description\": \"Payment for a product\"," +
                 "\"amount\": \"1000.50\"," +
                 "\"currency\": \"USD\"," +
                 "\"merchant_reference_id\": \"INV-100001_TEST\" " +
           " }," +
            "\"route\": { " +
                "\"callback_url\": \" https://tlpe.io/thankyou\"," +
                "\"notify_user\": \"true\"" +
            " }," +
            "\"key\": \"{authorizationToken}\"}";
        string url = "{paymentLink}";
        byte[] buffer = Encoding.ASCII.GetBytes(payload);
        HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
        request.Method = "POST";
        request.ContentType = "application/json";
        Stream PostData = request.GetRequestStream();
        PostData.Write(buffer, 0, buffer.Length);
        PostData.Close();
       using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
        {
            Stream responseStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(responseStream);
            StringReader sr = new StringReader(reader.ReadToEnd());

            JsonReader jreader = new JsonTextReader(sr);
            JsonSerializer jss = new JsonSerializer();
            responseData = jss.Deserialize<Dictionary<string, dynamic>>(jreader);
            reader.Close();
            responseStream.Close();
        }

       return responseData;
    }
Public Function EPL() As Dictionary(Of String, Object)
    Dim payload As String = "{""customer"":{
            ""first_name"":""Abel"",
            ""last_name"":""Maclead"",
            ""billing_address"":{
                    ""line1"":""#88"",
                    ""line2"":""5 Boston Ave"",
                    ""city_municipality"":""Philadelphia"",
                    ""zip"": ""19132"",
                    ""state_province_region"":""PA"",
                    ""country_code"":""US""},
           ""contact"": {
                    ""email"": ""amaclead@domain.com"",
                    ""mobile"": ""+1415552671""}},
           ""payment"":{
                    ""description"": ""Payment for a product"",
                    ""amount"": 1000.50,
                    ""currency"": ""USD"",
                    ""merchant_reference_id"":""INV-100001_TEST""},
            ""route"":{
                    ""callback_url"":""https://tlpe.io/thankyou"",
                    ""notify_user"":""true""},
            ""key"": ""{authorizationToken}""}"
    Dim url As String = "{paymentUrl}"
    Dim request As WebRequest = WebRequest.Create(url)
    request.Method = "POST"
    request.ContentType = "application/json"
    Dim byteArray As Byte() = Encoding.UTF8.GetBytes(payload)
    request.ContentLength = byteArray.Length()
    Dim dataStream As Stream = request.GetRequestStream()
    dataStream.Write(byteArray, 0, byteArray.Length)
    dataStream.Close()

    Dim response As WebResponse = request.GetResponse()
    Dim responseStream = response.GetResponseStream()
    Dim reader As New StreamReader(responseStream)
    Dim responseReader As StringReader = New StringReader(reader.ReadToEnd())
    Dim jreader As JsonReader = New JsonTextReader(responseReader)

    Dim jss As New JsonSerializer()
    Dim responseData As Dictionary(Of String, Object) = jss.Deserialize(Of Dictionary(Of String, Object))(jreader)
    reader.Close()
    responseStream.Close()
    response.Close()

    Return responseData

End Function
import http.client
import json

conn = http.client.HTTPSConnection('test-webapi.tlpe.io')
payload = json.dumps({
    'customer': {
        'first_name': 'Abel',
        'last_name': 'Maclead',
        'billing_address': {
            'line1': '#88',
            'line2': '5 Boston Ave',
            'city_municipality': 'Philadelphia',
            'zip': '19132',
            'state_province_region': 'PA',
            'country_code': 'US',
            },
        'contact': {'email': 'amaclead@domain.com',
                    'mobile': '+1415552671'},
        },
    'payment': {
        'description': 'Payment for a product',
        'amount': 1000.50,
        'currency': 'USD',
        'merchant_reference_id': 'INV-100001_TEST',
        },
    'route': {'callback_url': 'https://tlpe.io/thankyou',
            'notify_user': True},
    'key': '{authorizationToken}',
    })
headers = {'Content-Type': 'application/json'}
conn.request('POST', '/transaction/pay?token={token}', payload, headers)
res = conn.getresponse()
data = res.read()
print data.decode('utf-8')
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => '{paymentLink}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => '{
                "customer": {
                    "first_name": "Abel",
                    "last_name": "Maclead",
                    "billing_address": {
                                "line1": "#88",
                                "line2": "5 Boston Ave",
                                "city_municipality": "Philadelphia",
                                "zip": "19132",
                                "state_province_region": "PA",
                                "country_code": "US"
                    },
                    "contact": {
                            "email": "amaclead@domain.com",
                            "mobile": "+1415552671"
                    }
                    },
                    "payment": {
                        "description": "Payment for a product",
                        "amount": 1000.50,
                        "currency": "USD",
                        "merchant_reference_id": "INV-100001_TEST"
                    },
                    "route": {
                        "callback_url": "https://tlpe.io/thankyou",
                        "notify_user": true
                    },
                    "key": "{authorizationToken}"
                }',
    CURLOPT_HTTPHEADER => array(
        'Content-Type: application/json'
    ) ,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
require 'rest-client'
require 'json'

response = RestClient::Request.execute(
method:  :post, 
url:     "{paymentLink}",
payload: '{
    "customer": {
        "first_name": "John",
        "last_name": "Doe",
        "billing_address": {
            "line1": "Vicente Madrigal Building",
            "line2": "Ayala Avenue",
            "city_municipality": "Makati City",
            "zip": "1234",
            "state_province_region": "Metro Manila",
            "country_code": "PH"
        },
        "contact": {
            "email": "test@mail.com",
            "mobile": "+639123456789"
        }
    },
    "payment": {
        "description": "Payment for a product",
        "amount": 1000.50,
        "currency": "PHP",
        "merchant_reference_id": "INV-100001_TEST"
    },
    "route": {
        "callback_url": "https://altpaynet.com/thankyou",
        "notify_user": false
    },
    "key": "{authorizationToken}"
}',
headers: {content_type: 'application/json', accept: 'application/json'}
)

responseJson = JSON.parse(response)

puts JSON.pretty_generate(responseJson)
var request = require('request');
var options = {
    'method': 'POST',
    'url': '{paymentLink}',
    'headers': {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        "customer": {
            "first_name": "Mona",
            "last_name": "Maclead",
            "billing_address": {
                "line1": "#88",
                "line2": "5 Boston Ave",
                "city_municipality": "Philadelphia",
                "zip": "19132",
                "state_province_region": "PA",
                "country_code": "PA"
            },
            "contact": {
                "email": "amaclead@domain.com",
                "mobile": "+1415552671"
            }
        },
        "payment": {
            "description": "Payment for a product",
            "amount": 1000.50,
            "currency": "PHP",
            "merchant_reference_id": "INV-100001_TEST"
        },
        "route": {
            "callback_url": "https://tlpe.io/thankyou",
            "notify_user": true
        },
        "key": "{authorizationToken}"
    })
};
request(options, function(error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});

Download Postman request here

200 Successful Response

Post Dynamic Payment Link Parameters!

Response Samples

{
  "link": "{paymentUrl}"
}