Skip to main content

Get Credit details with Paystack

GET /api/v1/Invoice/:invoiceId/credit-with-paystack

Description

This endpoint is used to get the details of a credit operation 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:

  • GET: {{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:

GET /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"
}

Notes:

  • The API response will contain the result of the credit operation with Paystack for the specified invoiceId.

  • The transactionRef query parameter is optional and can be used to provide a transaction reference for the credit operation.

Method: GET

/api/v1/Invoice/:invoiceId/credit-with-paystack?transactionRef=<string>

Headers

Content-TypeValue
Accepttext/plain

Query Params

Paramvalue
transactionRef<string>

Response: 200

{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": "<uuid>"
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--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!