POST
/
business
/
{business}
/
payments
/
{transaction_reference}
/
refunds
curl --request POST \
  --url https://stage.tonder.io/api/v1/business/{business}/payments/{transaction_reference}/refunds \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 10.5
}'
[
  {
    "id": 17,
    "provider": "tonder",
    "country": "N/A",
    "currency_code": "MXN",
    "created": "2024-06-28T08:15:24.600617-05:00",
    "modified": "2024-06-28T08:15:24.600654-05:00",
    "operation_date": "2024-06-28T13:15:23-05:00",
    "transaction_reference": "16566015",
    "response": {
      "card_account": {
        "issuing_country_code": "IL",
        "masked_pan": "458000...0059"
      },
      "customer": {
        "email": "test@email.com"
      },
      "payment_data": {
        "id": "16563893",
        "remaining_amount": 40
      },
      "refund_data": {
        "amount": 5,
        "auth_code": "gUuMXr",
        "created": "2024-06-28T13:15:23Z",
        "currency": "MXN",
        "id": "16566015",
        "is_3d": false,
        "status": "COMPLETED"
      },
      "payment_method": "BANKCARD",
      "merchant_order": {
        "description": "Requested by the client",
        "id": "TNDR-76b9de76-eeee-42e9-b4bf-255943831ee9"
      }
    },
    "transaction_type": "REFUND",
    "status": "Success",
    "amount": "5.0000",
    "related_transaction_reference": "16563893",
    "reason": null,
    "is_refunded": null,
    "is_disputed": null,
    "number_of_payment_attempts": null,
    "payment_method_old": null,
    "is_card_international": false,
    "card_brand": null,
    "number_of_installments": 1,
    "incoming_request": null,
    "metadata": null,
    "tonder_intra_transaction_rate": null,
    "tonder_inter_transaction_rate": null,
    "tonder_transaction_fee": null,
    "is_fees_computed": false,
    "fee_amount": null,
    "net_amount": null,
    "rolling_reserve_amount": null,
    "has_balance_transaction": false,
    "business": {
      "id": 97,
      "created": "2024-02-13T13:34:54.796510-06:00",
      "modified": "2024-06-26T19:12:49.988659-05:00",
      "name": "Demo 7",
      "web": "www.google.com",
      "logo": "https://zplit-stage.s3.amazonaws.com/media/business_logos/Web_1920__13dsjcejd2x.png",
      "checkout_logo": "https://zplit-stage.s3.amazonaws.com/media/business_checkout_logos/Web_1920__13dsjcejd2x.png",
      "background_color": "#f2f2f2",
      "primary_color": "#1c202b",
      "textCheckoutColor": "#ffffff",
      "textDetailsColor": "#1c202b",
      "checkout_mode": false,
      "total_annual_sales": "L",
      "average_order_sale": "0.00",
      "comission": "5.00",
      "status": "A",
      "first_time_filled": true,
      "business_info": false,
      "business_legal_representation": false,
      "business_bank_details": false,
      "show_presentation_data": false,
      "enabled_smart_routing": true,
      "enabled_finances": true,
      "risk_level": "Low",
      "timezone": "America/Mexico_City",
      "can_change_tonder_psp": false,
      "enabled_orchestration": true,
      "user": 792,
      "e_commerce_platform": null,
      "country": 1,
      "currency": 5,
      "categories": [
        1
      ]
    },
    "payment": {
      "id": 24943,
      "created": "2024-06-27T18:43:37.519849-05:00",
      "modified": "2024-06-27T18:43:38.523950-05:00",
      "amount": "45.0000",
      "status": "PENDING",
      "date": "2024-06-27T18:43:37.519966-05:00",
      "paid_date": null,
      "source": null,
      "customer_order_reference": "TNDR-76b9de76-eeee-42e9-b4bf-255943831ee9",
      "client": 846,
      "business": 97,
      "shipping_address": null,
      "billing_address": null,
      "order": 28579
    },
    "currency": {
      "id": 5,
      "name": "Mexican Peso",
      "code": "MXN",
      "symbol": "$",
      "country": null
    },
    "payment_method": null,
    "issuing_country": null
  }
]

The Authorization needs to be in the following format:

Authorization: Token <YOUR_API_KEY>

Use this endpoint to refund a payment, either partially or in full.

Path Parameters

business
string
required

The unique identifier of the business.

transaction_reference
string
required

The unique reference of the transaction to be refunded.

Body

application/json
amount
number
required

The monetary value to be refunded.

Example:

10.5

Response

200 - application/json
Refund processed successfully
id
integer

The unique identifier of the refund transaction.

Example:

17

provider
string

The payment service provider for the transaction.

Example:

"tonder"

country
string

The country associated with the refund.

Example:

"N/A"

currency_code
string

The currency code used for the transaction.

Example:

"MXN"

created
string

The timestamp when the refund was created.

Example:

"2024-06-28T08:15:24.600617-05:00"

modified
string

The timestamp when the refund was last modified.

Example:

"2024-06-28T08:15:24.600654-05:00"

operation_date
string

The date and time when the refund operation was performed.

Example:

"2024-06-28T13:15:23-05:00"

transaction_reference
string

The reference identifier of the original transaction.

Example:

"16566015"

response
object

The response details of the refund operation.

transaction_type
string

The type of transaction (e.g., REFUND).

Example:

"REFUND"

status
string

The status of the transaction.

Example:

"Success"

amount
string

The amount refunded.

Example:

"5.0000"

The reference identifier of the related transaction.

Example:

"16563893"

reason
string | null

The reason for the refund, if provided.

Example:

null

is_refunded
boolean | null

Indicates if the transaction has been refunded.

Example:

null

is_disputed
boolean | null

Indicates if the transaction is disputed.

Example:

null

number_of_payment_attempts
integer | null

The number of payment attempts made for the transaction.

Example:

null

payment_method_old
string | null

The previous payment method, if applicable.

Example:

null

is_card_international
boolean

Indicates if the card used is international.

Example:

false

card_brand
string | null

The brand of the card used.

Example:

null

number_of_installments
integer

The number of installments for the transaction.

Example:

1

incoming_request
string | null

Details of the incoming request, if any.

Example:

null

metadata
string | null

Additional metadata associated with the transaction.

Example:

null

tonder_intra_transaction_rate
number | null

The intra-transaction rate for Tonder.

Example:

null

tonder_inter_transaction_rate
number | null

The inter-transaction rate for Tonder.

Example:

null

tonder_transaction_fee
number | null

The transaction fee charged by Tonder.

Example:

null

is_fees_computed
boolean

Indicates if the fees have been computed.

Example:

false

fee_amount
number | null

The fee amount charged.

Example:

null

net_amount
number | null

The net amount after fees.

Example:

null

rolling_reserve_amount
number | null

The rolling reserve amount, if any.

Example:

null

has_balance_transaction
boolean

Indicates if there is a balance transaction.

Example:

false

business
object

Details about the business associated with the transaction.

payment
object

Details about the payment.

currency
object

Details about the currency used.

payment_method
string | null

The payment method used.

Example:

null

issuing_country
string | null

The issuing country of the payment method.

Example:

null