Creating transactions

Like all Braintree SDK integrations, you will receive a payment method nonce when your user successfully authorizes payment. Pass this nonce to your server, and create a transaction:

PHP
Copy
Copied
$result = Braintree_Transaction::sale([
  'amount' => '10.00',
  'paymentMethodNonce' => $nonceFromTheClient,
  'options' => [
    'submitForSettlement' => True
  ]
]);

The amount you specify in your client-side payment request object should reflect the actual amount you authorize and submit for settlement; transactions will still process in cases where the amount changes during order fulfillment.

If you've already integrated our SDKs to handle payment method nonces for other payment methods, you should reuse your existing implementation. The example above will work with a payment method nonce associated with any new payment methods that you choose to accept in the future.

Next: Testing and Go Live →

Still have questions?

If you can’t find an answer, contact our Support team.