v4

OpenAPI 3.1.02026-08-012402353.8 MB

Sandbox: Settle a Card Authorization

Simulates the settlement of an authorization by a card acquirer. After a card authorization is created, the merchant will eventually send a settlement. This simulates that event, which may occur many days after the purchase in production. The amount settled can be different from the amount originally authorized, for example, when adding a tip to a restaurant bill.

post/simulations/card_settlements

Request body

amountinteger

The amount to be settled. This defaults to the amount of the Pending Transaction being settled, or a random amount if pending_transaction_id is not provided.

card_idstring required

The identifier of the Card to create a settlement on.

pending_transaction_idstring

The identifier of the Pending Transaction for the Card Authorization you wish to settle. If not provided, the settlement will be force posted without a Card Authorization.

Example request

{
  "card_id": "card_oubs0hwk5rn6knuecxg2",
  "pending_transaction_id": "pending_transaction_k1sfetcau2qbvjbzgju4"
}

Response

Transaction

account_idstring required

The identifier for the Account the Transaction belongs to.

amountinteger required

The Transaction amount in the minor unit of its currency. For dollars, for example, this is cents.

created_atstring date-time required

The ISO 8601 date and time at which the Transaction occurred.

currency'USD' required

The ISO 4217 code for the Transaction's currency. This will match the currency on the Transaction's Account.

descriptionstring required

An informational message describing this transaction. Use the fields in source to get more detailed information. This field appears as the line-item on the statement.

idstring required

The Transaction identifier.

route_idstring nullable required

The identifier for the route this Transaction came through. Routes are things like cards and ACH details.

route_type'account_number' | 'card' | 'lockbox' nullable required

The type of the route this Transaction came through.

type'transaction' required

A constant representing the object's type. For this resource it will always be transaction.

Example response

{
  "account_id": "account_in71c4amph0vgo2qllky",
  "amount": 100,
  "created_at": "2020-01-31T23:59:59Z",
  "currency": "USD",
  "description": "INVOICE 2468",
  "id": "transaction_uyrp7fld2ium70oa7oi",
  "route_id": "account_number_v18nkfqm6afpsrvy82b2",
  "route_type": "account_number",
  "source": {
    "category": "inbound_ach_transfer",
    "inbound_ach_transfer": {
      "addenda": null,
      "amount": 100,
      "originator_company_descriptive_date": null,
      "originator_company_discretionary_data": null,
      "originator_company_entry_description": "RESERVE",
      "originator_company_id": "0987654321",
      "originator_company_name": "BIG BANK",
      "receiver_id_number": "12345678900",
      "receiver_name": "IAN CREASE",
      "trace_number": "021000038461022",
      "transfer_id": "inbound_ach_transfer_tdrwqr3fq9gnnq49odev"
    }
  },
  "type": "transaction"
}