Skip to main content
POST
Authorize PayPal Checkout

Overview

After the buyer approves the payment on PayPal, this endpoint confirms the authorization with Firmly. It stores the PayPal credentials (paypal_token, payer_id) in the checkout session so Complete Order can place the order, and returns the current cart. Whether the buyer’s PayPal-selected shipping and billing address is pulled onto the cart at this step depends on the merchant integration: some integrations retrieve it from PayPal and apply it here, others only record the credentials and leave the cart’s address unchanged. Read shipping_info and billing_info from the response as the address currently on the cart; do not assume they reflect the address the buyer chose on PayPal.
This step can be skipped: Complete Order will authorize automatically before placing the order, as long as paypal_token and payer_id are provided. Call authorize explicitly when you want to show the cart to the buyer before the final step.

Authentication

string
required
Device authentication token from Browser Session

Path Parameters

string
required
The merchant domain (e.g., “merchant.example.com”)

Request Body

object
required
PayPal authorization details

Response

Returns the cart with the PayPal credentials recorded on payment_method.
string
Unique identifier for the cart
array
Array of items in the cart
object
Confirmed PayPal payment method
object
Delivery address currently on the cart. Reflects the PayPal-selected address only for merchant integrations that apply it at this step.
object
Billing address currently on the cart, when present. Reflects the PayPal billing address only for merchant integrations that apply it at this step.
object
Grand total including all costs

Code Example

Response Example

Error Responses