Generate a Client Session
POST
https://sand-api.monoova.com/au/card/ccm/CreditCardTransaction/token
Body Parameters
- bodyCreateCreditCardTokenDtorequiredDescription
- clientTransactionUniqueReferencestringrequiredExampleDescriptionDefaultPAY-20261013-0001Pattern^[a-zA-Z0-9_-]{1,40}$
- ledgerAccountNumberstringExampleDescriptionDefault6123456789012345Pattern^6[0-9]{15}$
- cardMerchantIdstringExampleDescriptionDefaultCM123456Pattern^[ -~]{1,35}$
- customerCustomerDtorequiredDescription
- customerIdstringExampleDescriptionDefaultCUST-10045Pattern^[a-zA-Z0-9_-]{1,40}$
- firstNamestringExampleDescriptionDefaultJaneMax Length60Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- lastNamestringExampleDescriptionDefaultCitizenMax Length60Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- billingAddressAddressDtoDescription
- firstNamestringrequiredExampleDescriptionDefaultJaneMin Length1Max Length60Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- lastNamestringrequiredExampleDescriptionDefaultCitizenMin Length1Max Length60Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- streetstring[]requiredExample
[ "Level 5", "1 Walker Street" ]
DescriptionDefaultLevel 5,1 Walker Street - suburbstringrequiredExampleDescriptionDefaultNorth SydneyMin Length1Max Length14Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- statestringrequiredExampleDescriptionDefaultNSWMin Length1Max Length3Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- postalCodestringrequiredExampleDescriptionDefault2060Min Length1Max Length14Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- countryCodestringrequiredExampleDescriptionDefaultAUPattern^[A-Z]{2}$
- emailAddressstringExampleDescriptionDefaultMax Length40Pattern^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~ -]+[\.a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]*@[a-zA-Z0-9-_]+[.a-zA-Z0-9-_]*\.[a-zA-Z]{2,15}$
- paymentDetailsPaymentDetailsInrequiredDescription
- cardTypestringExampleDescriptionDefaultVisaPattern^(Visa|Mastercard|Amex)$
- descriptionstringrequiredExampleDescriptionDefaultOrder 10045Max Length40Pattern^[^#<>$%^_=[\]\\{}|;~`]+$
- saveOnSuccessstringExampleDescriptionDefaultfalsePattern^(true|false)$
- clientPaymentTokenUniqueReferencestringExampleDescriptionDefaultTOKEN-0001Max Length40Pattern^[a-zA-Z0-9_-]{1,40}$
- capturePaymentstringExampleDescriptionDefaulttruePattern^(true|false)$
- applySurchargestringExampleDescriptionDefaulttruePattern^(true|false)$
- allowCreditstringExampleDescriptionDefaulttruePattern^(true|false)$
- surchargeDetailsSurchargeDetailsDtoDescription
- amexnumber<double>ExampleDescriptionDefault2.5FormatdoublePattern^[0-9]+(\.[0-9]+)?$
- applePaynumber<double>ExampleDescriptionDefault1.2FormatdoublePattern^[0-9]+(\.[0-9]+)?$
- googlePaynumber<double>ExampleDescriptionDefault1.2FormatdoublePattern^[0-9]+(\.[0-9]+)?$
- mastercardnumber<double>ExampleDescriptionDefault1.2FormatdoublePattern^[0-9]+(\.[0-9]+)?$
- visanumber<double>ExampleDescriptionDefault1.2FormatdoublePattern^[0-9]+(\.[0-9]+)?$
- amountPaymentAmountDtorequiredDescription
- currencyAmountnumber<decimal>requiredExampleDescriptionDefault150.75FormatdecimalMinimum0Maximum20000000Pattern^[0-9]{1,8}(\.[0-9]{1,2})?$Multiple Of0.01
Responses
200
- CreateCreditCardTokenResponseExample
{ "traceId": "56d6855e-721a-56c2-8b67-8699f6c2aa70", "clientTransactionUniqueReference": "PAY-20261013-0001", "clientToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRTZXNzaW9uIjoiUEFZLTIwMjYxMDEzLTAwMDEifQ.c2lnbmF0dXJlLWV4YW1wbGU", "clientTokenExpirationDate": "2026-10-14T04:30:15Z" }- traceIdstringExampleDescriptionDefault71170aca-7ed5-5045-b317-39f21a1d985ePattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- clientTransactionUniqueReferencestringExampleDescriptionDefaultPAY-20261013-0001Pattern^[a-zA-Z0-9_-]{1,40}$
- clientTokenstringExampleDescriptionDefaulteyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRTZXNzaW9uIjoiUEFZLTIwMjYxMDEzLTAwMDEifQ.c2lnbmF0dXJlLWV4YW1wbGUPattern^\S+$
- clientTokenExpirationDatestringExampleDescriptionDefault2026-10-14T04:30:15ZPattern^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?(Z|[+-][0-9]{2}:[0-9]{2})?$
400
- ErrorResponseExample
{ "traceId": "5c29ca93-6b4f-53d1-80be-716ea4d940b2", "errors": [ { "errorCode": "CCM_AMOUNT_INVALID", "errorMessage": "amount.currencyAmount must be between 0 and 20000000" } ] }- traceIdstringExampleDescriptionDefault71170aca-7ed5-5045-b317-39f21a1d985ePattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultCCM_VALIDATION_ERRORPattern^CCM_[A-Za-z0-9_]+$
- errorMessagestringExampleDescriptionDefaultError validating request message - amount.currencyAmount requiredPattern^.+$
- sourceErrorCodestringExampleDescriptionDefaultDECLINEDPattern^\S+$
- sourceErrorMessagestringExampleDescriptionDefaultTransaction declined by issuerPattern^.+$
401
403
- ErrorResponseExample
{ "traceId": "ee8caf6b-5f89-5891-8d3f-21a82fb886d9", "errors": [ { "errorCode": "CCM_ACC_DISABLED_ERROR", "errorMessage": "Card transactions disabled for accountId 6279059700012345" } ] }- traceIdstringExampleDescriptionDefault71170aca-7ed5-5045-b317-39f21a1d985ePattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultCCM_VALIDATION_ERRORPattern^CCM_[A-Za-z0-9_]+$
- errorMessagestringExampleDescriptionDefaultError validating request message - amount.currencyAmount requiredPattern^.+$
- sourceErrorCodestringExampleDescriptionDefaultDECLINEDPattern^\S+$
- sourceErrorMessagestringExampleDescriptionDefaultTransaction declined by issuerPattern^.+$
404
- ErrorResponseExample
{ "traceId": "afb87dcf-366b-5baa-a2d3-41b25365620a", "errors": [ { "errorCode": "CCM_ACC_NOT_FOUND_ERROR", "errorMessage": "account not found for accountId 6279059700012345" } ] }- traceIdstringExampleDescriptionDefault71170aca-7ed5-5045-b317-39f21a1d985ePattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultCCM_VALIDATION_ERRORPattern^CCM_[A-Za-z0-9_]+$
- errorMessagestringExampleDescriptionDefaultError validating request message - amount.currencyAmount requiredPattern^.+$
- sourceErrorCodestringExampleDescriptionDefaultDECLINEDPattern^\S+$
- sourceErrorMessagestringExampleDescriptionDefaultTransaction declined by issuerPattern^.+$
500
- ErrorResponseExample
{ "traceId": "af2e9294-17a4-5d85-ba99-2fd57431dd2c", "errors": [ { "errorCode": "CCM_UNEXPECTED_ERROR", "errorMessage": "Internal server error. Please contact Monoova support." } ] }- traceIdstringExampleDescriptionDefault71170aca-7ed5-5045-b317-39f21a1d985ePattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultCCM_VALIDATION_ERRORPattern^CCM_[A-Za-z0-9_]+$
- errorMessagestringExampleDescriptionDefaultError validating request message - amount.currencyAmount requiredPattern^.+$
- sourceErrorCodestringExampleDescriptionDefaultDECLINEDPattern^\S+$
- sourceErrorMessagestringExampleDescriptionDefaultTransaction declined by issuerPattern^.+$
502
504
- ErrorResponseExample
{ "traceId": "ca4d494e-4134-5136-af1a-9d45fe4c5e21", "errors": [ { "errorCode": "CCM_CC_GWM_TIMEOUT", "errorMessage": "Timeout from CC Gateway Manager" } ] }- traceIdstringExampleDescriptionDefault71170aca-7ed5-5045-b317-39f21a1d985ePattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultCCM_VALIDATION_ERRORPattern^CCM_[A-Za-z0-9_]+$
- errorMessagestringExampleDescriptionDefaultError validating request message - amount.currencyAmount requiredPattern^.+$
- sourceErrorCodestringExampleDescriptionDefaultDECLINEDPattern^\S+$
- sourceErrorMessagestringExampleDescriptionDefaultTransaction declined by issuerPattern^.+$
curl
curl --request POST \
--url https://sand-api.monoova.com/au/card/ccm/CreditCardTransaction/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data-raw '{
"clientTransactionUniqueReference": "PAY-20261013-0001",
"ledgerAccountNumber": "6123456789012345",
"cardMerchantId": "CM123456",
"customer": {
"customerId": "CUST-10045",
"firstName": "Jane",
"lastName": "Citizen",
"billingAddress": {
"firstName": "Jane",
"lastName": "Citizen",
"street": [
"Level 5",
"1 Walker Street"
],
"suburb": "North Sydney",
"state": "NSW",
"postalCode": "2060",
"countryCode": "AU"
},
"emailAddress": "[email protected]"
},
"paymentDetails": {
"cardType": "Visa",
"description": "Order 10045",
"saveOnSuccess": "false",
"clientPaymentTokenUniqueReference": "TOKEN-0001",
"capturePayment": "true",
"applySurcharge": "true",
"allowCredit": "true",
"surchargeDetails": {
"amex": 2.5,
"applePay": 1.2,
"googlePay": 1.2,
"mastercard": 1.2,
"visa": 1.2
}
},
"amount": {
"currencyAmount": 150.75
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"clientTransactionUniqueReference": "PAY-20261013-0001",
"ledgerAccountNumber": "6123456789012345",
"cardMerchantId": "CM123456",
"customer": {
"customerId": "CUST-10045",
"firstName": "Jane",
"lastName": "Citizen",
"billingAddress": {
"firstName": "Jane",
"lastName": "Citizen",
"street": [
"Level 5",
"1 Walker Street"
],
"suburb": "North Sydney",
"state": "NSW",
"postalCode": "2060",
"countryCode": "AU"
},
"emailAddress": "[email protected]"
},
"paymentDetails": {
"cardType": "Visa",
"description": "Order 10045",
"saveOnSuccess": "false",
"clientPaymentTokenUniqueReference": "TOKEN-0001",
"capturePayment": "true",
"applySurcharge": "true",
"allowCredit": "true",
"surchargeDetails": {
"amex": 2.5,
"applePay": 1.2,
"googlePay": 1.2,
"mastercard": 1.2,
"visa": 1.2
}
},
"amount": {
"currencyAmount": 150.75
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sand-api.monoova.com/au/card/ccm/CreditCardTransaction/token", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://sand-api.monoova.com/au/card/ccm/CreditCardTransaction/token")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"clientTransactionUniqueReference": "PAY-20261013-0001",
"ledgerAccountNumber": "6123456789012345",
"cardMerchantId": "CM123456",
"customer": {
"customerId": "CUST-10045",
"firstName": "Jane",
"lastName": "Citizen",
"billingAddress": {
"firstName": "Jane",
"lastName": "Citizen",
"street": [
"Level 5",
"1 Walker Street"
],
"suburb": "North Sydney",
"state": "NSW",
"postalCode": "2060",
"countryCode": "AU"
},
"emailAddress": "[email protected]"
},
"paymentDetails": {
"cardType": "Visa",
"description": "Order 10045",
"saveOnSuccess": "false",
"clientPaymentTokenUniqueReference": "TOKEN-0001",
"capturePayment": "true",
"applySurcharge": "true",
"allowCredit": "true",
"surchargeDetails": {
"amex": 2.5,
"applePay": 1.2,
"googlePay": 1.2,
"mastercard": 1.2,
"visa": 1.2
}
},
"amount": {
"currencyAmount": 150.75
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://sand-api.monoova.com/au/card/ccm/CreditCardTransaction/token"
payload = json.dumps({
"clientTransactionUniqueReference": "PAY-20261013-0001",
"ledgerAccountNumber": "6123456789012345",
"cardMerchantId": "CM123456",
"customer": {
"customerId": "CUST-10045",
"firstName": "Jane",
"lastName": "Citizen",
"billingAddress": {
"firstName": "Jane",
"lastName": "Citizen",
"street": [
"Level 5",
"1 Walker Street"
],
"suburb": "North Sydney",
"state": "NSW",
"postalCode": "2060",
"countryCode": "AU"
},
"emailAddress": "[email protected]"
},
"paymentDetails": {
"cardType": "Visa",
"description": "Order 10045",
"saveOnSuccess": "false",
"clientPaymentTokenUniqueReference": "TOKEN-0001",
"capturePayment": "true",
"applySurcharge": "true",
"allowCredit": "true",
"surchargeDetails": {
"amex": 2.5,
"applePay": 1.2,
"googlePay": 1.2,
"mastercard": 1.2,
"visa": 1.2
}
},
"amount": {
"currencyAmount": 150.75
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success. The client session token was generated.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"clientTransactionUniqueReference": "PAY-20261013-0001",
"clientToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRTZXNzaW9uIjoiUEFZLTIwMjYxMDEzLTAwMDEifQ.c2lnbmF0dXJlLWV4YW1wbGU",
"clientTokenExpirationDate": "2026-10-14T04:30:15Z"
}400
// Bad request. The request failed validation - for example a mandatory field is missing, a value does not match the documented pattern, or the transaction reference has already been used.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"errors": [
{
"errorCode": "CCM_VALIDATION_ERROR",
"errorMessage": "Error validating request message - amount.currencyAmount required",
"sourceErrorCode": "DECLINED",
"sourceErrorMessage": "Transaction declined by issuer"
}
]
}401
// Unauthorized. The bearer token is missing, malformed or expired. Generate a new bearer token and retry the request.
403
// Forbidden. Your mAccount is not permitted to perform this operation - for example card payments are not enabled for your account.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"errors": [
{
"errorCode": "CCM_VALIDATION_ERROR",
"errorMessage": "Error validating request message - amount.currencyAmount required",
"sourceErrorCode": "DECLINED",
"sourceErrorMessage": "Transaction declined by issuer"
}
]
}404
// Not found. A referenced resource was not found - for example card payments have not been set up for your mAccount, or the cardMerchantId does not exist.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"errors": [
{
"errorCode": "CCM_VALIDATION_ERROR",
"errorMessage": "Error validating request message - amount.currencyAmount required",
"sourceErrorCode": "DECLINED",
"sourceErrorMessage": "Transaction declined by issuer"
}
]
}500
// Internal server error. An unexpected condition prevented Monoova from completing the request. Retry the request and contact Monoova support if the error persists.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"errors": [
{
"errorCode": "CCM_VALIDATION_ERROR",
"errorMessage": "Error validating request message - amount.currencyAmount required",
"sourceErrorCode": "DECLINED",
"sourceErrorMessage": "Transaction declined by issuer"
}
]
}502
// Bad gateway. A downstream service returned an invalid response, so the outcome of the request is unknown. Check the result with Get Transaction By Id before you retry.
504
// Gateway timeout. A downstream service did not respond in time, so the outcome of the request is unknown. Check the result with Get Transaction By Id before you retry.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"errors": [
{
"errorCode": "CCM_VALIDATION_ERROR",
"errorMessage": "Error validating request message - amount.currencyAmount required",
"sourceErrorCode": "DECLINED",
"sourceErrorMessage": "Transaction declined by issuer"
}
]
}