Create invoice
A comprehensive testing strategy is crucial to ensure the successful integration of SmartpayGenie into your application. Here are some key testing types:
Create invoice
'POST'
Request parameters
Parameters
Type
Description
Required
customer_id
String
Unique identifier of the customer
Yes
items
String
List of items in the invoice
Yes
due_date
Object
Due date of the invoice (ISO 8601 format)
Yes
currency
String
ISO 4217 currency code
Yes
metadata
Number
Additional metadata (optional)
Yes
Request items
Parameters
Type
Description
Required
name
String
Name of the item
Yes
description
String
Description of the item
Yes
quantity
Object
Quantity of the item
Yes
price
String
Price per unit of the item
Yes
tax_rate
Number
Tax rate for the item (optional)
No
Response
200 - OK successful response
{ "id": "invoice_id", "customer_id": "customer_id", "items": [], "due_date": "2023-11-22", "currency": "USD", "total": 100, "status": "pending", "metadata": {}, "created_at": "2023-11-22T13:37:20Z" }
Note:
- You may need to implement pagination for large datasets.
- Consider adding filtering and sorting options to the endpoint for better flexibility.
- Implement appropriate security measures to protect transactions data.
Support
If you encounter any issues or have questions, please feel free to contact our dedicated
support team.We are committed to providing you with the best possible experience and support.