Create Payment Submission
curl --request POST \
--url https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions \
--header 'X-PAYLIAS-API-KEY: <api-key>' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-org-id: <x-org-id>' \
--header 'x-partner-id: <x-partner-id>'import requests
url = "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions"
headers = {
"x-org-id": "<x-org-id>",
"x-partner-id": "<x-partner-id>",
"idempotency-key": "<idempotency-key>",
"X-PAYLIAS-API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-org-id': '<x-org-id>',
'x-partner-id': '<x-partner-id>',
'idempotency-key': '<idempotency-key>',
'X-PAYLIAS-API-KEY': '<api-key>'
}
};
fetch('https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions', 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://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-PAYLIAS-API-KEY: <api-key>",
"idempotency-key: <idempotency-key>",
"x-org-id: <x-org-id>",
"x-partner-id: <x-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-org-id", "<x-org-id>")
req.Header.Add("x-partner-id", "<x-partner-id>")
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("X-PAYLIAS-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions")
.header("x-org-id", "<x-org-id>")
.header("x-partner-id", "<x-partner-id>")
.header("idempotency-key", "<idempotency-key>")
.header("X-PAYLIAS-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-org-id"] = '<x-org-id>'
request["x-partner-id"] = '<x-partner-id>'
request["idempotency-key"] = '<idempotency-key>'
request["X-PAYLIAS-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"organization_id": "org_ct239n420or249k5bo90",
"partner_id": "part_ct23b6420or249k5boag",
"payment_id": "cjes76vsemvj3obsnc53",
"status": 1,
"submission_time": 1743273405,
"token": "sub_cvk3rfc20or8munut3tg",
"relationships": {
"payment": {
"amount": {
"currency": "USD",
"total": "10000"
},
"beneficiary_party": {
"billing": {
"country": "US"
},
"email": "ziyad.parekh@gmail.com",
"first_name": "Ziyad",
"last_name": "Parekh",
"payment_address": "ziyad@safepay-platinum",
"phone": "+923008277879",
"type": "Payee_Individual"
},
"debtor_party": {
"billing": {
"country": "US"
},
"email": "johnc@stripe.com",
"first_name": "John",
"last_name": "Collison",
"payment_address": "john@stripe-platinum",
"phone": "+16462442945",
"type": "Payee_Individual"
},
"device": {},
"expires_at": 1743276991,
"initiated_at": 1743273391,
"location": {},
"organization_id": "org_ct239n420or249k5bo90",
"partner_id": "part_ct23b6420or249k5boag",
"payment_id": "cjes76vsemvj3obsnc53",
"reference": "INV0001"
}
}
}
}{
"code": "error.bad_request",
"message": "Invalid request parameters"
}{
"code": "error.unauthorized",
"message": "Authentication required"
}{
"code": "error.not_found",
"message": "Requested resource not found"
}{
"code": "error.conflict",
"message": "Resource already exists"
}Submissions
Create Payment Submission
Create Payment Submission
POST
/
api
/
v1
/
csp
/
payments
/
{payment_id}
/
submissions
Create Payment Submission
curl --request POST \
--url https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions \
--header 'X-PAYLIAS-API-KEY: <api-key>' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-org-id: <x-org-id>' \
--header 'x-partner-id: <x-partner-id>'import requests
url = "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions"
headers = {
"x-org-id": "<x-org-id>",
"x-partner-id": "<x-partner-id>",
"idempotency-key": "<idempotency-key>",
"X-PAYLIAS-API-KEY": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-org-id': '<x-org-id>',
'x-partner-id': '<x-partner-id>',
'idempotency-key': '<idempotency-key>',
'X-PAYLIAS-API-KEY': '<api-key>'
}
};
fetch('https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions', 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://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-PAYLIAS-API-KEY: <api-key>",
"idempotency-key: <idempotency-key>",
"x-org-id: <x-org-id>",
"x-partner-id: <x-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-org-id", "<x-org-id>")
req.Header.Add("x-partner-id", "<x-partner-id>")
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("X-PAYLIAS-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions")
.header("x-org-id", "<x-org-id>")
.header("x-partner-id", "<x-partner-id>")
.header("idempotency-key", "<idempotency-key>")
.header("X-PAYLIAS-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/payments/{payment_id}/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-org-id"] = '<x-org-id>'
request["x-partner-id"] = '<x-partner-id>'
request["idempotency-key"] = '<idempotency-key>'
request["X-PAYLIAS-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"organization_id": "org_ct239n420or249k5bo90",
"partner_id": "part_ct23b6420or249k5boag",
"payment_id": "cjes76vsemvj3obsnc53",
"status": 1,
"submission_time": 1743273405,
"token": "sub_cvk3rfc20or8munut3tg",
"relationships": {
"payment": {
"amount": {
"currency": "USD",
"total": "10000"
},
"beneficiary_party": {
"billing": {
"country": "US"
},
"email": "ziyad.parekh@gmail.com",
"first_name": "Ziyad",
"last_name": "Parekh",
"payment_address": "ziyad@safepay-platinum",
"phone": "+923008277879",
"type": "Payee_Individual"
},
"debtor_party": {
"billing": {
"country": "US"
},
"email": "johnc@stripe.com",
"first_name": "John",
"last_name": "Collison",
"payment_address": "john@stripe-platinum",
"phone": "+16462442945",
"type": "Payee_Individual"
},
"device": {},
"expires_at": 1743276991,
"initiated_at": 1743273391,
"location": {},
"organization_id": "org_ct239n420or249k5bo90",
"partner_id": "part_ct23b6420or249k5boag",
"payment_id": "cjes76vsemvj3obsnc53",
"reference": "INV0001"
}
}
}
}{
"code": "error.bad_request",
"message": "Invalid request parameters"
}{
"code": "error.unauthorized",
"message": "Authentication required"
}{
"code": "error.not_found",
"message": "Requested resource not found"
}{
"code": "error.conflict",
"message": "Resource already exists"
}Authorizations
Headers
The Organization ID header used for authorization
The Partner ID header used for authorization
The Idempotency Key - usually a UUID
Path Parameters
The unique identifier for the payment
Example:
"pay_123456789"
Was this page helpful?
⌘I