# Get error "General Error" while trying to make payment with REST API

**URL:** <https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600>\
**Category:** API Q&A\
**Created:** [February 7, 2019, 1:30pm UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600 "2019-02-07T13:30:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_O\_Flynn](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Martin\_O\_Flynn](https://integration.keap.com/u/Martin_O_Flynn)\
**Post date:** [February 7, 2019, 1:30pm UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/1 "2019-02-07T13:30:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [February 7, 2019, 1:58pm UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/2 "2019-02-07T13:58:41Z")

</div>

What is the endpoint url you are using?

---

<div class="post-metadata">

**Author:** ![Martin\_O\_Flynn](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Martin\_O\_Flynn](https://integration.keap.com/u/Martin_O_Flynn)\
**Post date:** [February 7, 2019, 4:11pm UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/3 "2019-02-07T16:11:47Z")

</div>

[https://api.infusionsoft.com/crm/rest/v1/orders/10/payments](https://api.infusionsoft.com/crm/rest/v1/orders/10/payments)

---

<div class="post-metadata">

**Author:** ![Nicholas\_Trecina](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/nicholas_trecina/32/5338_2.png) [@Nicholas\_Trecina](https://integration.keap.com/u/Nicholas_Trecina)\
**Post date:** [February 7, 2019, 8:10pm UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/4 "2019-02-07T20:10:57Z")

</div>

Hi @Martin_O_Flynn, try sending just the id for `payment_gateway_id`, like this:

```auto
{
“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”
}

```

---

<div class="post-metadata">

**Author:** ![Martin\_O\_Flynn](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Martin\_O\_Flynn](https://integration.keap.com/u/Martin_O_Flynn)\
**Post date:** [February 11, 2019, 6:13am UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/5 "2019-02-11T06:13:59Z")

</div>

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”  
}

---

<div class="post-metadata">

**Author:** ![Martin\_O\_Flynn](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Martin\_O\_Flynn](https://integration.keap.com/u/Martin_O_Flynn)\
**Post date:** [February 11, 2019, 6:53am UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/6 "2019-02-11T06:53:34Z")

</div>

Fixed the error, I set date null.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Trecina](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/nicholas_trecina/32/5338_2.png) [@Nicholas\_Trecina](https://integration.keap.com/u/Nicholas_Trecina)\
**Post date:** [February 11, 2019, 4:37pm UTC](https://integration.keap.com/t/get-error-general-error-while-trying-to-make-payment-with-rest-api/63600/7 "2019-02-11T16:37:01Z")

</div>

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.
