Skip to main content
POST
/
Payments
cURL
curl --request POST \
  --url https://api.example.com/Payments \
  --header 'Content-Type: application/json' \
  --data '
{
  "mandate": "<string>",
  "currency": "<string>",
  "amount": 123,
  "description": "<string>",
  "reference": "<string>",
  "paymentDate": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://api.example.com/Payments"

payload = {
"mandate": "<string>",
"currency": "<string>",
"amount": 123,
"description": "<string>",
"reference": "<string>",
"paymentDate": "2023-11-07T05:31:56Z"
}
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({
mandate: '<string>',
currency: '<string>',
amount: 123,
description: '<string>',
reference: '<string>',
paymentDate: '2023-11-07T05:31:56Z'
})
};

fetch('https://api.example.com/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_URL => "https://api.example.com/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([
'mandate' => '<string>',
'currency' => '<string>',
'amount' => 123,
'description' => '<string>',
'reference' => '<string>',
'paymentDate' => '2023-11-07T05:31:56Z'
]),
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 := "https://api.example.com/Payments"

payload := strings.NewReader("{\n \"mandate\": \"<string>\",\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\"\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("https://api.example.com/Payments")
.header("Content-Type", "application/json")
.body("{\n \"mandate\": \"<string>\",\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/Payments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mandate\": \"<string>\",\n \"currency\": \"<string>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"paymentDate\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentDate": "2023-11-07T05:31:56Z",
  "scheduleDate": "2023-11-07T05:31:56Z",
  "handle": "<string>",
  "description": "<string>",
  "reference": "<string>",
  "amount": 123,
  "currency": "<string>",
  "test": true,
  "statusText": "<string>",
  "settlementDate": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "modifiedAt": "2023-11-07T05:31:56Z",
  "mandate": {
    "handle": "<string>",
    "scheme": "<string>",
    "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}

Body

mandate
string | null
currency
string | null
amount
integer<int32>
description
string | null
reference
string | null
paymentDate
string<date-time>

Response

OK

id
string<uuid>
paymentDate
string<date-time>
scheduleDate
string<date-time> | null
handle
string | null
description
string | null
reference
string | null
amount
integer<int32>
currency
string | null
test
boolean
status
enum<string>
Available options:
Pending,
Settled,
Scheduled,
Rejected,
Cancelled,
Chargeback,
PendingCancel
statusText
string | null
settlementDate
string<date-time> | null
createdAt
string<date-time>
modifiedAt
string<date-time> | null
mandate
object