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
Parameters | Type | Required | Limitations | Details |
---|---|---|---|---|
partner.key | string | optional | Partner identification. | |
customer.key | string | optional | Customer identification. | |
key | string | optional | Transactio ID. | |
limit | integer | no | A limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 15. | |
page | integer | no | The 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
Parameters | Type | Required | Limitations | Details |
---|---|---|---|---|
customer | object[] | yes | Customer data. | |
customer.key | string | yes | Customer identification. The same value from customer creation. | |
key | string | optional | Payment 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. | |
amount | string | yes | A full amount of the purchase. Partnero will calculate partner's reward based on program settings. | |
product_id | string | optional | Product ID. It is used to for advanced commmission calculation. | |
product_type | string | optional | Product type or category. It is used to for advanced commmission calculation. | |
action | string | yes | Can be anything, but we prefer sale . It's visible in the program. | |
options | object[] | optional | ||
options.create_customer | string | optional | true or false | Use this option to create a customer and a transaction at the same time. |
customer.partner | object[] | optional | Partner data. Can be used when the customer is being created at the same time. | |
customer.partner.key | string | optional | Partner's key to whom you are willing to create a customer. Should be populated with UNIQUE_PARTNER_KEY . | |
customer.partner.id | string | optional | Alternatively, Partner ID can be used instead of key . | |
customer.partner.email | string | optional | Alternatively, 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"
}