Credit Invoice with Paystack
POST /api/v1/Invoice/:invoiceId/credit-with-paystack
Description
This endpoint is used to credit an invoice with Paystack. It expects the invoiceId as a path parameter and transactionRef as a query parameter. It returns a GuidResponse object containing the result of the operation.
Headers:
- Content-Type: application/json
ApiKey:
- No API key required
Path Parameters:
-
version: string, required -
invoiceId: string, required (format: uuid)
Query Parameters:
- transactionRef: string, optional
Request Body:
- None
URL:
- POST:
{{baseUrl API url}}/api/v1/Invoice/{invoiceId}/credit-with-paystack
Response:
- A GuidResponse object containing the result of the operation.
Error Codes:
-
400: Bad Request
-
404: Resource not found
-
500: Internal server error
Example Request URL:
POST /api/v1/Invoice/98f2d2e5-6140-4f19-9b58-48c5003e92f7/credit-with-paystack?transactionRef=123456
Example Response:
HTTP/1.1 200 OK
{
"guid": "ab04623a-b256-41df-9e8e-bdc5cccf75cb"
}
Method: POST
/api/v1/Invoice/:invoiceId/credit-with-paystack?transactionRef=<string>
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Query Params
| Param | value |
|---|---|
| transactionRef | <string> |
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": "<uuid>"
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/Invoice/:invoiceId/credit-with-paystack \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!