Run a sale with 3-D Secure
Use our 3-D Secure feature to verify a cardholder’s identity during an e-Commerce transaction.
Integration steps
Step 1. Sign up for 3-D Secure.
Step 2. Convert the cardholder’s payment details into a single-use token.
Step 3. Send a merchant plug-in (MPI) request.
Step 4. Include the MPI reference in a payment request.
Before you begin
Bearer tokens
Use our Identity Service to generate a Bearer token to include in the header of your requests. To generate a Bearer token, complete the following steps:
- Include your API key in the x-api-key parameter in the header of a POST request.
- Send your request to https://identity.payroc.com/authorize.
Note: You need to generate a new Bearer token before the previous Bearer token expires.
Example request
If your request is successful, we return a response that contains your Bearer token, information about its scope, and when it expires.
Example response
Headers
To create the header of each POST request, you must include the following parameters:
- Content-Type: Include application/json as the value for this parameter.
- Authorization: Include your Bearer token in this parameter.
- Idempotency-Key: Include a UUID v4 to make the request idempotent.
Errors
If your request is unsuccessful, we return an error. For more information about errors, see Errors.
Step 1. Sign up for 3-D Secure
To sign up for 3-D Secure, contact our Customer Support team at [email protected].
We use request forwarding to send you the results of the 3-D Secure check. When you sign up for 3-D Secure, provide a URL that we forward the requests to.
Step 2. Convert the cardholder’s payment details into a single-use token
Before you can send a request to our MPI service, you need to convert the cardholder’s payment details into a single-use token.
To create a single-use token, you can use Hosted Fields or you can use our tokenization feature in our API.
Step 3. Send an MPI request
Send the single-use token to our MPI service with information about the transaction in the query parameters.
Query parameters
Example request
Response fields
If your request is successful, we send a GET request to your MPI receipt URL with the results of the 3-D Secure check and the MPI reference. The response fields are in the query parameters of the GET request.
Example response
Step 4. Run a sale
To run a sale, send a POST request to our Payments endpoint.
In your request, send the following parameters in the threeDSecure object:
- serviceProvider – Provide a value of gateway.
- mpiReference – Provide the MPI reference that we sent your MPI receipt URL in Step 2.
Request parameters
To create the body of your request, use the following parameters:
Example request
Response fields
If your request is successful, we create the payment and return a response. The response contains the following fields: