v2

latestOpenAPI 3.0.02026-07-261677104.9 KB
Payments

Finalize a pending payment

Finalize a pending payment being made by a Bolt logged-in shopper. Upon receipt of a finalized payment result, payment success should be communicated to the shopper.

post/payments/{id}

Path parameters

idstring required
Example:iKv7t5bgt1gg

The ID of the payment to operate on

Headers

X-Publishable-Keystring required

The publicly shareable identifier used to identify your Bolt merchant division.

X-Merchant-Client-Idstring

A unique identifier for a shopper's device, generated by Bolt. The value is retrieved with Bolt.state.merchantClientId in your frontend context, per-shopper. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics.

Request body

.tag'finalize' | 'finalize_threeds_payment' required
redirect_resultstring

Optional redirect result token required for an APM payment (excluding PayPal).

Example request

{
  ".tag": "finalize",
  "redirect_result": "eyJ0cmFuc"
}

Response

The action was successfully applied to the pending payment

OR
OR

Example response

{
  ".tag": "finalized",
  "id": "iKv7t5bgt1gg",
  "status": "success",
  "transaction": {
    "reference": "OBYG-X1PX-FN55",
    "authorizations": [
      {
        "processor_reference": "123456789XYZ",
        "processor_response": {
          "content_type": "application/json",
          "api_version": "3.3",
          "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <transaction> <id>bfraj39q</id> <status>authorized</status> <type>sale</type> <currency-iso-code>USD</currency-iso-code> <amount>57.71</amount> <amount-requested>57.71</amount-requested> <merchant-account-id>GenericMerchant</merchant-account-id> <order-id>ORDER123456</order-id> <created-at type=\"datetime\">2024-11-20T12:36:53Z</created-at> <updated-at type=\"datetime\">2024-11-20T12:36:54Z</updated-at> <customer> <first-name>John</first-name> <last-name>Doe</last-name> <email>example@example.com</email> <phone>1234567890</phone> <international-phone></international-phone> </customer> <billing> <first-name>John</first-name> <last-name>Doe</last-name> <street-address>123 Generic St</street-address> <locality>GenericCity</locality> <region>GenericRegion</region> <postal-code>12345</postal-code> <country-name>GenericCountry</country-name> <country-code-alpha2>GC</country-code-alpha2> <country-code-alpha3>GCR</country-code-alpha3> <country-code-numeric>999</country-code-numeric> <international-phone></international-phone> </billing> <refund-ids type=\"array\"></refund-ids> <partial-settlement-transaction-ids type=\"array\"></partial-settlement-transaction-ids> <shipping> <international-phone></international-phone> </shipping> <custom-fields></custom-fields> <account-funding-transaction type=\"boolean\">false</account-funding-transaction> <avs-postal-code-response-code>M</avs-postal-code-response-code> <avs-street-address-response-code>M</avs-street-address-response-code> <cvv-response-code>I</cvv-response-code> <processor-authorization-code>123456</processor-authorization-code> <processor-response-code>1000</processor-response-code> <processor-response-text>Approved</processor-response-text> <tax-exempt type=\"boolean\">false</tax-exempt> <processed-with-network-token type=\"boolean\">false</processed-with-network-token> <credit-card> <image-url>https://assets.braintreegateway.com/payment_method_logo/unknown.png?environment=production</image-url> <is-network-tokenized type=\"boolean\">false</is-network-tokenized> <prepaid>Unknown</prepaid> <healthcare>Unknown</healthcare> <debit>Unknown</debit> <durbin-regulated>Unknown</durbin-regulated> <commercial>Unknown</commercial> <payroll>Unknown</payroll> <issuing-bank>Unknown</issuing-bank> <country-of-issuance>Unknown</country-of-issuance> <product-id>Unknown</product-id> <venmo-sdk type=\"boolean\">false</venmo-sdk> </credit-card> <apple-pay> <prepaid>No</prepaid> <healthcare>Unknown</healthcare> <debit>No</debit> <durbin-regulated>Unknown</durbin-regulated> <commercial>No</commercial> <payroll>Unknown</payroll> <issuing-bank>GenericBank</issuing-bank> <country-of-issuance>GCR</country-of-issuance> <product-id>Unknown</product-id> <bin>411111</bin> <card-type>Apple Pay - GenericCard</card-type> <last-4>1234</last-4> <expiration-month>12</expiration-month> <expiration-year>2028</expiration-year> <image-url>https://assets.braintreegateway.com/payment_method_logo/apple_pay.png?environment=production</image-url> <payment-instrument-name>Card 1234</payment-instrument-name> <source-description>Card 1234</source-description> </apple-pay> <status-history type=\"array\"> <status-event> <timestamp type=\"datetime\">2024-11-20T12:36:54Z</timestamp> <status>authorized</status> <amount>57.71</amount> <transaction-source>api</transaction-source> </status-event> </status-history> <subscription></subscription> <add-ons type=\"array\"></add-ons> <discounts type=\"array\"></discounts> <descriptor></descriptor> <recurring type=\"boolean\">false</recurring> <channel></channel> <disbursement-details></disbursement-details> <disputes type=\"array\"></disputes> <authorization-adjustments type=\"array\"></authorization-adjustments> <payment-instrument-type>generic_card</payment-instrument-type> <processor-settlement-response-code></processor-settlement-response-code> <processor-settlement-response-text></processor-settlement-response-text> <network-transaction-id>123456789012345</network-transaction-id> <processor-response-type>approved</processor-response-type> <authorization-expires-at type=\"datetime\">2024-11-27T12:36:54Z</authorization-expires-at> <retry-ids type=\"array\"></retry-ids> <retried type=\"boolean\">false</retried> <refund-global-ids type=\"array\"></refund-global-ids> <partial-settlement-transaction-global-ids type=\"array\"></partial-settlement-transaction-global-ids> <global-id>generic_global_id</global-id> <retry-global-ids type=\"array\"></retry-global-ids> <retrieval-reference-number>123456789012345</retrieval-reference-number> <installments type=\"array\"></installments> <refunded-installments type=\"array\"></refunded-installments> <merchant-address></merchant-address> <pin-verified type=\"boolean\">false</pin-verified> <payment-receipt> <id>bfraj39q</id> <global-id>generic_global_id</global-id> <amount>57.71</amount> <currency-iso-code>USD</currency-iso-code> <processor-response-code>1000</processor-response-code> <processor-response-text>Approved</processor-response-text> <processor-authorization-code>123456</processor-authorization-code> <merchant-address></merchant-address> <type>sale</type> <pin-verified type=\"boolean\">false</pin-verified> </payment-receipt> </transaction>"
        }
      }
    ]
  }
}