External MPI
Process transactions with pre-authenticated 3D Secure data from your own MPI provider, bypassing Pay.com's built-in authentication flow.
If you use an external 3DS provider or your own Merchant Plug-In (MPI) to authenticate transactions, you can pass the authentication results directly to Pay.com instead of using Pay.com's built-in 3DS flow.
In this scenario, your MPI handles the full 3D Secure challenge with the cardholder's bank and returns authentication values such as the cavv, eci, and ds_trans_id. You then include these values in the charge or hold request so Pay.com can forward them to the issuer for validation, without triggering a new challenge.
When to use this flow
Pass external authentication data to Pay.com when:
- You already have a 3DS provider or MPI integrated into your platform.
- You want full control over the authentication experience before sending the transaction to Pay.com.
- You need to pass pre-authenticated data for regulatory compliance (such as PSD2 SCA) without relying on Pay.com to manage the challenge.
If you don't have your own MPI, Pay.com can manage the full 3DS challenge for you. See 3D Secure authentication to compare the two approaches.
| External MPI | Pay.com-managed 3DS | |
|---|---|---|
| Authentication flow | You manage | Pay.com manages |
| Integration effort | Higher (you maintain your own MPI) | Lower (built into the charge flow) |
| Control over UX | Full control | Limited to Pay.com's flow |
| Liability shift | Depends on your authentication quality | Handled by Pay.com |
Requirements
Before you begin, make sure you have:
- Your environment configured.
- Access to your API credentials.
- A unique
idempotency-keyheader for each request. - Authentication results from your external MPI (
eciandcavv, plusds_trans_idfor 3DS 2.x orxidfor 3DS 1.0.0).
Create a charge or hold with external 3DS data
Send a POST request to /v1/charges or /v1/holds and include the three_ds object with the authentication values from your MPI. It goes inside source_data.card for card details, source_data.token for a card token, or source_data.source for a saved payment method. For a network token, see Pass an existing network token.
The values belong in the payment source, not in payment_method_options. A 3DS field sent in payment_method_options returns 400 with a message that the field is not allowed.
3DS authentication fields
Set these fields in the three_ds object:
| Field | Required | Description |
|---|---|---|
eci | Yes | Electronic Commerce Indicator returned by your MPI. Indicates the authentication level (for example, 05 for Visa fully authenticated, 02 for Mastercard). |
cavv | Yes | Cardholder Authentication Verification Value: the cryptographic proof that authentication was completed. |
version | No | The 3D Secure protocol version your MPI used, such as 2.1.0, 2.2.0, or 2.3.1. |
ds_trans_id | Conditional | The Directory Server Transaction ID, a unique identifier assigned by the card network's directory server during authentication. Required with any 2.x version. |
xid | Conditional | Transaction identifier from the authentication process. Required for 3DS 1.0.0 transactions. |
acs_trans_id | No | The access control server's transaction ID, if your MPI returns it. |
POST https://api.sandbox.pay.com/v1/charges
{
"amount": 10000,
"currency": "usd",
"source_data": {
"type": "card",
"card": {
"number": "4111111111111111",
"expiry_month": "12",
"expiry_year": "2028",
"cvv": "123",
"name": "John Doe",
"three_ds": {
"eci": "05",
"version": "2.1.0",
"ds_trans_id": "d65e93c3-35ab-41ba-b307-767bfc19eae3",
"cavv": "lqVJAGS+KVg6vbF8sV25xLhp6mw="
}
}
}
}Because the authentication is already complete, Pay.com
does not trigger a 3DS challenge. The transaction proceeds
directly to authorization, and the response returns its final
status (succeeded for a charge, requires_capture for a
hold, or a payment method error).
When liability_shift is true in the response, fraud
liability for the transaction moves from you to the card
issuer. With external MPI, the liability shift depends on
the quality of your authentication data. If the issuer
considers your 3DS values invalid or incomplete, it may
reject the liability shift, leaving you responsible for
any chargebacks.
Next steps
- 3D Secure authentication: How Pay.com handles 3DS natively when you don't have an external MPI.
- Create a charge with 3DS: Pay.com-managed authentication flows.