Standard
You set the amount in the dashboard, generate an HTML form, and paste it on your site. Best for a simple Pay button, invoice page, or QR code.
Standard guideTransa · Developer docs
This is the same checkout Petiht uses. Create a merchant, then either paste a Pay button or call the Express API. Your customer pays on Transa and returns to your success or cancel page.
Pick one path. You can add the other later. Both need an approved merchant on TransaCash.
You set the amount in the dashboard, generate an HTML form, and paste it on your site. Best for a simple Pay button, invoice page, or QR code.
Standard guideYour server sets the amount. You verify Client ID and Secret, create a checkout, then redirect the customer. This is how petiht.com talks to Transa.
Express guideThe customer never stays on your server while they pay. Transa hosts the payment page.
Customer clicks Pay. You already know the amount and order.
They sign in to Transa and pay with wallet or an available method.
The payment is recorded on the merchant wallet in the chosen currency.
We send them to your success URL, or cancel URL if they stop.
Use this when the price is fixed and you do not want to run a backend. The form posts to Transa and opens checkout.
<form method="POST" action="https://pay.petiht.com/payment/form">
<input type="hidden" name="merchant" value="YOUR_MERCHANT_UUID">
<input type="hidden" name="merchant_id" value="YOUR_MERCHANT_ID">
<input type="hidden" name="item_name" value="Order #1042">
<input type="hidden" name="amount" value="25.00">
<input type="hidden" name="order" value="1042">
<input type="hidden" name="custom" value="Optional note">
<button type="submit">Pay with Transa</button>
</form>
Use this from PHP, Node, Python, or any server. Two POST calls, then a redirect. Petiht.com uses this exact flow for wallet top-ups.
Base URL: https://pay.petiht.com
| Step | Endpoint | What you send | What you get |
|---|---|---|---|
| 1 | POST /merchant/api/verify |
client_id, client_secret |
data.access_token |
| 2 | POST /merchant/api/transaction-info |
Bearer token + amount, currency, URLs | data.approvedUrl |
| 3 | Redirect the customer | — | Hosted Transa checkout |
Send JSON. A token is valid for about one hour. Create a new one if it expires.
POST https://pay.petiht.com/merchant/api/verify
Content-Type: application/json
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
// Success
{
"status": "success",
"data": { "access_token": "..." }
}
The currency code must exist on that merchant wallet (for example HTG or USD). successUrl and cancelUrl must be https pages you control.
POST https://pay.petiht.com/merchant/api/transaction-info
Content-Type: application/json
Authorization: Bearer ACCESS_TOKEN
{
"payer": "Transa",
"amount": 25.00,
"currency": "USD",
"successUrl": "https://yoursite.com/pay/success",
"cancelUrl": "https://yoursite.com/pay/cancel"
}
// Success
{
"status": "success",
"data": { "approvedUrl": "https://pay.petiht.com/merchant/payment?grant_id=...&token=..." }
}
<?php
$base = 'https://pay.petiht.com';
$clientId = getenv('TRANSA_CLIENT_ID');
$clientSecret = getenv('TRANSA_CLIENT_SECRET');
$verify = curl_init($base . '/merchant/api/verify');
curl_setopt_array($verify, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'client_id' => $clientId,
'client_secret' => $clientSecret,
]),
]);
$auth = json_decode(curl_exec($verify), true);
curl_close($verify);
$token = $auth['data']['access_token'] ?? '';
if (($auth['status'] ?? '') !== 'success' || $token === '') {
throw new Exception($auth['message'] ?? 'Transa rejected the merchant credentials');
}
$info = curl_init($base . '/merchant/api/transaction-info');
curl_setopt_array($info, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer ' . $token,
],
CURLOPT_POSTFIELDS => json_encode([
'payer' => 'Transa',
'amount' => 25.00,
'currency' => 'USD',
'successUrl' => 'https://yoursite.com/pay/success',
'cancelUrl' => 'https://yoursite.com/pay/cancel',
]),
]);
$checkout = json_decode(curl_exec($info), true);
curl_close($info);
$url = $checkout['data']['approvedUrl'] ?? '';
if (($checkout['status'] ?? '') !== 'success' || $url === '') {
throw new Exception($checkout['message'] ?? 'Transa could not start checkout');
}
header('Location: ' . $url);
exit;
After checkout, Transa sends the customer back to the URLs you passed. Treat success as “customer finished checkout”. Confirm the payment on your side before you unlock the order.
The return query can include a status payload. If status is not success, do not fulfill the order.
Ready
Sign in, add Standard or Express, and start accepting payments the same day you are approved.
Get started