Update payment by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoice_id": 1,
"payment_date": 1234567890,
"amount": "1.1",
"method ": "cash",
"payment_method_id": 1,
"notes": "some string",
"square_transaction_id": "some string"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments/{id}"
payload = {
"invoice_id": 1,
"payment_date": 1234567890,
"amount": "1.1",
"method ": "cash",
"payment_method_id": 1,
"notes": "some string",
"square_transaction_id": "some string"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_id: 1,
payment_date: 1234567890,
amount: '1.1',
'method ': 'cash',
payment_method_id: 1,
notes: 'some string',
square_transaction_id: 'some string'
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Payments
Update payment by ID
Update a payment
PUT
/
payments
/
{id}
Update payment by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoice_id": 1,
"payment_date": 1234567890,
"amount": "1.1",
"method ": "cash",
"payment_method_id": 1,
"notes": "some string",
"square_transaction_id": "some string"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments/{id}"
payload = {
"invoice_id": 1,
"payment_date": 1234567890,
"amount": "1.1",
"method ": "cash",
"payment_method_id": 1,
"notes": "some string",
"square_transaction_id": "some string"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_id: 1,
payment_date: 1234567890,
amount: '1.1',
'method ': 'cash',
payment_method_id: 1,
notes: 'some string',
square_transaction_id: 'some string'
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/payments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Was this page helpful?
⌘I