This connector is not generally available. It is enabled per environment on request. If you want the standard flow, where Gr4vy creates the PayPal order as part of creating the transaction, see PayPal instead.
When to use it
Use this connector when your PayPal integration relies on parts of PayPal’s Orders API that Gr4vy does not map, such asexperience_context options or the contact module. Because you build the order body yourself, you can use anything the Orders API accepts without waiting on a Gr4vy release.
Compared to the standard PayPal connector, the ownership is reversed:
Setup
Follow the PayPal setup instructions before configuring this connector. It takes the same credentials as the standard PayPal connector — client ID, client secret, webhook ID, and the optional BN code and merchant ID — and can run alongside it on the same PayPal account. Billing and shipping ingestion, tokenization, and settlement reporting are configured the same way. See PayPal for those settings.Authorizing an approved order
The flow is:- Create a PayPal order with your own backend call to PayPal’s Orders API.
- Have the buyer approve it with your existing PayPal JS or native SDK integration.
- Create the Gr4vy transaction with the approved order ID.
method set to paypaldirectorder and order_id in connection_options["paypal-paypaldirectorder"]:
The order must already be approved by the buyer before you create the transaction. Because approval already happened, there is no
approval_url to redirect to, and the transaction creation response returns the authorization or capture result directly.Validation
Gr4vy reads the order from PayPal before it authorizes or captures anything, and rejects the transaction when the order does not match what you asked for. Each of these returns an error before any authorization is attempted:- Missing order ID:
order_idis required. This connector only authorizes an existing order, so it never falls back to creating one. - Intent mismatch: The order’s intent must match the transaction’s
intent, eitherauthorizeorcapture. - Multiple purchase units: The order must contain exactly one purchase unit.
- Currency mismatch: The order’s currency must match the transaction’s currency.
- Amount mismatch: The order’s total must match the transaction’s amount.
- Order no longer actionable: An order that PayPal has already completed, or that otherwise no longer offers the matching authorize or capture action, is rejected.
Reconciliation
Before authorizing, Gr4vy patches its own transaction references onto the order — the transaction’s short ID ascustom_id and its reference as invoice_id — so the payment matches up in PayPal reporting and settlement the same way a Gr4vy-created order does. Any value your own integration set in those fields is overwritten.
PayPal rejects this patch for some order states. When that happens Gr4vy logs it and continues to authorize or capture, so the payment still succeeds but that transaction cannot be matched by reference in settlement.