Create a payment
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoice_id": 1,
"payment_date": 1,
"amount": "1.00",
"method": "cash"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments"
payload = {
"invoice_id": 1,
"payment_date": 1,
"amount": "1.00",
"method": "cash"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({invoice_id: 1, payment_date: 1, amount: '1.00', method: 'cash'})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Payments
Create a payment
Create a payment
POST
/
payments
Create a payment
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoice_id": 1,
"payment_date": 1,
"amount": "1.00",
"method": "cash"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments"
payload = {
"invoice_id": 1,
"payment_date": 1,
"amount": "1.00",
"method": "cash"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({invoice_id: 1, payment_date: 1, amount: '1.00', method: 'cash'})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Body raw (json)
{
"invoice_id",// required | integer | existing invoice id
"payment_date",// required | integer | description: timestamp
"amount",// required | string | numeric
"method",// required | string | acceptable_values: cash,check,card,square,bank_transfer,other
"payment_method_id",// nullable | integer | existing payment method id
"notes",// optional | string | max:4000
"square_transaction_id"// optional | string | max:255
}
Body
application/json