+ Start a Discussion

Force.com HTTP and HTTPS Callout with SSL encryption?

We have to make a secure callout to a HTTPS endpoint (Authorize.net) for completing payment process.  The expectation is that the request should be encrypted when sending to the Payment gateway service.  Force.com provides a class (Crypto class) to encrypt the requests.  However this requires a private key to be used for encrypting the data. 


  it seems that Authorize.net does not provide a private key but provides only a certificate (public key).  When using this public key for encryption, Force.com returns an error that this is not a valid private key. Does anyone know 


  1. If making a HTTP connection to a HTTPS endpoint, if the request is encrypted by default and that no other additional encryption is needed?
  2. How to make an encrypted call to Authorize.net payment gateway service (HTTPS endpoint)?



An HttpRequest from APEX to an https endpoint is secure and runs over SSL.   Bear in mind that the host you connect to must have a valid SSL cert, that has not expired, and the hostname matches what is embedded in the cert or it will not connect.


Good luck, 


Dan Smith




Atif MohammedAtif Mohammed



Is there any tool kit of integrating authroize.net with salesforce.