Help & Support

Need some assistance? Don't worry, we've got your back.

Minimum information to send in API Requests

Minimum information to send in API Requests

While Metricsco’s API allows you to send many parameters with each Transaction, we are often asked ‘What is the bare minimum information that Metricsco API requires ?’.

The following is an example of the minimum necessary information is required by the API:

{
"Amount": "20",
"ClientId": "trx-123456788",
"Currency": "USD",
"Processor": "OptimalPayments",
"ProcessingResult": "false",
"ProcessorErrorCode": "1000",
"Type": "Subscription",
"Card":
{
"ClientId": "cl-123456",
"Bin": "411111",
"Last4": "1234",
"NameOnCard": "John Doe",
"ExpMonth": "10",
"ExpYear": "2019",
},
"Subscription" :
{
"ClientId": "s-12345678",
"Plan" :
{
"ClientId": "12345"
}
}
}

Afterwards, whenever sending a transaction for the same subscription, the Credit Card and the Pricing Plan information is not required and can be referenced by the ‘CliendId’ value:

{
"Amount": "20",
"ClientId": "trx-123456789",
"Currency": "USD",
"Processor": "OptimalPayments",
"ProcessingResult": "false",
"ProcessorErrorCode": "1000",
"Type": "Subscription",
"Card":
{
"ClientId": "cl-123456",
},
"Subscription" :
{
"ClientId": "s-12345678",
}
}

Tip: If the subscription information has changed since the last recurring transaction (New Card, Different Pricing Plan, etc.), you can add just add the new information to the following recurring transaction. Metricsco’s API was designed to take such information and automatically update Subscription data.