Integration Guide – Sandbox Environment
Dinamikpay is a REST-based payment integration interface designed for merchants who want to accept online payments securely and efficiently.
All requests and responses are transmitted in JSON format over HTTPS.
| Environment | Base URL |
|---|---|
| Sandbox (Default) | https://api.dinamikpay1.com |
| Production | Provided after merchant approval |
All API requests must include authentication headers.
X-API-KEY: **************
X-API-SECRET: **************
Content-Type: application/json
Endpoint: POST /v1/payment/create
{
"merchant_id": "MERCHANT123",
"order_id": "ORDER_1001",
"amount": 1500.00,
"currency": "TRY",
"customer": {
"customer_id": "CUST_45821",
"username": "johndoe88",
"phone": "+905551112233",
"name": "John Doe",
"email": "john@example.com",
"ip": "192.168.1.10"
},
"callback_url": "https://merchant-site.com/callback",
"return_url": "https://merchant-site.com/success"
}
| Field | Required | Description |
|---|---|---|
| merchant_id | Yes | Unique merchant identifier |
| order_id | Yes | Unique order reference |
| amount | Yes | Payment amount (TRY) |
| currency | Yes | Currency code (TRY) |
| customer.customer_id | No | Merchant-side customer number |
| customer.username | No | Customer username |
| customer.phone | No | Customer phone number (international format) |
| callback_url | Yes | Server-to-server notification URL |
{
"status": "success",
"payment_id": "PAY987654",
"redirect_url": "https://pay.dinamikpay1.com/checkout/PAY987654"
}
The customer must be redirected to the redirect_url
to complete the payment process.
After payment status changes, Dinamikpay sends a POST request to the merchant's callback URL.
{
"payment_id": "PAY987654",
"order_id": "ORDER_1001",
"status": "completed",
"amount": 1500.00,
"currency": "TRY",
"signature": "generated_signature_hash"
}
Signature is generated using the following algorithm:
SHA256(order_id + payment_id + API_SECRET)
Merchants must verify the signature to confirm the authenticity of the callback request.
Endpoint: GET /v1/payment/status
GET /v1/payment/status?payment_id=PAY987654
{
"payment_id": "PAY987654",
"status": "completed",
"created_at": "2025-01-10 14:25:11"
}
| Code | Description |
|---|---|
| 1001 | Invalid API credentials |
| 1002 | Invalid amount |
| 1003 | Duplicate order_id |
| 1004 | Payment not found |