I want to create a transaction after I create a previous order using the REST API.
The parameters I submitted are like this:
{
"transaction": {
"kind" : "authorization",
"gateway": "cash",
"amount": 764,
"order_id" : xxx,
"status" : "success"
}
}
And then I am getting this error:
{
"errors": {
"kind": "authorization is not a valid transaction"
}
}
When I change the value of kind, I get the following error:
capture:
{
"errors": {
"base": "No capturable transaction was found""
}
}
sale:
{
"errors": {
"kind": "sale is not a valid transaction"
}
}
void:
{
"errors": {
"base": "An error occurred while processing your request"
}
}
refund:
{
"errors": {
"base": "No refundable transaction was found"
}
}
How can I create a transaction correctly?