This article describes the tools of the Post Affiliate Pro MCP server, including the parameters each tool accepts and the fields it returns. For connecting an AI tool to your account, see MCP integration for merchants.
You do not have to call the tools yourself — your AI tool chooses them based on your questions and requests. This reference helps you understand what an AI tool can and cannot do in your account, and why it asks for certain information.
An AI tool sees only the tools allowed by the access you granted. With read-only access, tools that make changes are not offered. Each tool below lists the access it requires: read tools need the …:read access and write tools the …:write access of the respective area. Your merchant role's privileges apply as well.
Every tool returns a JSON object. When a call fails or is not allowed, the tool returns an error message instead, e.g. Tool 'create_affiliate' requires scope(s) affiliates:write which the used credentials do not grant.
Note: Amounts are in the account currency and dates use the YYYY-MM-DD format.
Paging through results
Tools that return lists return one page of results at a time, 30 rows by default and at most 100 rows with the per_page parameter.
search_affiliates,search_transactions,search_clicksandtop_affiliates_reportreturn the rows initemsand anext_cursor. To get the next page, pass thenext_cursorascursor. The last page is followed by a page with no items.list_campaignsandlist_bannersreturn the rows indataand the paging information inpagination. To get the next page, passpagination.last_idandpagination.last_valueaslast_idandlast_value.
Read-only tools
These tools look up data in your account without changing anything.
Who am I (whoami)
Returns the account and the merchant the connection acts as, the account currency and time zone, and whether the connection may make changes. AI tools usually call it first. It is always available, regardless of the granted access.
Parameters
None.
Returns
| Field | Description |
|---|---|
| account | name, account_id, currency, timezone and date_format of the account. |
| user | id, username, email, first_name, last_name and role of the merchant. |
| access | can_read, can_write and the list of granted scopes. |
Describe signup fields (describe_signup_fields)
Lists the fields of the affiliate signup and profile form, including the custom data1–data25 fields with their meaning. AI tools call it before creating or updating affiliates, or before working with custom fields. Disabled fields are not listed.
Required access: affiliates:read
Parameters
None.
Returns
| Field | Description |
|---|---|
| fields | List of form fields. Each has a code (e.g. refid, data1), label, type, required flag, description and the allowed choices of list, radio and checkbox group fields. The refid entry also contains the referral ID rules (format, numeric_only, min_length, max_length) when they are enforced. |
Get account settings (get_account_settings)
Returns the account settings: currency and number and date formatting, program name and version, server time and time zone, logos and the names of tracking URL parameters.
Required access: settings:read
Parameters
None.
Returns
| Field | Description |
|---|---|
| application | Program name, version, currency, currency symbol and formatting, date and time format and default language. |
| server | Current time, time zone and maintenance mode flag. |
| design | Logo URLs. |
| tracking | Tracking script settings and the names of the URL parameters used for affiliate, banner, campaign, data1, data2 and destination URL. |
| generated_at | Time the response was generated. |
Search affiliates (search_affiliates)
Lists or searches affiliates. All filters are optional and are combined.
Required access: affiliates:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| search | No | Free-text search over affiliate name, email and username. |
| status | No | Return only affiliates in the selected statuses: approved, pending or declined. Several statuses can be combined. |
| sort | No | Field to sort by, e.g. created_at, last_name or approved_at. Prefix it with - for descending order, e.g. -created_at. By default, the oldest affiliates come first. |
| per_page | No | Number of results per page, 1–100. Default is 30. |
| cursor | No | Fetch the next page: pass the next_cursor returned by the previous call. Omit for the first page. |
Returns
| Field | Description |
|---|---|
| items | The rows of the current page, with the fields listed below. |
| next_cursor | Pass it as cursor to get the next page. A page with no items means there are no more results. |
| total | Total number of matching rows. Returned on the first page only. |
Each row contains id, referral_id, first_name, last_name, username, status, created_at, approved_at, parent_id, parent_first_name, parent_last_name, parent_status, notification_email, starred and the custom data fields defined in the signup form.
Get affiliate (get_affiliate)
Returns the profile of one affiliate.
Required access: affiliates:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| affiliate_id | Yes | ID of the affiliate, as returned by search_affiliates. |
Returns
| Field | Description |
|---|---|
| id, referral_id, first_name, last_name, username | Identification of the affiliate. |
| created_at, approved_at | Signup and approval time. |
| parent_id | ID of the parent affiliate. |
| minimum_payout, payout_option_id | Payout settings, when set. |
| last_login_at, login_count, language_code, agreed_to_terms | Login and profile details, when set. |
| data1 – data25 | Custom data fields defined in the signup form. |
Search transactions (search_transactions)
Lists or searches transactions (commissions). All filters are optional and are combined. Without a period or dates, transactions from all time are searched. Refunds and chargebacks are separate transactions with negative amounts.
Required access: transactions:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| status | No | Return only transactions in the selected statuses: approved, pending or declined. Several statuses can be combined. |
| payout_status | No | paid or unpaid. |
| type | No | Return only the selected transaction types: sale, action, click, recurring, cpm, cpm-click, signup, referral, refund, chargeback, extra-bonus. |
| affiliate_id | No | Only transactions of this affiliate, as returned by search_affiliates. |
| campaign_id | No | Only transactions of this campaign, as returned by list_campaigns. |
| banner_id | No | Only transactions of this banner, as returned by list_banners. |
| visitor_id | No | Only transactions of this visitor, as returned by get_transaction. |
| order_id | No | Only transactions with this order ID. Separate several order IDs with commas. |
| product_id | No | Only transactions with this product ID. |
| ip | No | Only transactions tracked from this IPv4 or IPv6 address. |
| tier | No | Commission tier: 1 for direct commissions, 2 and higher for parent affiliates' commissions. |
| action_code | No | Only action commissions with this action code. |
| min_commission, max_commission | No | Commission range in the account currency, inclusive. |
| min_total_cost, max_total_cost | No | Order amount range in the account currency, inclusive. |
| period | No | Predefined creation period: today, yesterday, this_week, last_week, last_working_week, this_month, last_month, this_year, last_year, this_quarter, last_quarter, last_7_days, last_30_days, last_60_days, last_90_days. Overrides date_from and date_to. |
| date_from, date_to | No | Created on or after / on or before this date, in YYYY-MM-DD format. When both dates are set, the range can be at most 366 days. |
| approved_from, approved_to | No | Approved on or after / on or before this date, in YYYY-MM-DD format. |
| starred | No | true returns only transactions starred in the merchant panel. |
| sort | No | Field to sort by, e.g. created_at, commission or total_cost. Prefix it with - for descending order, e.g. -created_at. By default, the oldest transactions come first. |
| per_page | No | Number of results per page, 1–100. Default is 30. |
| cursor | No | Fetch the next page: pass the next_cursor returned by the previous call. Omit for the first page. |
Returns
| Field | Description |
|---|---|
| items | The rows of the current page, with the fields listed below. |
| next_cursor | Pass it as cursor to get the next page. A page with no items means there are no more results. |
| total | Total number of matching rows. Returned on the first page only. |
Each row contains id, commission, total_cost, order_id, product_id, created_at, campaign_id, campaign_name, type, tier, commission_type, action_code, status, payout_status, affiliate_id, affiliate_first_name, affiliate_last_name, affiliate_status, data1–data5 and starred. Use get_transaction for the approval time, visitor, IP address and notes.
Get transaction (get_transaction)
Returns the full detail of one transaction.
Required access: transactions:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| transaction_id | Yes | ID of the transaction, as returned by search_transactions. |
Returns
| Field | Description |
|---|---|
| id, order_id, product_id | Identification of the transaction. |
| affiliate_id, campaign_id, banner_id, account_id | Related affiliate, campaign, banner and account. |
| type, status, tier, action_code | Type, status, commission tier and action code. |
| total_cost, commission | Order amount and commission in the account currency. |
| created_at, approved_at | Creation and approval time. |
| payout_status, payout_history_id | unpaid, paid or to_pay, and the payout the transaction belongs to. |
| visitor_id, ip, referer_url, browser, country_code, track_method | Tracking details. |
| first_click_*, last_click_*, click_count | Time, referrer, IP address and data1/data2 of the first and the last click, and the number of clicks. |
| parent_transaction_id, recurring_comm_id | Related original transaction and recurring commission. |
| data1 – data5 | Custom transaction fields. |
| merchant_note | Note visible to the affiliate. |
| system_note | Internal note visible to merchants only. |
Diagnose order (diagnose_order)
Explains what happened to one order ID: whether the sale request was received, how it was processed, whether a commission was created, and how the affiliate, campaign and banner were recognized. If the logs do not explain it, it also checks whether the visitor was referred by an affiliate and whether the cookie had expired. Use it to answer questions like Why is there no commission for order 1234?
Required access: transactions:read
Note: Sale requests are kept for about 60 days, clicks for about 185 days by default, and the detailed event log only for a few days. Each part of the result requires the corresponding privilege of your merchant role; parts you cannot see are skipped and listed in permissions.
Parameters
| Parameter | Required | Description |
|---|---|---|
| order_id | Yes | Order ID passed to the tracking. |
| search_clicks_by_ip | No | true also looks up clicks by the IP address of the sale, not only by the visitor ID. Useful when the tracking cookie was lost. A shared IP address can return clicks of unrelated visitors. Default is false. |
Returns
| Field | Description |
|---|---|
| found | Whether any sale request or commission exists for the order. |
| commission_created | Whether a commission was created. |
| sale_requests | Up to 20 sale requests with the time received, processing status and reason, recognition method, visitor ID, IP address and referrer. |
| commissions | Up to 20 commissions with the affiliate, campaign, banner, type, status, reason, recognition method and amount. |
| visitor_attribution | Affiliates bound to the visitor, with the click time and cookie expiration. |
| visitor_clicks | Clicks of the visitor. |
| processing_trace | Up to 200 lines of the event log describing how the sale was processed. |
| permissions | Which parts of the result your role is allowed to see. |
List campaigns (list_campaigns)
Lists campaigns. All filters are optional and are combined.
Required access: campaigns:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| search | No | Campaign name contains this text (at least 3 characters). |
| alias | No | Campaign alias shown to affiliates contains this text (at least 3 characters). |
| status | No | Return only campaigns in the selected statuses: active, paused (stopped but visible to affiliates) or stopped (invisible). |
| type | No | Return only the selected campaign types: public, public_manual (joining needs approval) or private (invitation only). |
| is_default | No | true returns only the default campaign, false all others. |
| account_id | No | Only campaigns of this merchant account (Post Affiliate Network only). |
| starred | No | true returns only campaigns starred in the merchant panel. |
| per_page | No | Number of results per page, 1–100. Default is 30. |
| last_id | No | Fetch the next page: pass pagination.last_id returned by the previous call. |
| last_value | No | Fetch the next page: pass pagination.last_value returned by the previous call. |
Returns
| Field | Description |
|---|---|
| data | The rows of the current page, with the fields listed below. |
| pagination | per_page, last_id and last_value for the next page. The first page also contains total_count, the total number of matching rows. |
Each row contains id, name, alias, type, status, description, created_at, order, is_default, logo_url, product_ids, overwrite_cookie, cookie_lifetime, account_id, account_name, account_status, has_commissions, commissions_details and starred.
Get campaign (get_campaign)
Returns the detail of one campaign.
Required access: campaigns:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| campaign_id | Yes | ID of the campaign, as returned by list_campaigns. |
Returns
| Field | Description |
|---|---|
| id, name, alias, description | Identification of the campaign. |
| type, status, is_default, order | Campaign type, status, default flag and display order. |
| created_at | Creation time. |
| logo_url, product_ids | Logo and product IDs, when set. |
| overwrite_cookie, cookie_lifetime | Cookie settings. |
| account_id, account_status | Merchant account of the campaign. |
| has_commissions | Whether the campaign has commissions defined. |
List banners (list_banners)
Lists banners. All filters are optional and are combined. For example, use it to find all banners that point to a given landing page.
Required access: banners:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| campaign_id | No | Only banners of this campaign, as returned by list_campaigns. |
| status | No | Return only banners in the selected statuses: active or hidden. |
| type | No | Return only the selected banner types: image, text, link, html, email, coupon, pdf, site, rotator, popup, page_peel, page_peel_html, lightbox. |
| is_confirmed | No | true returns only confirmed banners, false only unconfirmed ones. |
| search | No | Banner name contains this text (at least 3 characters). |
| destination_url | No | Landing page URL, or its part (at least 3 characters), the banner points to. |
| destination_url_match | No | How destination_url is matched: contains (default) or starts_with. |
| starred | No | true returns only banners starred in the merchant panel. |
| per_page | No | Number of results per page, 1–100. Default is 30. |
| last_id | No | Fetch the next page: pass pagination.last_id returned by the previous call. |
| last_value | No | Fetch the next page: pass pagination.last_value returned by the previous call. |
Returns
| Field | Description |
|---|---|
| data | The rows of the current page, with the fields listed below. |
| pagination | per_page, last_id and last_value for the next page. The first page also contains total_count, the total number of matching rows. |
Each row contains id, name, campaign_id, campaign_name, type, created_at, is_confirmed, destination_url, status, order and starred.
Get banner (get_banner)
Returns the detail of one banner.
Required access: banners:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| banner_id | Yes | ID of the banner, as returned by list_banners. |
Returns
| Field | Description |
|---|---|
| id, name, description | Identification of the banner. |
| type, status, is_confirmed, order | Banner type, status, confirmation flag and display order. |
| campaign_id, campaign_name | Campaign of the banner. |
| destination_url, target | Landing page URL and link target. |
| size | Size preset code. |
| created_at | Creation time. |
| data1 – data9 | Banner content. The meaning depends on the banner type, e.g. image URL of an image banner or HTML code of an HTML banner. |
Search clicks (search_clicks)
Lists individual clicks. All filters are optional and are combined. Without a period or dates, clicks from all time are searched. To find the clicks behind a commission, filter by the visitor_id returned by get_transaction.
Required access: transactions:read
Note: Raw clicks are kept for about 185 days by default, on some accounts for a shorter time.
Parameters
| Parameter | Required | Description |
|---|---|---|
| affiliate_id | No | Only clicks of this affiliate. |
| campaign_id | No | Only clicks in this campaign. |
| banner_id | No | Only clicks on this banner. |
| visitor_id | No | Only clicks of this visitor. |
| country_code | No | Two-letter country code, e.g. US. |
| ip | No | Only clicks from this IPv4 or IPv6 address. |
| type | No | Return only the selected click types: unique, repeated or declined. |
| period | No | Predefined period: today, yesterday, this_week, last_week, last_working_week, this_month, last_month, this_year, last_year, this_quarter, last_quarter, last_7_days, last_30_days, last_60_days, last_90_days. Overrides date_from and date_to. |
| date_from, date_to | No | Clicked on or after / on or before this date, in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format. When both dates are set, the range can be at most 366 days. |
| sort | No | Field to sort by, e.g. created_at. Prefix it with - for descending order. By default, the newest clicks come first. |
| per_page | No | Number of results per page, 1–100. Default is 30. |
| cursor | No | Fetch the next page: pass the next_cursor returned by the previous call. Omit for the first page. |
Returns
| Field | Description |
|---|---|
| items | The rows of the current page, with the fields listed below. |
| next_cursor | Pass it as cursor to get the next page. A page with no items means there are no more results. |
| total | Total number of matching rows. Returned on the first page only. |
Each row contains id, affiliate_id, campaign_id, banner_id, country_code, type, created_at, visitor_id, ip, channel_id, data1 and data2.
Traffic overview (traffic_overview)
Returns summary statistics for a period: clicks, transactions and sales by status with commission totals, affiliate count and conversion rate. Useful for questions like How are we doing this month?
Required access: stats:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| period | No | Predefined period: today, yesterday, this_week, last_week, last_working_week, this_month, last_month, this_year, last_year, this_quarter, last_quarter, last_7_days, last_30_days, last_60_days, last_90_days. When neither a period nor dates are set, this_month is used. |
| period_from, period_to | No | Custom period, in YYYY-MM-DD format. Ignored when period is set. When both dates are set, the range can be at most 366 days. |
Returns
| Field | Description |
|---|---|
| period | The period the statistics cover. |
| clicks | all, unique, raw and declined clicks. |
| transactions | Order amounts (totalcost), commissions and counts of all transactions, split into all, approved, pending, declined and paid. |
| sales | The same as transactions, for sales only. |
| affiliates | Number of affiliates. |
| conversion_rate | Transactions per 100 clicks, split by status. |
| generated_at | Time the response was generated. |
Top affiliates report (top_affiliates_report)
Returns the performance of each affiliate in a period, one row per affiliate. Transactions of every status, including declined ones, are counted unless you narrow them.
Required access: stats:read
Parameters
| Parameter | Required | Description |
|---|---|---|
| period | No | Predefined period: today, yesterday, this_week, last_week, last_working_week, this_month, last_month, this_year, last_year, this_quarter, last_quarter, last_7_days, last_30_days, last_60_days, last_90_days. When neither a period nor dates are set, this_month is used. |
| date_from, date_to | No | Custom period, in YYYY-MM-DD format. When both dates are set, the range can be at most 366 days. |
| campaign_id | No | Count only transactions and clicks of this campaign. |
| banner_id | No | Count only transactions and clicks of this banner. |
| transaction_status | No | Count only transactions in the selected statuses: approved, pending or declined, e.g. approved for what is actually payable. |
| payout_status | No | Count only paid or only unpaid transactions. |
| affiliate_status | No | List only affiliates in the selected statuses: approved, pending or declined. |
| min_count, min_totalcost, min_commission, min_profit, min_sales_count, min_sales_commission, min_clicks_all | No | List only affiliates whose value is at least this number. |
| sort | No | Column to rank by: affiliate_first_name, affiliate_last_name, count, totalcost, commission, profit, sales_count, sales_commission or clicks_all. Prefix it with - for descending order, e.g. -commission. By default, rows are sorted by affiliate name. |
| per_page | No | Number of results per page, 1–100. Default is 30. |
| cursor | No | Fetch the next page: pass the next_cursor returned by the previous call. Omit for the first page. |
Returns
| Field | Description |
|---|---|
| items | The rows of the current page, with the fields listed below. |
| next_cursor | Pass it as cursor to get the next page. A page with no items means there are no more results. |
| total | Total number of matching rows. Returned on the first page only. |
Each row contains id, affiliate_first_name, affiliate_last_name, count (number of transactions), totalcost (sum of order amounts), commission (sum of commissions), profit (order amounts minus commissions), sales_count, sales_commission and clicks_all.
Write tools
These tools change data in your account. They are available only when you grant write access, and every change is recorded in Tools > Event logs.
Create affiliate (create_affiliate)
Creates a new affiliate. The affiliate is approved or pending according to your affiliate approval settings. Signup and referral bonuses are created when your commission settings define them. Calling it again with the same username fails.
Required access: affiliates:write
Parameters
| Parameter | Required | Description |
|---|---|---|
| username | Yes | Login email of the affiliate. |
| full_name | Yes | First and last name, separated by a space, e.g. John Doe. |
| referral_id | Depends | Referral ID used in the affiliate's links. Must be unique. Required when describe_signup_fields reports it as required (default setup), and must match the format reported there. |
| password | No | Password. Generated when omitted. |
| notification_email | No | Notification email. Defaults to the username. |
| parent_id | No | ID of the parent affiliate. |
| send_notification_email | No | Send the welcome email. Default is false. |
| custom_fields | No | Custom data fields, e.g. {"data3": "My Company"}. Only data1–data25 are accepted. |
Returns
| Field | Description |
|---|---|
| Affiliate profile | The created affiliate, in the same format as get_affiliate. |
Update affiliate (update_affiliate)
Updates the details of an affiliate. Only the parameters you pass are changed, and at least one of them must be passed. Use set_affiliate_status to change the status.
Required access: affiliates:write
Parameters
| Parameter | Required | Description |
|---|---|---|
| affiliate_id | Yes | ID of the affiliate, as returned by search_affiliates. |
| full_name | No | First and last name, separated by a space, e.g. John Doe. |
| notification_email | No | Notification email. |
| referral_id | No | Referral ID. |
| parent_id | No | ID of the new parent affiliate. |
| custom_fields | No | Custom data fields to change, e.g. {"data3": "My Company"}. An empty value clears the field. |
Returns
| Field | Description |
|---|---|
| Affiliate profile | The updated affiliate, in the same format as get_affiliate. |
Set affiliate status (set_affiliate_status)
Changes the status of an affiliate, e.g. approves a pending signup. It works the same way as changing the status in the merchant panel.
Required access: affiliates:write
Parameters
| Parameter | Required | Description |
|---|---|---|
| affiliate_id | Yes | ID of the affiliate, as returned by search_affiliates. |
| status | Yes | New status: approved, pending or declined. |
| send_notification_email | No | Notify the affiliate about the status change. Default is true. |
Returns
| Field | Description |
|---|---|
| id | ID of the affiliate. |
| status | New status. |
| updated_at | Time of the change. |
Delete affiliate (delete_affiliate)
Permanently deletes an affiliate. If your account requires deletions to be confirmed by email, the deletion waits for that confirmation.
Required access: affiliates:write
Important: Deleting an affiliate cannot be undone. To stop an affiliate, set its status to declined with set_affiliate_status instead.
Parameters
| Parameter | Required | Description |
|---|---|---|
| affiliate_id | Yes | ID of the affiliate, as returned by search_affiliates. |
Returns
| Field | Description |
|---|---|
| id | ID of the affiliate. |
| deleted | true when the affiliate was deleted. |
| status | pending_confirmation when the deletion waits for email confirmation. |
Create commission (create_commission)
Creates a transaction (commission) for an affiliate, like adding a transaction manually in the merchant panel. When you do not pass the commission amount, it is calculated from the campaign and commissions for the parent affiliates are created as well. When you pass the amount, only one commission with exactly that amount is created. Each call creates new transactions.
Required access: transactions:write
Parameters
| Parameter | Required | Description |
|---|---|---|
| affiliate_id | Yes | ID of the affiliate to credit. |
| type | Yes | Transaction type: sale, action, click, referral, signup or extra-bonus. |
| campaign_id | Depends | ID of the campaign. Required together with action_code. |
| order_id | Depends | Order ID. Required for sales and actions. |
| total_cost | Depends | Order amount in the account currency. Required for sales. Must not be negative. |
| commission | No | Fixed commission amount. Calculated from the campaign when omitted. |
| action_code | No | With type action only: code of the action commission type of the campaign. Required when the campaign has several action commission types. |
| product_id | No | Product ID. |
| status | No | Initial status: approved, pending or declined. |
| data1 – data5 | No | Custom transaction fields. |
Returns
| Field | Description |
|---|---|
| Transaction | The created direct (tier 1) transaction: id, order_id, affiliate_id, campaign_id, type, status, commission, total_cost, merchant_note, data1–data5, created_at and approved_at. |
Set transaction status (set_transaction_status)
Changes the status of one transaction, e.g. approves a pending commission, optionally with notes. Only the given transaction is changed; commissions of parent affiliates for the same sale keep their status. Notes are saved only when the status actually changes.
Required access: transactions:write
Parameters
| Parameter | Required | Description |
|---|---|---|
| transaction_id | Yes | ID of the transaction, as returned by search_transactions. |
| status | Yes | New status: approved, pending or declined. |
| note_public | No | Replaces the merchant note of the transaction. The affiliate can see it. |
| note_internal | No | Appended to the system note of the transaction. Visible to merchants only. |
| send_notification_email | No | Notify the affiliate about the status change. Default is false. |
Returns
| Field | Description |
|---|---|
| id | ID of the transaction. |
| status | New status. |
| updated_at | Time of the change. |
Refund order (refund_order)
Refunds all commissions of an order, including the commissions of parent affiliates. A refund transaction with negative amounts is created for each of them; the original transactions are kept. Pass the refunded amount for a partial refund — the commissions are then reduced in the same proportion. An order that is already refunded is not refunded again.
Required access: transactions:write
Important: A refund cannot be undone.
Parameters
| Parameter | Required | Description |
|---|---|---|
| order_id | Yes | Order ID of the commissions to refund. |
| total_cost | No | Partial refund: the refunded order amount in the account currency, greater than 0. Omit to refund the whole order. |
| product_id | Depends | Refund only the commissions of this product. Required together with total_cost when the order contains several products. |
| note_public | No | Reason or reference for the refund, saved as the merchant note. The affiliate can see it. |
| note_internal | No | Appended to the system note of the refund transaction. Visible to merchants only. |
| send_notification_email | No | Notify the affiliate. Default is true. |
Returns
| Field | Description |
|---|---|
| message | Confirmation of the refund. |
| order_id | Order ID. |
Chargeback order (chargeback_order)
Works the same way as refund_order, but creates chargeback transactions instead of refunds.
Required access: transactions:write
Important: A chargeback cannot be undone.
Parameters
| Parameter | Required | Description |
|---|---|---|
| order_id | Yes | Order ID of the commissions to charge back. |
| total_cost | No | Partial chargeback: the charged-back order amount in the account currency, greater than 0. Omit to charge back the whole order. |
| product_id | Depends | Charge back only the commissions of this product. Required together with total_cost when the order contains several products. |
| note_public | No | Reason or reference for the chargeback, saved as the merchant note. The affiliate can see it. |
| note_internal | No | Appended to the system note of the chargeback transaction. Visible to merchants only. |
| send_notification_email | No | Notify the affiliate. Default is true. |
Returns
| Field | Description |
|---|---|
| message | Confirmation of the chargeback. |
| order_id | Order ID. |
Create recurring commission (create_recurring_commission)
Creates a recurring commission for an existing order, e.g. for a subscription renewal. The affiliate is taken from the recurring commission of the original order. Requires the Recurring commissions feature to be enabled. Each call creates a new commission.
Required access: transactions:write
Parameters
| Parameter | Required | Description |
|---|---|---|
| order_id | Yes | Order ID of the original sale with the recurring commission. |
| total_cost | No | Amount of this recurring payment, used to calculate the commission. |
| currency | No | ISO currency code of the payment. |
| new_order_id | No | Order ID of the new commission. Defaults to the original order ID. |
Returns
| Field | Description |
|---|---|
| message | Confirmation that the recurring commission was created. |
| order_id | Order ID. |