Record payment
curl --request POST \
--url https://app.getswipe.in/api/partner/v1/payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 27,
"payment_date": "13-06-2024",
"payment_mode": "UPI",
"customer": "CUST123",
"notes": "",
"send_sms": true,
"send_email": true,
"exclusive_notes": "",
"documents": [
{
"amount_paying": 27,
"hash_id": "SLascded"
}
]
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/payment"
payload = {
"amount": 27,
"payment_date": "13-06-2024",
"payment_mode": "UPI",
"customer": "CUST123",
"notes": "",
"send_sms": True,
"send_email": True,
"exclusive_notes": "",
"documents": [
{
"amount_paying": 27,
"hash_id": "SLascded"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 27,
payment_date: '13-06-2024',
payment_mode: 'UPI',
customer: 'CUST123',
notes: '',
send_sms: true,
send_email: true,
exclusive_notes: '',
documents: [{amount_paying: 27, hash_id: 'SLascded'}]
})
};
fetch('https://app.getswipe.in/api/partner/v1/payment', 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://app.getswipe.in/api/partner/v1/payment",
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' => 27,
'payment_date' => '13-06-2024',
'payment_mode' => 'UPI',
'customer' => 'CUST123',
'notes' => '',
'send_sms' => true,
'send_email' => true,
'exclusive_notes' => '',
'documents' => [
[
'amount_paying' => 27,
'hash_id' => 'SLascded'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.getswipe.in/api/partner/v1/payment"
payload := strings.NewReader("{\n \"amount\": 27,\n \"payment_date\": \"13-06-2024\",\n \"payment_mode\": \"UPI\",\n \"customer\": \"CUST123\",\n \"notes\": \"\",\n \"send_sms\": true,\n \"send_email\": true,\n \"exclusive_notes\": \"\",\n \"documents\": [\n {\n \"amount_paying\": 27,\n \"hash_id\": \"SLascded\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.getswipe.in/api/partner/v1/payment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 27,\n \"payment_date\": \"13-06-2024\",\n \"payment_mode\": \"UPI\",\n \"customer\": \"CUST123\",\n \"notes\": \"\",\n \"send_sms\": true,\n \"send_email\": true,\n \"exclusive_notes\": \"\",\n \"documents\": [\n {\n \"amount_paying\": 27,\n \"hash_id\": \"SLascded\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.getswipe.in/api/partner/v1/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 27,\n \"payment_date\": \"13-06-2024\",\n \"payment_mode\": \"UPI\",\n \"customer\": \"CUST123\",\n \"notes\": \"\",\n \"send_sms\": true,\n \"send_email\": true,\n \"exclusive_notes\": \"\",\n \"documents\": [\n {\n \"amount_paying\": 27,\n \"hash_id\": \"SLascded\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Payment Recorded successfully"
}{
"success": false,
"message": "Error Message",
"error_code": "HASH_ID_MISSING",
"errors": {
"customer_id": "Invalid ID."
}
}{
"success": false,
"message": "Error Message",
"error_code": "HASH_ID_MISSING",
"errors": {
"customer_id": "Invalid ID."
}
}{
"success": false,
"message": "Error Message",
"error_code": "HASH_ID_MISSING",
"errors": {
"customer_id": "Invalid ID."
}
}Payment
Record payment
POST
/
v1
/
payment
Record payment
curl --request POST \
--url https://app.getswipe.in/api/partner/v1/payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 27,
"payment_date": "13-06-2024",
"payment_mode": "UPI",
"customer": "CUST123",
"notes": "",
"send_sms": true,
"send_email": true,
"exclusive_notes": "",
"documents": [
{
"amount_paying": 27,
"hash_id": "SLascded"
}
]
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/payment"
payload = {
"amount": 27,
"payment_date": "13-06-2024",
"payment_mode": "UPI",
"customer": "CUST123",
"notes": "",
"send_sms": True,
"send_email": True,
"exclusive_notes": "",
"documents": [
{
"amount_paying": 27,
"hash_id": "SLascded"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 27,
payment_date: '13-06-2024',
payment_mode: 'UPI',
customer: 'CUST123',
notes: '',
send_sms: true,
send_email: true,
exclusive_notes: '',
documents: [{amount_paying: 27, hash_id: 'SLascded'}]
})
};
fetch('https://app.getswipe.in/api/partner/v1/payment', 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://app.getswipe.in/api/partner/v1/payment",
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' => 27,
'payment_date' => '13-06-2024',
'payment_mode' => 'UPI',
'customer' => 'CUST123',
'notes' => '',
'send_sms' => true,
'send_email' => true,
'exclusive_notes' => '',
'documents' => [
[
'amount_paying' => 27,
'hash_id' => 'SLascded'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.getswipe.in/api/partner/v1/payment"
payload := strings.NewReader("{\n \"amount\": 27,\n \"payment_date\": \"13-06-2024\",\n \"payment_mode\": \"UPI\",\n \"customer\": \"CUST123\",\n \"notes\": \"\",\n \"send_sms\": true,\n \"send_email\": true,\n \"exclusive_notes\": \"\",\n \"documents\": [\n {\n \"amount_paying\": 27,\n \"hash_id\": \"SLascded\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.getswipe.in/api/partner/v1/payment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 27,\n \"payment_date\": \"13-06-2024\",\n \"payment_mode\": \"UPI\",\n \"customer\": \"CUST123\",\n \"notes\": \"\",\n \"send_sms\": true,\n \"send_email\": true,\n \"exclusive_notes\": \"\",\n \"documents\": [\n {\n \"amount_paying\": 27,\n \"hash_id\": \"SLascded\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.getswipe.in/api/partner/v1/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 27,\n \"payment_date\": \"13-06-2024\",\n \"payment_mode\": \"UPI\",\n \"customer\": \"CUST123\",\n \"notes\": \"\",\n \"send_sms\": true,\n \"send_email\": true,\n \"exclusive_notes\": \"\",\n \"documents\": [\n {\n \"amount_paying\": 27,\n \"hash_id\": \"SLascded\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Payment Recorded successfully"
}{
"success": false,
"message": "Error Message",
"error_code": "HASH_ID_MISSING",
"errors": {
"customer_id": "Invalid ID."
}
}{
"success": false,
"message": "Error Message",
"error_code": "HASH_ID_MISSING",
"errors": {
"customer_id": "Invalid ID."
}
}{
"success": false,
"message": "Error Message",
"error_code": "HASH_ID_MISSING",
"errors": {
"customer_id": "Invalid ID."
}
}Authorizations
Bearer authentication header of the form Bearer , where is your auth token.
Body
application/json
Amount to be paid
Example:
27
Payment date [DD-MM-YYYY]
Example:
"13-06-2024"
Payment mode
Available options:
Cash, Cheque, UPI, Card, Net Banking, paylater, cardless_emi, EMI, TDS, Credits Example:
"UPI"
Customer ID
Example:
"CUST123"
Show child attributes
Show child attributes
Notes, will be shared with the customer
Example:
""
Send SMS, customer will be notified through SMS
Example:
true
Send Email, customer will be notified through Email
Example:
true
Exclusive Notes for internal purpose
Example:
""
Documents to be settled, if any
Show child attributes
Show child attributes
Example:
[
{
"amount_paying": 27,
"hash_id": "SLascded"
}
]⌘I