Payments
Initiate Payment
Start a payment operation.
AuthorizationBearer <token>
In: header
Path Parameters
methodstring
Payment Method.
Value in
"wallet" | "qr" | "card" | "bank"
The details required to initiate a payment.
invoice_idstring
The ID of the invoice being paid.
Match
^inv_.*$
redirect_urlstring
The url to redirect the customer to after completing the payment.
Format
url
invoice_idstring
The ID of the invoice being paid.
Match
^inv_.*$
providerstring
Unique slug for the provider.
Value in
"pcb" | "pbb" | "card" | "uni5pay"
billing_detailsobject
Billing details of the customer.
invoice_idstring
The ID of the invoice being paid.
Match
^inv_.*$
card_detailsobject
billing_detailsobject
Billing details of the customer.
invoice_idstring
The ID of the invoice being paid.
Match
^inv_.*$
swift_codestring
Swift Code / BIC of the bank.
Value in
"SURBSRPA" | "FBNASRPA" | "GODOSRPA" | "HAKRSRPA" | "RBNKSRPA" | "SOUOSRPP"
redirect_urlstring
The url to redirect the customer to after completing the payment.
Format
url
Response Body
curl -X POST "https://api.live.paisr.tech/v2/payments/initiate/wallet" \
-H "Content-Type: application/json" \
-d '{
"invoice_id": "string",
"redirect_url": "string"
}'
const body = JSON.stringify({
"invoice_id": "string",
"redirect_url": "string"
})
fetch("https://api.live.paisr.tech/v2/payments/initiate/wallet", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.live.paisr.tech/v2/payments/initiate/wallet"
body := strings.NewReader(`{
"invoice_id": "string",
"redirect_url": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.live.paisr.tech/v2/payments/initiate/wallet"
body = {
"invoice_id": "string",
"redirect_url": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"invoice_id": "string",
"redirect_url": "string"
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.live.paisr.tech/v2/payments/initiate/wallet"))
.header("Content-Type", "application/json")
.POST(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"invoice_id": "string",
"redirect_url": "string"
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://api.live.paisr.tech/v2/payments/initiate/wallet", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
"success": true,
"data": {
"session": "https://app.paisr.tech/pay/ey7bTCm6tur63CR6mzbuq23r",
"expires_in": "30 Minutes"
}
}
{
"success": false,
"message": "string"
}
{
"success": false,
"message": "string"
}