Record payment capture

Record the captured payment associated with a surcharge calculation transaction.

IMPORTANT: This must be called for every successful payment transaction that utilized the Yeeld surcharging endpoint for a calculation.

HINT: For Stripe payments, this is usually called from within the payment_intent.succeeded webhook event listener.

POST/api/v1/surcharge/{transactionId}/capture

Record the captured payment associated with a surcharge calculation transaction.

IMPORTANT: This must be called for every successful payment transaction that utilized the Yeeld surcharging endpoint for a calculation.

HINT: For Stripe payments, this is usually called from within the payment_intent.succeeded webhook event listener.

Path Parameters

transactionIdpathrequired

The transaction ID returned from the initial surcharge calculation (txn_***)

Yeeld-Accountheader

Either the account.id or external identifier for a merchant account.

This can be used by a platform account to perform actions on behalf of a merchant account.

NOTE: This will be ignored if the request is not made by a registered platform account.

Request Body

object
amountintegermin: 0

The total amount charged to the customer, including the surcharge as well as taxes, fees. etc.

NOTE: amount is used for the Calculate a refund endpoint.

Represented in the lowest currency denomination (e.g. if currency is usd, then amount is in cents).

Example: 10000
capturedSurchargeAmountintegermin: 0

The actual surcharge amount that was charged to the customer on this transaction (if less than the surcharge that was calculated).

HINT: This should only be provided if it is different from the surcharge that was calculated.

If not provided, then the surcharge that was calculated for the transaction will be used.

NOTE: capturedSurchargeAmount is used for the Calculate a refund endpoint.

Represented in the lowest currency denomination (e.g. if currency is usd, then capturedSurchargeAmount is in cents).

Example: 300

Responses

200Default Response
RequestPOST/api/v1/surcharge/{transactionId}/capture
curl 'https://api.theyeeld.com/api/v1/surcharge/{transactionId}/capture' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 10000,
  "capturedSurchargeAmount": 300
}'
Response
{
"transactionId": "txn_####",
"status": "string",
"surcharge": 300
}