Trouble creating payment with API


Hi Again

this is what I have currently for creating payment.

I have got it to work once by manually entering the values of the required fields but it doesn’t seem to work with my variables

In the API log in splynx it looks like all my variables come through correctly but it is still giving an error.
Also now when I try to manually set all the variables in a test file I get error 500 but the payment goes into splynx anyway.

$PaymentsApiUrl = “admin/finance/payments”;

print “Create Payment\n”;
$result = $api->api_call_post($PaymentsApiUrl,
‘customer_id’ => $CustomerId,
‘payment_type’ => ‘7’,
‘receipt_number’ => “8888890888”,
‘date’ => substr($date, 0, -9),
‘amount’ => $price,
‘transaction_id’ => $trans_id,
‘field_1’ => $trans_id,
‘field_2’ => $email,
‘field_3’ => ‘fdfsdf’,
‘field_4’ => ‘fsdfsfs’,
‘field_5’ => ‘dfsdfdvvs’,


print "Result: ";
if ($result) {
print “Ok!\n”;
$PaymentId = $api->response[‘id’];
} else {
print “Fail! Error code: $api->response_code\n”;
$PaymentId = false;

print “\n-------------------------------------------------\n”;

Create transaction or Invoice with API

Please, remove this two lines:


Seems receipt number is not mandatory like it lists in the API apiary and neither is transaction_id

So with those disabled it still didn’t work.

I found to make it work I had to disable:
‘field_1’ => $trans_id,

My $trans_id variable is set to grab the STRIPE transaction ID from the form.
$trans_id = $entry[‘transaction_id’];

I think my problem could possibly something to do with transaction_id being used in both the STRIPE Gravity forms functions and as a attribute in the Splynx API

not sure how to get around this


transaction_id - is internal value and autogenerated on splynx.

so you need to use fields_ … for your values.