Initiate Payment

Guide to integrating with our payment API


Initiate Payment Endpoint

This endpoint allows you to initiate a payment by providing the amount to be paid. It returns a payment URL that can be used by your users to complete the payment.

POST /api/payment/initiate

Headers

KeyValueRequired
Acceptapplication/jsonYes
Content-Typeapplication/jsonYes
x-app-keyYOUR_APP_KEYYes
x-app-secretYOUR_SECRET_KEYYes

Example Usage in Different Languages

Request Body

example.js
const axios = require('axios');
 
async function initiatePayment() {
  const response = await axios.post('https://epay.guiddini.dz/payment/initiate', {
    amount: "2500"
  }, {
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      'x-app-key': 'YOUR_APP_KEY',
      'x-app-secret': 'YOUR_SECRET_KEY'
    }
  });
  console.log(response.data);
}
 
initiatePayment();

Response

response.json
{
  "data": {
    "type": "transaction",
    "id": "YIFXM5E7ZA8KWS8C4SC4",
    "attributes": {
      "amount": "2500",
      "status": "processing",
      "form_url": "[https://test.satim.dz/payment/merchants/merchant1/payment_fr.html?mdOrder=Tox9krS9mLPdCUAAF2U4](https://test.satim.dz/payment/merchants/merchant1/payment_fr.html?mdOrder=Tox9krS9mLPdCUAAF2U4)"
    }
  }
}