HI, I am trying to create payment using REST API but I got following error result.
{
“message”: “General error”
}
Here is input parameters
{
“apply_to_commissions”: true,
“charge_now”: true,
“credit_card_id”: 2,
“date”: “2019-02-07T04:58:05.227Z”,
“notes”: “Test payment”,
“payment_amount”: “2”,
“payment_gateway_id”: “{payment_gateway_id}”,
“payment_method_type”: “CREDIT_CARD”
}
Could you please help me to resolve this issue?
MY order status is UNPAID
What is the endpoint url you are using?
Hi @Martin_O_Flynn, try sending just the id for payment_gateway_id
, like this:
{
“apply_to_commissions”: true,
“charge_now”: true,
“credit_card_id”: 2,
“date”: “2019-02-07T04:58:05.227Z”,
“notes”: “Test payment”,
“payment_amount”: “2”,
“payment_gateway_id”: “2”,
“payment_method_type”: “CREDIT_CARD”
}
Unable to set date for payment when sent to processor.
Request Model
{
“apply_to_commissions”: true,
“charge_now”: true,
“credit_card_id”: 2,
“date”: “2019-02-11T06:07:11.238Z”,
“notes”: “Test payment”,
“payment_amount”: “2”,
“payment_gateway_id”: “2”,
“payment_method_type”: “CREDIT_CARD”
}
Fixed the error, I set date null.
Glad you were able to figure it out! For clarity, the date
field can only be set when charge_now
is false
. It’s intended purpose is for creating payment records in the system for historical purposes.