Daftra API
DocsAll EndpointsDaftra Partners
DocsAll EndpointsDaftra Partners
  1. Invoice Payments
  • Welcome
  • Getting Started
  • Authorization
  • authorization
    • Authenticate
      POST
  • Invoices
    • GET Single Invoice
      GET
    • Edit Invoices
      PUT
    • Delete Invoices
      DELETE
    • GET All Invoices
      GET
    • Add New Invoice
      POST
  • Estimates
    • GET Single Estimate
      GET
    • Edit Estimates
      PUT
    • Delete Estimates
      DELETE
    • GET All Estimates
      GET
    • Add New Estimate
      POST
  • Credit Notes
    • GET Single Credit Note
      GET
    • Edit Credit Notes
      PUT
    • Delete Credit Notes
      DELETE
    • GET All Credit Notes
      GET
    • Add New Credit Note
      POST
  • Refund Receipts
    • GET Single Refund Receipt
      GET
    • Edit Refund Receipts
      PUT
    • Delete Refund Receipts
      DELETE
    • GET All Refund Receipts
      GET
    • Add New Refund Receipt
      POST
  • Clients
    • GET Single Client
    • Edit Clients
    • Delete Clients
    • GET All Clients
    • Add New Client
  • Suppliers
    • GET Single Supplier
    • Edit Suppliers
    • Delete Suppliers
    • GET All Suppliers
    • Add New Supplier
  • Work Orders
    • GET Single Work Order
    • Edit Work Orders
    • Delete Work Orders
    • GET All Work Orders
    • Add New Work Order
  • Client Appointments
    • GET Single Client Appointment
    • Edit Client Appointments
    • Delete Client Appointments
    • GET All Client Appointments
    • Add New Client Appointment
  • Invoice Appointments
    • GET Single Invoice Appointment
    • Edit Invoice Appointments
    • Delete Invoice Appointments
    • GET All Invoice Appointments
    • Add New Invoice Appointment
  • Estimate Appointments
    • GET Single Estimate Appointment
    • Edit Estimate Appointments
    • Delete Estimate Appointments
    • GET All Estimate Appointments
    • Add New Estimate Appointment
  • Work Order Appointments
    • GET Single Work Order Appointment
    • Edit Work Order Appointments
    • Delete Work Order Appointments
    • GET All Work Order Appointments
    • Add New Work Order Appointment
  • Notes
    • GET Single Note
    • Edit Notes
    • Delete Notes
    • GET All Notes
    • Add New Note
  • Time Tracking
    • GET Single Time Tracking
    • Edit Time Tracking
    • Delete Time Tracking
    • GET All Time Tracking
    • Add New Time Tracking
  • Invoice Payments
    • GET Single Invoice Payment
      GET
    • Edit Invoice Payments
      PUT
    • Delete Invoice Payments
      DELETE
    • GET All Invoice Payments
      GET
    • Add New Invoice Payment
      POST
  • Client Payments
    • GET Single Client Payment
    • Edit Client Payments
    • Delete Client Payments
    • GET All Client Payments
    • Add New Client Payment
  • Products
    • GET Single Product
    • Edit Products
    • Delete Products
    • GET All Products
    • Add New Product
  • Journals
    • GET Single Journal
    • Edit Journals
    • Delete Journals
    • GET All Journals
    • Add New Journal
  • Journal Accounts
    • GET Single Journal Account
    • Edit Journal Accounts
    • Delete Journal Accounts
    • GET All Journal Accounts
    • Add New Journal Account
  • Journal Cats
    • GET Single Journal Cat
    • Edit Journal Cats
    • Delete Journal Cats
    • GET All Journal Cats
    • Add New Journal Cat
  • Expenses
    • GET Single Expens
    • Edit Expenses
    • Delete Expenses
    • GET All Expenses
    • Add New Expens
  • Incomes
    • GET Single Income
    • Edit Incomes
    • Delete Incomes
    • GET All Incomes
    • Add New Income
  • Taxes
    • GET Single Taxe
    • Edit Taxes
    • Delete Taxes
    • GET All Taxes
    • Add New Taxe
  • Purchase Invoices
    • GET Single Purchase Invoice
    • Edit Purchase Invoices
    • Delete Purchase Invoices
    • GET All Purchase Invoices
    • Add New Purchase Invoice
  • Purchase Refunds
    • GET Single Purchase Refund
    • Edit Purchase Refunds
    • Delete Purchase Refunds
    • GET All Purchase Refunds
    • Add New Purchase Refund
  • Stock Transactions
    • GET Single Stock Transaction
    • Edit Stock Transactions
    • Delete Stock Transactions
    • GET All Stock Transactions
    • Add New Stock Transaction
  • Stores
    • GET Single Store
    • Edit Stores
    • Delete Stores
    • GET All Stores
    • Add New Store
  • Product Categories
    • GET Single Product Category
    • GET All Product Categories
  • Staff
    • GET Single Staff
    • GET All Staff
  • Client-attendance-log
    • Add New Client-attendance-log
  • Follow Up Actions
    • GET Single Follow Up Action
    • Delete Follow Up Action
    • GET All Follow Up Actions
  • Follow Up Statuses
    • GET Single Follow Up Status
    • Delete Follow Up Status
    • GET All Follow Up Statuses
  • General Listing
    • GET General Listing
  • Site
    • GET Site Info
  • Treasuries
    • GET Single Treasury
    • Edit Treasuries
    • Delete Treasuries
    • GET All Treasuries
    • Add New Treasury
  1. Invoice Payments

Add New Invoice Payment

Production
https://{{subdomain}}.daftra.com/api2
Production
https://{{subdomain}}.daftra.com/api2
POST
https://{{subdomain}}.daftra.com/api2
/invoice_payments{format}
Invoice Payments
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://.daftra.com/api2/invoice_payments' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "InvoicePayment": {
        "invoice_id": 0,
        "payment_method": "string",
        "amount": 0,
        "transaction_id": "string",
        "treasury_id": 0,
        "date": "2019-08-24T14:15:22Z",
        "email": "string",
        "status": 0,
        "notes": "string",
        "response_code": "string",
        "response_message": "string",
        "created": "2019-08-24T14:15:22Z",
        "modified": "2019-08-24T14:15:22Z",
        "currency_code": "str",
        "first_name": "string",
        "last_name": "string",
        "address1": "string",
        "address2": "string",
        "city": "string",
        "state": "string",
        "postal_code": "string",
        "country_code": "str",
        "phone1": "string",
        "phone2": "string",
        "transaction_type": "string",
        "processed": true,
        "attachment": "string",
        "staff_id": 0,
        "receipt_notes": "string"
    }
}'
Response Response Example
202 - Example 1
{
  "code": 202,
  "result": "successful",
  "id": "2415"
}

Request

Path Params
format
string 
required
Header Params
Accept
string 
optional
Default:
application/json
Content-Type
string 
optional
Default:
application/json
Authorization
string 
optional
You can generate the bearer token using the the authorization endpoint then use it here to be able to operate over your account's data
Default:
Bearer {{access_token}}
apikey
string 
deprecated
You can find/generate your apikey(s) from inside your Daftra Account
Default:
{{apikey}}
Body Params application/json
InvoicePayment
object 
PaymentBase
optional
invoice_id
integer <int64>
required
Invoice REF#, you can get it through the Invoices API
payment_method
string 
required
Method of payment
<= 100 characters
amount
number <double>
required
Amount paid
transaction_id
string 
optional
Visual identifier for the process
<= 100 characters
treasury_id
integer 
optional
Treasury Ref get it from GET Treasuries
date
string <date-time>
optional
date of the payment
email
string 
optional
Optional Email
<= 255 characters
status
integer <int32>
optional
Status of the payment 0=>failded, 1=>completed , 2=>pending, 3=>not completed
notes
string 
optional
Notes for payment
response_code
string 
optional
Response code of the API called ex:(stripe , paypal , .. )
response_message
string 
optional
Response message of the API called ex:(stripe , paypal , .. )
created
string <date-time>
optional
Time of creation for the client
modified
string <date-time>
optional
Last Time this Payment was updated
currency_code
string 
optional
3 Digit currency code following ISO 4217 standard
<= 3 characters
first_name
string 
optional
First Name (Extra Info)
<= 255 characters
last_name
string 
optional
Last name (Extra Info)
<= 255 characters
address1
string 
optional
Address line 1 (Extra Info)
<= 255 characters
address2
string 
optional
Address line 2 (Extra Info)
<= 255 characters
city
string 
optional
City (Extra Info)
<= 255 characters
state
string 
optional
State (Extra Info)
<= 100 characters
postal_code
string 
optional
Postal code (Extra Info)
<= 10 characters
country_code
string 
optional
Country ISO "ALPHA-2" Code (Extra Info)
<= 3 characters
phone1
string 
optional
Phone number (Extra Info)
<= 50 characters
phone2
string 
optional
Mobile number (Extra Info)
<= 50 characters
transaction_type
string 
optional
!!
<= 255 characters
processed
boolean 
optional
0/1 if the payment is processed
attachment
string 
optional
Link for the attachment
<= 255 characters
staff_id
integer <int32>
optional
Staff user submitting the request get it from GET STAFF API if it's 0 that means the site owner is the staff that created it
receipt_notes
string 
optional
Notes for the receipt .
Examples

Responses

🟢202Accepted
application/json
Created
Body
code
integer 
optional
Example:
202
result
string 
optional
Example:
successful
id
integer 
optional
Example:
2415
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
Previous
GET All Invoice Payments
Next
GET Single Client Payment