Process a Settlement

POST /alternatepayments/v1/accounts/account_id/payments/payment_id/settlements

To settle a payment that has previously been authorized (that is, a manual settlement request where settleWithAuth is set to false), you must make a POST request to the settlements endpoint.

This operation is supported only for payment methods that support the manual settlement payment flow.

Request Example
curl -X POST https://api.test.paysafe.com/alternatepayments/v1/accounts/1001402050/payments/32a5f610-59bf-4a03-bef6-35ef0df64396/settlements \
 -u testuser:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
 -H 'Content-Type: application/json' \
 -d
{
   "merchantRefNum":"UniqueRef1234",
   "dupCheck":true,
   "amount":100
}

Prior to trying the example above, you should:

  • Provide a unique merchant reference number (merchantRefNum) for each transaction.
  • Replace the account number (1001402050) in the URL with the Test account number you received for the alternate payments method you are testing.
  • Replace the payment ID (32a5f610-59bf-4a03-bef6-35ef0df64396) with the payment ID you received in the response to your Payment request.
  • Replace the API key (after the -u) with the Test API key you have received.
Response Example
{
	"id": "7352aeda-1950-4e7e-ad20-548aa5491251",
	"merchantRefNum": "UniqueRef1234",
	"dupCheck": true,
	"amount": 100,
	"currencyCode": "EUR",
	"paymentType": "PAYOLUTION",
	"payolution": {
		"paymentInformation": {
			"paymentReference": "9e8a77ec-be3c-443b-8b89-a560b1eaa26a",
			"iban": "AT611904300234573201456",
			"bic": "BFRILI22XXX",
			"bankName": "Musterbank",
			"accountHolderName": "Test Merchant"
		}
	},
	"liveMode": true,
	"txnTime": "2017-06-01T15:30:45Z",
	"availableToRefund": 100,
	"status": "COMPLETED",
	"gatewayResponse": {
		"code": "0.0.0",
		"description": "The request was processed successfuly.",
		"id": "84a7d5df-723a-4100-aa46-830f11ea78d0",
		"processor": "PAYOLUTION",
		"paymentType": "DB"
	},
	"links": [{
			"rel": "self",
			"href": "https://api.test.paysafe.com/alternatepayments/v1/accounts/1001402050/settlements/7352aeda-1950-4e7e-ad20-548aa5491251"
		},
		{
			"rel": "payment",
			"href": "https://api.test.paysafe.com/alternatepayments/v1/accounts/1001402050/payments/32a5f610-59bf-4a03-bef6-35ef0df64396"
		}
	]
}

The settlement response contains the following parameters:

Value Type Description
id

string

This is a unique ID for this settlement operation. You can use it, e.g., to look up a settlement request.
merchantRefNum

string

This is the merchant reference number created by the merchant and submitted as part of the request.
dupCheck boolean

true indicates this is not a duplicate transaction.

A request is considered a duplicate if the merchantRefNum has already been used in a previous request within the past 90 days.

amount

integer

This is the amount of the request, in minor units.
currencyCode enum This is the three-digit currency code for the currency of the merchant account specified by the account_id in the request URL.
paymentType enum This is the payment type used for the request (e.g., PAYOLUTION).
payolution object These are Paysafe Pay Later (formerly Payolution) attributes that were passed that when making the payment request that is now being settled.
liveMode boolean

true indicates this is a real transaction.

false indicates this is a test transaction.

txnTime dateTime This is the transaction time and date in UTC format.
availableToRefund integer This is the amount available to refund, in minor units.
status enum

This is the status of the settlement.

  • CANCELLED – The request has been fully reversed.
  • COMPLETED – The transaction has been completed.
  • ERROR – The transaction failed due to an error (e.g., missing required parameter).
  • EXPIRED – The authorization of the payment or the payment initiation has expired.
  • FAILED – The transaction was declined.
  • PENDING – The request has been initiated by the payment provider and is in a pending state.
  • PROCESSING – The request was authorized by the customer, awaiting payment provider authorization.
  • RECEIVED – Our system has received the request and is waiting for the payment provider's response.
gatewayResponse object This contains the response from the payment provider and varies depending on the payment method used.
links array of link objects

Contains a self link that can be used to look up details about this settlement.

Did you find this page useful?