Create a Satim Payment Link
curl --request POST \
--url http://localhost:8080/api/v1/payments \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1500.00",
"fail_url": "<string>",
"success_url": "<string>",
"description": "<string>",
"order_ref": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/payments"
payload = {
"amount": "1500.00",
"fail_url": "<string>",
"success_url": "<string>",
"description": "<string>",
"order_ref": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1500.00',
fail_url: '<string>',
success_url: '<string>',
description: '<string>',
order_ref: '<string>'
})
};
fetch('http://localhost:8080/api/v1/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1500.00',
'fail_url' => '<string>',
'success_url' => '<string>',
'description' => '<string>',
'order_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/payments"
payload := strings.NewReader("{\n \"amount\": \"1500.00\",\n \"fail_url\": \"<string>\",\n \"success_url\": \"<string>\",\n \"description\": \"<string>\",\n \"order_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/payments")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1500.00\",\n \"fail_url\": \"<string>\",\n \"success_url\": \"<string>\",\n \"description\": \"<string>\",\n \"order_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/payments")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1500.00\",\n \"fail_url\": \"<string>\",\n \"success_url\": \"<string>\",\n \"description\": \"<string>\",\n \"order_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_url": "<string>",
"satim_order_id": "<string>"
}Payments
Create a Satim Payment Link
Create a Satim payment and return a hosted payment_url to redirect the customer to. Amount is in DZD (minimum 50.00); the order is registered with Satim and a webhook fires once the result is confirmed.
POST
/
api
/
v1
/
payments
Create a Satim Payment Link
curl --request POST \
--url http://localhost:8080/api/v1/payments \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1500.00",
"fail_url": "<string>",
"success_url": "<string>",
"description": "<string>",
"order_ref": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/payments"
payload = {
"amount": "1500.00",
"fail_url": "<string>",
"success_url": "<string>",
"description": "<string>",
"order_ref": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1500.00',
fail_url: '<string>',
success_url: '<string>',
description: '<string>',
order_ref: '<string>'
})
};
fetch('http://localhost:8080/api/v1/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1500.00',
'fail_url' => '<string>',
'success_url' => '<string>',
'description' => '<string>',
'order_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/payments"
payload := strings.NewReader("{\n \"amount\": \"1500.00\",\n \"fail_url\": \"<string>\",\n \"success_url\": \"<string>\",\n \"description\": \"<string>\",\n \"order_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/payments")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1500.00\",\n \"fail_url\": \"<string>\",\n \"success_url\": \"<string>\",\n \"description\": \"<string>\",\n \"order_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/payments")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1500.00\",\n \"fail_url\": \"<string>\",\n \"success_url\": \"<string>\",\n \"description\": \"<string>\",\n \"order_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_url": "<string>",
"satim_order_id": "<string>"
}Body
application/json
Request to create a payment link.
Amount in DZD (decimal string). Minimum 50.00, at most 2 decimal places.
Example:
"1500.00"
Where to send the customer after a failed/declined payment.
Where to send the customer after a successful payment.
Free-form description shown on the payment.
Hosted-page language (AR/FR/EN). Defaults to FR.
Available options:
AR, FR, EN The business's own reference for this payment (passed to Satim as udf1).