Use Case #1
Process Payments using Invoiss
Invoiss provides a simple way to process payments from your clients.
We've created a diagram to help you understand what happens behind the scenes when you process a payment using Invoiss. View diagram
Follow these steps:
- Create a Data Map between your application software and Invoiss API.
- Create a Client (if they don't already exist, otherwise simply retrieve the clientId). A client is the entity that will be making the payment. Every order requires a client.
- Create an Order using the clientId and line items. See required and optional fields for creating an order.
- Use the following endpoint to create a Payment using the orderId:
This endpoint processes a payment for an order. Ensure you provide all the necessary information to avoid errors.
Required attributes
- Name
method
- Type
- string
- Description
The payment method (e.g., CARD, ACH).
- Name
order
- Type
- object
- Description
The order details including id and grandTotal.
- Name
company
- Type
- object
- Description
Information about the company making the payment.
- Name
signature
- Type
- string
- Description
A digital signature for the transaction.
- Name
type
- Type
- string
- Description
The transaction type (e.g., INVOICE).
- Name
amount
- Type
- number
- Description
The amount being paid.
- Name
status
- Type
- string
- Description
The status of the payment, required for certain types.
- Name
gateway
- Type
- object
- Description
The payment gateway details, required for certain types.
- Name
paymentId
- Type
- string
- Description
The unique identifier for the payment.
- Name
orderId
- Type
- string
- Description
The unique identifier for the order.
Request
POST
/public/payments/processcurl -X POST https://api.invoiss.com/public/payments/process \
-H "Authorization: {token}" \
-H "Content-Type: application/json" \
-d '{
"method": "CARD",
"order": {
"id": "order_123456",
"grandTotal": 100.00
},
"company": {
"id": "comp_78910",
"metadata": {}
},
"signature": "signature_data",
"type": "INVOICE",
"amount": 100.00,
"status": "COMPLETED",
"gateway": {
"id": "gateway_12345"
},
"paymentId": "pay_123456789",
"orderId": "order_123456"
}'
Response
{
"success": true,
"message": "Payment processed successfully"
}