Transactions

Transactions represent sales actions made by the customers.

Get a list of transactions

If you want to retrieve information about transactions, use this GET request:

GET https://api.partnero.com/v1/transactions

Request parameters

ParametersTypeRequiredLimitationsDetails
partner.keystringoptionalPartner identification.
customer.keystringoptionalCustomer identification.
keystringoptionalTransactio ID.
limitintegernoA limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 15.
pageintegernoThe default is 1.

Create a transaction

Create a new transaction.

POST https://api.partnero.com/v1/transactions

Request example

{
    "customer": {
        "key": "CUSTOMER_KEY"
    },
    "key": "transaction_123",
    "amount": 99.99,
    "product_id": "prod_123", // optional
    "product_type": "monthly", // optional
    "action": "sale"
}
{
    "customer": {
        "key": "CUSTOMER_KEY"
    },
    "key": "transaction_123",
    "amount": 99.99,
    "product_id": "prod_123", // optional
    "product_type": "monthly", // optional
    "action": "sale",
    "options": {
        "create_customer": true // use this option to create a customer and a transaction at the same time
    },
    "partner": {
        "key": "UNIQUE_PARTNER_KEY" // use this option to create a customer and a transaction at the same time
    }
}

Request parameters

ParametersTypeRequiredLimitationsDetails
customerobject[]yesCustomer data.
customer.keystringyesCustomer identification. The same value from customer creation.
keystringoptionalPayment ID. It is not required but recommended (must be unique). We recommend using a payment ID on your system. Later can be used to refund/delete transactions.
amountstringyesA full amount of the purchase. Partnero will calculate partner's reward based on program settings.
product_idstringoptionalProduct ID. It is used to for advanced commmission calculation.
product_typestringoptionalProduct type or category. It is used to for advanced commmission calculation.
actionstringyesCan be anything, but we prefer sale. It's visible in the program.
optionsobject[]optional
options.create_customerstringoptionaltrue or falseUse this option to create a customer and a transaction at the same time.
customer.partnerobject[]optionalPartner data. Can be used when the customer is being created at the same time.
customer.partner.keystringoptionalPartner's key to whom you are willing to create a customer. Should be populated with UNIQUE_PARTNER_KEY.
customer.partner.idstringoptionalAlternatively, Partner ID can be used instead of key.
customer.partner.emailstringoptionalAlternatively, Partner email address can be used instead of key.

Delete a transaction

Delete an existing transaction.

DELETE https://api.partnero.com/v1/transactions

Request example

{
  "key": "transaction_123"
}