Validate 3DS Payment
API data
API Gateway
This API is used for payment gateway operations:
- Production: https://api.sopague.com.br/gateway
- Sandbox: https://api-hmg.sopague.com.br/gateway
- Architecture: Representational State Transfer (REST)
To validate a transaction with 3DS, send a POST request to /v1/payments/3ds/validate. This operation confirms the 3DS authentication and finalizes the payment validation process.
POST /v1/payments/3ds/validate
Via REST request with the following body:
Request
{
"code3ds": "dbe5a61a-836d-45dd-82c1-52d0c5e3c010",
"validateToken": "eyJhbGciOiJIUzI1NiJ9[...]9oBbxbtuE_vuu6UzU-Mp5BjK2FNp5XAfoDy2uQ"
}
Data dictionary - Parameters
| PROPERTY | DESCRIPTION | TYPE | LOCATION | REQUIRED | SIZE |
|---|---|---|---|---|---|
| code3ds | 3DS authorization code. | guid | body | yes | 255 |
| validateToken | Validation token generated by 3DS when returning from a challenge. | string | body | yes | 256 |
- 🟢 200
- 🔴 400
- 🔴 500
Payment completed successfully
{
"paymentAuthorization":{
"returnCode":"0",
"description":"Sucesso",
"paymentId":"020006204409231653310000023790740000000000",
"authorizationCode":"026603",
"orderNumber":"3979908797721",
"amount":1111,
"releaseAt":"2020-09-23T16:53:34+00:00"
}
}
Data dictionary - Response
| PROPERTY | DESCRIPTION | TYPE |
|---|---|---|
| returnCode | Transaction return code. | string |
| description | Transaction return description. | string |
| paymentId | Transaction identifier. | string |
| authorizationCode | Transaction authorization code. | string |
| orderNumber | Order number. | string |
| amount | Transaction amount. | decimal |
| releaseAt | Transaction date/time. | datetime |
Request or 3DS validation error
[
{
"tag": "3DS Fail",
"description": "eci: 00 - threeDsVersion: 2.1.0 - threeDsStatus:
AUTHENTICATION_SUCCESSFUL - veresEnrolled: U - directoryServerErrorCode: 203 -
directoryServerErrorDescription: Format of one or more elements is invalid according to
the specification threeDSRequestorURL,"
}
]
Data dictionary - Response
| PROPERTY | DESCRIPTION | TYPE |
|---|---|---|
| tag | Error tag. | string |
| description | Error description. | string |
Internal error
[
{
"tag": "",
"description": "Não foi possível executar comando. Erro desconhecido."
}
]
Data dictionary - Response
| PROPERTY | DESCRIPTION | TYPE |
|---|---|---|
| tag | Error tag. | string |
| description | Error description. | string |