> For the complete documentation index, see [llms.txt](https://docs.morpara.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.morpara.com/tr/en/api-documentation/editor/3d-secure-payment/complete-3d-payment.md).

# Complete 3D Payment

The 3D Payment Completion step, **for a payment whose 3D Secure authentication has been completed** systemically **ensures it is finalized as** successful or unsuccessful.

After the user's action on the bank's 3D Secure screen, the transaction result is **defined in the Init3d step `returnUrl` or `failUrl`** to the address **HTTP Request** is delivered as.

The merchant should use the Request content sent to this URL to call the **Auth3d** service and complete the payment process.

> ⚠️ The 3D payment is not considered **completed unless this step is called**.

***

### Endpoint

```http
POST /v1/Payment/Auth3d
```

***

### Headers

| Key            | Type   | Description                          | Example              |
| -------------- | ------ | ------------------------------------ | -------------------- |
| x-ClientID     | String | Unique identifier for the API client | your-client-id       |
| x-ClientSecret | String | Secret key for the API client        | your-secret-key      |
| x-GrantType    | String | Type of access token used            | client\_credentials  |
| x-Scope        | String | API scope                            | pf\_write, pf\_read  |
| x-Timestamp    | String | Request timestamp                    | 2024-12-17T12:34:56Z |

***

### Request Body

These fields must be taken from the Request content sent by the bank to the **returnUrl / failUrl** address and forwarded.

| Field                 | Required | Type     | Description                           | Example                |
| --------------------- | -------- | -------- | ------------------------------------- | ---------------------- |
| Code                  | ✅        | String   | Transaction result code               | B0000                  |
| Message               | ✅        | String   | Transaction status                    | Approved               |
| EftCode               | ✅        | String   | EFT transaction code                  | 0150                   |
| MdStatus              | ✅        | String   | 3D authentication status information  | UGF5...ODRD            |
| MdStatusMessage       | ✅        | String   | 3D authentication message             | (Empty)                |
| conversationId        | ✅        | String   | Transaction tracking number           | MSD2024030500000000115 |
| OrderId               | ✅        | String   | Order identifier                      | 5000000045202502030044 |
| PaymentId             | ✅        | String   | Payment identifier                    | 5000000045202502030044 |
| TransactionDate       | ✅        | DateTime | Transaction date and time             | 05/02/2025 16:16:10    |
| Currency              | ✅        | Integer  | Currency code (ISO 4217)              | 949                    |
| PaymentInstrumentType | ✅        | String   | Type of payment instrument            | CARD                   |
| MerchantId            | ✅        | String   | Merchant identifier                   | 5000000045             |
| InstrumentDetail      | ✅        | Object   | Payment instrument detail information | InstrumentDetailVM     |

***

### Response Body

The response to the Auth3d call contains the **final result** of the payment.

#### Sample Request

```http
POST /v1/Payment/Auth3d
Content-Type: application/json
x-ClientID: your-client-id
x-ClientSecret: your-secret-key
x-GrantType: client_credentials
x-Scope: pf_write, pf_read
x-Timestamp: 2024-12-17T12:34:56Z
```

```json
{
  "Code": "B0000",
  "Message": "Approved",
  "EftCode": "0150",
  "MdStatus": "UGF5...ODRD",
  "MdStatusMessage": "",
  "conversationId": "MSD2024030500000000115",
  "OrderId": "5000000045202502030044",
  "PaymentId": "5000000045202502030044",
  "TransactionDate": "05/02/2025 16:16:10",
  "Currency": 949,
  "PaymentInstrumentType": "CARD",
  "MerchantId": "5000000045",
  "InstrumentDetail": {}
}
```

#### Sample Response

```json
{
  "code": "B0000",
  "message": "Approved",
  "resultCode": "B0000",
  "resultDescription": "Approved",
  "responseDate": "05/02/2025 16:16:10",
  "conversationId": "MSD2024030500000000115",
  "orderId": "5000000045202502030044",
  "paymentId": "5000000045202502030044",
  "bankUniqueReferenceNumber": "503615446559",
  "transactionDate": "05/02/2025 16:16:10",
  "currency": "949",
  "authCode": "655050",
  "paymentInstrumentType": "CARDPAYMENT",
  "instrumentDetail": {
    "maskedCardNumber": "524677******3508",
    "cardType": "CARD"
  },
  "paymentInfo": {
    "installmentCount": 1,
    "payFacCommissionRate": 1.00,
    "amount": 25.00,
    "payFacCommissionAmount": 0.2500
  },
  "okUrl": null,
  "failUrl": null
}
```
