Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next Release

- Sends card details in the request body instead of the URL query string when `referralCustomer->addCreditCard` creates a Stripe token

## v8.8.3 (2026-08-26)

- Preserves caller-provided plain PHP objects in request params so `(object) []` is sent as an empty JSON object (`{}`) instead of being stringified
Expand Down
4 changes: 3 additions & 1 deletion lib/EasyPost/Service/ReferralCustomerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ private function createStripeToken(

$guzzleClient = new Client();

$requestOptions['query'] = $creditCardDetails;
// Card details must travel in the form-encoded request body, never in the URL,
// so they cannot end up in access logs, proxy logs, or Referer headers.
$requestOptions['form_params'] = $creditCardDetails;
$requestOptions['headers'] = $headers;
$requestOptions['http_errors'] = false;

Expand Down
Loading