logo
  • Contents

Documentation - Payments

Last updated 26/01/2017

API Lite has been superseded by API v1 - this information is for legacy users only.

Get Payments


Retrieve payments. Returns blank if no records were found.

Action

GetPayments

Url format

GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid={apiid}&apikey={apikey}&action=GetPayments&fields={feilds}&where={where}&orderby={orderby}

 

Response Fields

Field Description
PaymentId The unique cin7 payment id.
PaymentImportedRef A unique payment reference (Example: Ref456)
OrderId The unique cin7 order id.
OrderRef A unique order reference (Example: Ref123)
CreatedDate Created Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
Active Payment active status: 1 active, 0 disabled (Example: 1)
Method Method of payment (Example: Cash)
Direction Payment direction: 1 receive payment or -1 pay/refund (Example: 1)
Amount Amount (Example: 123.00)
Date Payment Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
TransactionAuthorized Transaction Authorized: 1 authorized or 0 unauthorized (Example: 1)
TransactionRef Transaction Reference (Example: ABC123456789)
Comments Comments

Get payments of an order

Request

Fields: 
Where: OrderRef='Ref123'
OrderBy: GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=GetPayments&where=OrderRef%3D'Ref123'

Response

PaymentId,PaymentImportedRef,OrderId,OrderRef,CreatedDate,Active,Method,Direction,Amount,Date,TransactionAuthorized,TransactionRef
1001,Ref456,12345,Ref123,2013-09-18 21:36:55,1,Direct Credit,1,123.50,2013-09-16 01:00:00,1,ABC123456789

Update or Insert Payments


Update or insert multiple payments by posting a csv to the api. Inserting Payments should be done after inserting an Order

Action

UpdatePayments

Url format

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid={apiid}&apikey={apikey}&action=UpdatePayments

Request Fields

Field Description
LineId A temporary unique id for the record. (Optional)
The id will be returned in the response.
Defaults to the record index starting at 1.
OrderId The unique cin7 order id. (Optional)
OrderId or OrderRef should be specified to insert an order detail.
OrderRef A unique order reference (Example: Ref123) (Optional)
OrderRef or OrderId should be specified to insert an order detail.
PaymentId The unique cin7 payment id.
PaymentId should be blank when inserting a new payment.
PaymentId or PaymentImportedRef should be specified to update a payment.
PaymentImportedRef A unique payment reference (Example: Ref456) (Optional)
PaymentId or PaymentImportedRef should be specified to update a payment.
CreatedDate Created Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
Active Order active status: 1 active, 0 disabled (Example: 1)
Method Method of payment (Example: Cash)
Direction Payment direction: 1 receive payment or -1 pay/refund (Example: 1)
Amount Amount (Example: 123.00)
Date Payment Date UTC: yyyy-MM-dd HH:mm:ss (Example: 2013-01-31 08:30:00)
TransactionAuthorized Transaction Authorized: 1 authorized or 0 unauthorized (Example: 1)
TransactionRef Transaction Reference (Example: ABC123456789)
Comments Comments (Optional)

Response Fields

Field Description
LineId A temporary unique id for the record speciified in the request.
Defaults to the record index starting at 1.
PaymentId The unique cin7 payment id.
PaymentImportedRef A unique payment reference (Example: Ref456)
OrderId The unique cin7 order id
OrderRef A unique order reference (Example: Ref123)
Errors Returns "Failed" if the payment to update was not found

Insert a payment

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdatePayments
    
OrderRef,PaymentImportedRef,Active,Method,Direction,Amount,Date,TransactionAuthorized,TransactionRef
Ref123,Ref456,1,Direct Credit,1,123.50,2013-09-16 1:00:00,1,ABC123456789

Response

LineId,PaymentId,PaymentImportedRef,OrderId,OrderRef,Errors
1,1001,Ref456,12345,Ref123,

Update payment reference

Request

POST https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=UpdatePayments
    
PaymentId,TransactionAuthorized,TransactionRef
1001,1,ABC123456789

Response

LineId,PaymentId,PaymentImportedRef,OrderId,OrderRef,Errors
1,1001,Ref456,12345,Ref123,

Delete Payments


Delete payments using a where statement. The where statement can use any fields from the Get Payments Response Fields.
Returns a list of deleted records or returns blank if no records were deleted.

Action

DeletePayments

Url format

GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid={apiid}&apikey={apikey}&action=DeletePayments&where={where}

Response Fields

Field Description
PaymentId The unique cin7 payment id.
PaymentImportedRef A unique payment reference (Example: Ref456)
OrderId The unique cin7 order id
OrderRef A unique order reference (Example: Ref123)

Delete all payments from an order

Request

Where: OrderRef='Ref123'
    
GET https://api.cin7.com/cloud/APILite/APILite.ashx?apiid=123&apikey=12345&action=DeletePayments&where=OrderRef%3D'Ref123'

Response

PaymentId,PaymentImportedRef,OrderId,OrderRef
1001,Ref456,12345,Ref123
1002,Ref457,12345,Ref123