Create Payment Using Token
POST
https://sand-api.monoova.com/au/card/ccm/CreditCardTransaction/payment
Body Parameters
- bodyCreateCreditCardPaymentDtorequiredDescription
- 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
- CreateCreditCardPaymentResponseExample
{ "traceId": "d06ee51e-5d1e-59c6-a385-1f08e69b8c68", "clientTransactionUniqueReference": "PAY-20261013-0001", "clientPaymentTokenUniqueReference": "TOKEN-0001", "surchargeAmount": 1.81, "status": "Pending Settlement", "paymentMethodStatus": "Active" }- 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}$
- clientPaymentTokenUniqueReferencestringExampleDescriptionDefaultTOKEN-0001Pattern^[a-zA-Z0-9_-]{1,40}$
- clientTokenUniqueReferencestringExampleDescriptionDefaultTOKEN-0001Pattern^[a-zA-Z0-9_-]{1,40}$
- surchargeAmountnumber<decimal>ExampleDescriptionDefault1.81FormatdecimalPattern^[0-9]{1,8}(\.[0-9]{1,2})?$
- statusstringExampleDescriptionDefaultPending SettlementPattern^[A-Za-z ]+$
- statusReasonCodestringExampleDescriptionDefault05Pattern^\S+$
- statusReasonDescriptionstringExampleDescriptionDefaultDo not honourPattern^.+$
- paymentMethodStatusstringExampleDescriptionDefaultActivePattern^(Pending|Active|Paused|CardExpired|Deleted)$
400
- ErrorResponseExample
{ "traceId": "61cf538f-0858-5c1b-a5ea-be7b2317538f", "errors": [ { "errorCode": "CCM_ACC_LIMIT_REACHED", "errorMessage": "transaction amount 150.75 plus existing transactions 9900.00 exceeds limit 10000.00" } ] }- 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": "fc04a896-8356-516a-b308-50246a94f8dd", "errors": [ { "errorCode": "CCM_PM_DISABLED_ERROR", "errorMessage": "PaymentMethodTokens 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": "e1c7164a-f168-52aa-8006-295edefca43a", "errors": [ { "errorCode": "CCM_PM_NOT_FOUND_ERROR", "errorMessage": "Payment method token not found" } ] }- 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": "12c4ec96-45a4-5c39-8a22-12ab36bb821e", "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": "c71dac96-fb40-506d-ba91-63df89b17dee", "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/payment \
--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/payment", 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/payment")
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/payment"
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 payment request was processed; check status for the outcome. The API can also return this response with HTTP status 201 Created.
{
"traceId": "71170aca-7ed5-5045-b317-39f21a1d985e",
"clientTransactionUniqueReference": "PAY-20261013-0001",
"clientPaymentTokenUniqueReference": "TOKEN-0001",
"clientTokenUniqueReference": "TOKEN-0001",
"surchargeAmount": 1.81,
"status": "Pending Settlement",
"statusReasonCode": "05",
"statusReasonDescription": "Do not honour",
"paymentMethodStatus": "Active"
}400
// Bad request. The request failed validation - for example a mandatory field is missing, a value does not match the documented pattern, or the payment would exceed your account limit.
{
"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 or payment method tokens 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 no payment method token matches the customerId and clientPaymentTokenUniqueReference provided, 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"
}
]
}