Manual D17 checkout for ecommerce and services
Built for real merchant workflows where customers pay manually and your backend needs a trusted verification signal.
D17 verification API
Create payment sessions, verify D17 receipt screenshots, approve or reject in Telegram, and receive signed webhooks in your own backend.
curl -X POST https://dinarguard.vercel.app/api/v1/payment-sessions \
-H "Authorization: Bearer dg_live_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"currency": "TND",
"external_customer_id": "client_123",
"webhook_url": "https://your-app.com/api/dinarguard"
}'Overview
DinarGuard is the verification layer between manual D17 transfers and your application. Your app owns checkout. DinarGuard owns receipt checks, review workflow, payment status, and secure callbacks.
Built for real merchant workflows where customers pay manually and your backend needs a trusted verification signal.
Built for real merchant workflows where customers pay manually and your backend needs a trusted verification signal.
Built for real merchant workflows where customers pay manually and your backend needs a trusted verification signal.
Built for real merchant workflows where customers pay manually and your backend needs a trusted verification signal.
Authentication
Register, log in, complete merchant setup, and DinarGuard generates your API key and webhook secret. Credentials are emailed to the account owner and should only be stored on your backend.
Authorization: Bearer dg_live_your_api_key
fetch("https://dinarguard.vercel.app/api/v1/payments", {
headers: {
authorization: "Bearer dg_live_your_api_key"
}
});Quickstart
Copy this into your backend, replace the API key, and create your first payment session.
Install your HTTP client or use native fetch.
Load your API key from server environment variables.
Create a payment session with amount and webhook URL.
Save the returned payment_id in your order record.
const response = await fetch(
"https://dinarguard.vercel.app/api/v1/payment-sessions",
{
method: "POST",
headers: {
"content-type": "application/json",
authorization: `Bearer ${process.env.DINARGUARD_API_KEY}`
},
body: JSON.stringify({
amount: 50,
currency: "TND",
external_customer_id: "client_123",
description: "Monthly plan",
webhook_url: "https://your-app.com/api/dinarguard",
metadata: { order_id: "order_789" }
})
}
);
const payment = await response.json();Endpoint reference
/api/v1/payment-sessionsCreate a D17 payment session.
{ "payment_id": "pay_abc123", "status": "pending", "amount": 50 }/api/v1/payment-sessions/{paymentId}/screenshotUpload a receipt screenshot and OCR text.
{ "payment": { "status": "needs_review" }, "validation": { "passed": true } }/api/v1/payment-sessions/{paymentId}Fetch one payment status.
{ "payment_id": "pay_abc123", "status": "approved" }/api/v1/paymentsList merchant payments.
{ "payments": [{ "payment_id": "pay_abc123", "status": "approved" }] }/api/v1/payment-sessions/{paymentId}/cancelCancel an unpaid payment.
{ "payment_id": "pay_abc123", "status": "cancelled" }Code examples
# Python
import os, requests
r = requests.get(
"https://dinarguard.vercel.app/api/v1/payments",
headers={"Authorization": f"Bearer {os.environ['DINARGUARD_API_KEY']}"}
)
print(r.json())// Go
req, _ := http.NewRequest(
"GET",
"https://dinarguard.vercel.app/api/v1/payments",
nil,
)
req.Header.Set("Authorization", "Bearer "+os.Getenv("DINARGUARD_API_KEY"))
res, _ := http.DefaultClient.Do(req)Rate limits
Default beta quota is 60 requests per minute per merchant API key. Limit responses use HTTP 429. Production quotas can be increased for active merchants.
Errors
SDKs and versioning
DinarGuard currently ships HTTP endpoints first. Official SDKs are planned for JavaScript and Python. Non-breaking changes add optional fields. Breaking changes will ship under a new version path.
Pricing and license
Try DinarGuard for free during beta. Project code is MIT licensed: anyone can use, copy, modify, and distribute it with attribution.
Terms
Keep API keys server-side, verify webhooks before fulfilling orders, and do not use DinarGuard to process prohibited or unlawful payments.
Privacy
DinarGuard stores merchant profiles, payment records, receipt metadata, and review events needed to verify D17 payments.