User Credit Transaction

Reverse a User Credit Transaction

Changed on

Reverse a User Credit Transaction. Lead creates and returns a new User Credit Transaction of the same type with every amount negated, linked to the original. See Reversals.

post/v2/user_credit_transactions/{user_credit_transaction_id}/reverse

Request

  • Base URL
    https://api.sandbox.lead.bank
  • URL
    https://api.sandbox.lead.bank/v2/user_credit_transactions/{user_credit_transaction_id}/reverse
  • Auth
    HTTP bearer

Path parameters

user_credit_transaction_idstring required

The ID of the User Credit Transaction to be reversed.

Headers

Idempotency-Keystring required

Idempotency key

Request body

metadataMetadata

A set of key-value pairs that can be used to store additional information related to this object.

Response

The newly created reversal User Credit Transaction object.

idstring required

The ID of the User Credit Transaction object.

user_credit_balance_idstring required

The ID of the User Credit Balance that this transaction belongs to.

type'card_network' | 'funding' | 'fee' | 'fee_accrued' | 'dispute_provisional' | 'dispute_won' | 'dispute_lost' | 'charge_off' | 'charge_off_recovery' | 'rewards_earned' | 'rewards_spent' | 'rewards_redeemed' | 'interest_accrued' | 'adjustment' | 'reallocation' | 'payment' | 'cancellation' | 'client_credit' required

The type of the User Credit Transaction, which determines how the transaction affects the associated User Credit Balance.

core_transaction_idstring required
counterparty_core_transaction_idstring required
descriptionstring

A client-provided description of the transaction.

currency_code'USD' required

A three-letter currency code as defined in ISO 4217.

amountinteger required

The transaction amount, represented in minor units. See CreateUserCreditTransactionRequest.amount for the per-type sign rules. On a transaction created by a reverse action, this is the negation of the original transaction's amount.

amount_in_usdinteger

The transaction amount converted to USD, represented in minor units. On a transaction created by a reverse action, this is the negation of the original transaction's amount_in_usd.

effective_atstring date-time required

An RFC 3339 timestamp representing when the transaction is effective.

funding_idstring

The ID of the associated Funding object. Present when type is funding.

reversal_transaction_idstring

The ID of the reversal User Credit Transaction created when this transaction was reversed. Present only once this transaction has been reversed.

metadataMetadata required

A set of key-value pairs that can be used to store additional information related to this object.

created_atstring date-time required

An ISO-8601 timestamp at which the User Credit Transaction was created.

updated_atstring date-time required

An ISO-8601 timestamp at which the User Credit Transaction was last updated.

Example response

{
  "id": "user_credit_transaction_xyz123",
  "user_credit_balance_id": "user_credit_balance_xyz123",
  "type": "card_network",
  "core_transaction_id": "core_transaction_xyz123",
  "counterparty_core_transaction_id": "core_transaction_xyz123",
  "description": "Monthly card fee",
  "currency_code": "USD",
  "amount": 1500,
  "amount_in_usd": 1500,
  "amount_breakdown": {
    "fees": 1500
  },
  "effective_at": "2026-09-30T00:00:00Z",
  "details": {
    "fee_type": "card",
    "card_network": {
      "card_id": "card_xyz123",
      "bin": "412345",
      "card_network": "visa",
      "original_transaction_id": "user_credit_transaction_id_xyz",
      "network_transfer_type": "card",
      "authorization_amount": 1500,
      "authorization_currency_code": "USD",
      "settlement_amount": 1500,
      "settlement_currency_code": "USD",
      "settlement_date": "2026-09-30",
      "merchant": {
        "name": "Acme Inc.",
        "address_line_1": "123 Main St",
        "city": "Kansas City",
        "state": "MO",
        "country_code": "US",
        "zip_code": "64105",
        "mcc": "5411"
      }
    },
    "rewards": {
      "amount": 500,
      "unit": "points"
    },
    "reversal": {
      "original_transaction_id": "user_credit_transaction_xyz123"
    }
  },
  "funding_id": "funding_123",
  "reversal_transaction_id": "user_credit_transaction_abc789",
  "created_at": "2026-09-30T11:01:36Z",
  "updated_at": "2026-09-30T11:05:00Z"
}

Changes