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"
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/payment"
payload = {
"amount": 27,
"payment_date": "13-06-2024",
"payment_mode": "UPI",
"customer": "CUST123"
}
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'
})
};
fetch('https://app.getswipe.in/api/partner/v1/payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
v1 is deprecated — use the v2 endpoint instead. Records a payment received from a customer. Optionally settle specific documents by pairing each hash_id with an amount_paying — partial settlement is supported and the document’s payment status tracks what remains. Non-cash payment modes need a bank account configured on your account, otherwise the request fails with MISSING_BANK_ACCOUNT. Set send_sms or send_email to notify the customer.
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"
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/payment"
payload = {
"amount": 27,
"payment_date": "13-06-2024",
"payment_mode": "UPI",
"customer": "CUST123"
}
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'
})
};
fetch('https://app.getswipe.in/api/partner/v1/payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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 <token>, where <token> is an API key from the API Integration section of your dashboard. Keys are scoped to the company they are generated in — for testing, add a separate test company and generate the key there, so requests never touch your real books.
Body
application/json

