This page is a ZenPay-styled copy of the Zenith Payments developer documentation. View the original docs
Credit Requests API
A credit request is a disbursement of funds to a customer bank account. Credits are submitted with a customer reference, amount, and destination account proxy.
Create a credit request#
View this endpoint in the original docs
Creates a credit request from the supplied request payload.
Authentication: Api-Key + BasicAuth
Request body
Credit request details required to create a credit request.
Content types: application/json, application/x-www-form-urlencoded · required
Schema: CreditsRequest
| Field | Type | Description |
|---|---|---|
creditAmount required | number <double> | Payment amount. |
customerName required | string | Customer name. Max length: 100 |
customerReference required | string | Customer reference. Max length: 20 |
paymentAccountProxy required | string | Payment Account Proxy. Max length: 50 |
reason required | string | Credit reason. Max length: 50 |
requestUniqueId required | string | Unique credit id provided by the merchant. Max length: 50 |
Example: Credit request created
Shows submission and the resulting pending credit request.
{
"creditAmount": 1,
"customerName": "Test Customer",
"customerReference": "cr-1210180471651",
"paymentAccountProxy": "858b5f59d687468da8b76d0487184f95",
"reason": "Example capture",
"requestUniqueId": "credit-8662342847790"
}Responses
201 Credit created.
application/json · object (CreditRequestResponse)
Example: Credit request created
Shows submission and the resulting pending credit request.
{
"creditAmount": 1,
"creditReference": 1188,
"merchantCode": "1337",
"merchantName": "Menethil",
"requestReason": "Example capture",
"requestStatus": 0,
"requestStatusString": "Pending",
"requestUniqueId": "credit-8662342847790",
"status": 6
}400 Invalid input detail.
application/json · object
403 Merchant is forbidden to perform this operation.
application/json · object
409 UniqueId is not unique.
application/json · object
412 Not allowed due to limit or not eligible to process.
application/json · object
Example: Card proxy not eligible
Shows the eligibility refusal; changing the amount alone does not demonstrate eligibility.
{
"errorCode": "ERR",
"errorMessage": "The Proxy provided is not eligible for credit."
}Example: Daily credit limit reached
A limit refusal requires different handling from an ineligible payment account.
{
"errorCode": "ERR",
"errorMessage": "Maximum amount of credits per day limit reached."
}422 Merchant is forbidden to perform this operation.
application/json · object
500 Something went wrong. Please try again.
application/json · object
Example request (cURL, sandbox host)
curl -X POST 'https://api.sandbox.zenpay.com.au/v2/credit-requests' \
-H 'Api-Key: <your API key>' \
-u '<username>:<password>' \
-H 'Content-Type: application/json' \
-d '{
"creditAmount": 1,
"customerName": "Test Customer",
"customerReference": "cr-1210180471651",
"paymentAccountProxy": "858b5f59d687468da8b76d0487184f95",
"reason": "Example capture",
"requestUniqueId": "credit-8662342847790"
}'Get a credit request#
View this endpoint in the original docs
Returns the credit request for the specified request unique ID.
Authentication: Api-Key + BasicAuth
Parameters
| Name | In | Type | Description |
|---|---|---|---|
requestUniqueId required | path | string | The merchant's unique identifier for the credit request. |
Responses
200 Found the credit.
application/json · object (CreditRequestResponse)
Example: Credit request pending
Read straight after creating the credit, before ZenPay has processed it; preserving the captured array response.
[
{
"creditAmount": 1,
"creditReference": 1188,
"merchantCode": "1337",
"merchantName": "Menethil",
"requestReason": "Example capture",
"requestStatus": 0,
"requestStatusString": "Pending",
"requestUniqueId": "credit-8662342847790",
"status": 6
}
]404 Unable to find the credit.
Example request (cURL, sandbox host)
curl -X GET 'https://api.sandbox.zenpay.com.au/v2/credit-requests/{requestUniqueId}' \
-H 'Api-Key: <your API key>' \
-u '<username>:<password>' \
-H 'Accept: application/json'