Settle charge

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Settle an authorized charge. This is the second step in a two-step payment process with an authorization and subsequent settle. Optionally the amount and order lines of the charge can be adjusted. Multiple settles can be performed up to the authorized amount if the payment method allows this. If order lines are provided the first settle will change the order lines and subsequent settles will add the order lines provided.

Errors relating to acquirer declines and acquirer processing errors will result in a HTTP 200 OK with an error description in the error_state and error parameters. For processing errors the state is left unchanged. For irrecoverable acquirer declines for the first settle, the state of the charge will be changed to failed. Use the error_state, error and state parameters to determine if the operation was successful. If only one settle is performed the state parameter can solely be used. It should be settled after successful settle. For multiple settles the state is already settled so the error and/or error_state parameter must be used to determine success.

Error handling if a settle operation fails is important, as this is a money carrying operation. We recommend using an idempotency key for retrying the same settle operation. This is especially important for partial settles so a retry does not result in additional partial captures. Our recommendations for error handling is given in the tables below.

ErrorHandling
Communication error (no HTTP respoonse)
or HTTP server error 5xx
Retry operation immediately or later, preferably with an idempotency key to avoid multiple settles if a partial settle is performed. Retry is important as the settle operation can actually have gone through so money has been moved.
HTTP client error 4xxCheck your implementation. One error that can be expected for full settles, and if an idempotency key is not used is “Invoice already settled”, as described below. For a retry it can be interpreted as success if the idempotency key is not used.
Other non 200 HTTP responseSomething is wrong. Handle as for communication error and contact Frisbii Billing and Pay if the problem persists.
state = settled and error_state = <null>Success
error_state = hard_declinedThe settle operation has been declined by acquirer or issuer. No further attempts should be made.
error_state = soft_declinedIn rare occasions the result of a settle operation can be a soft decline (possibly recoverable). A retry could be performed later, but is not required, as no money has been moved.

When retrying a new idempotency key must be used as it is a separate transaction.
error_state = processing_errorA processing error can happen if something goes wrong at, or in between, any of the parties involved in a transaction. A processing error can potentially have resulted in an approved settle, but the result never reaches Frisbii Billing and Pay. E.g. a timeout somewhere in the chain. Processing errors leading to transactions actually having been completed without knowing the result is frustrating, but luckily quite rare.

We recommend to retry later on a processing error, but only a few times.

Errors

The operation can generate the following errors beside the generic HTTP error codes described here.

Error code HTTP codeDescription
31404Invoice not found
79400Invoice already settled - no remaining authorized amount to settle
106400Invoice not authorized
102400New amount provided is higher than the authorized amount
129400Multiple settles not allowed - invoice has already been settled once and payment method does not allow multiple settles
130400Partial settle not allowed - payment method does not allow a partial settle
Path Params
string
required

Charge handle

Body Params
string

Optional idempotency key. Only one settle can be performed for the same handle. If two settle attempts are attempted and the first succeeds the second will fail because charge is already settled or authorized. An idempotency key identifies uniquely the request and multiple requests with the same key will yield the same result. In case of networking errors the same request with same key can safely be retried.

int32
≥ 0

Optional amount different from authorized amount to settle. Must be less than or equal to the authorized amount. Either amount or order_lines can be provided. If multiple partial settles are performed the total settled amount cannot exceed the authorized amount. If partial settles are used a subsequent settle with no amount will settle the remaining amount up to the authorized amount.

string

Optional alternative order text to use in conjunction with amount. Ignored if order_lines is provided. If new amount is provided either ordertext or order_lines must be provided, otherwise order lines will default to a single empty line.

order_lines
array of objects

Optional new order lines to replace old order lines for the charge. The order lines controls the amount. The new amount must be less than or equal to the authorized amount. See amount.

order_lines
string

Optional reference for the transaction at the acquirer. Notice the following about this argument:

  1. It only works for some acquirers.
  2. Acquirers may have rigid rules on the content of the acquirer reference.
    Not complying to these rules can result in declined payments.
  3. It is already possible to define custom acquirer reference using templating in the Frisbii Administration.
    Contact support for help. We highly recommend to only supply this argument if absolutely necessary,
    and the templated default acquirer reference is not sufficient. Maximum length is 128,
    but most acquirers require a maximum length of 22 characters.
    Truncating will be applied if too long for specific acquirer.
    Characters must match regex [\x20-\x7F]
manual_settle
object

Optional manual transfer. If given the invoice will be settled using the manual transfer transaction.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json