Complete 3DS action
Finalizes a 3DS challenge. Called after the buyer completes the challenge and the ACS redirects back to the merchant returnUrl with result parameters. Send either 3DS2 redirectResult/cres or 3DS1 md+paRes. Only valid for payments currently in requires_action status; returns 409 otherwise.
Authorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.miracle.com/v1/payments/string/complete-action" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
"livemode": true,
"status": "processing",
"merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"amount": {
"currency": "string",
"valueMinor": 0
},
"amountBreakdown": {
"authorized": {
"currency": "string",
"valueMinor": 0
},
"captured": {
"currency": "string",
"valueMinor": 0
},
"refunded": {
"currency": "string",
"valueMinor": 0
},
"fee": {
"currency": "string",
"valueMinor": 0
},
"net": {
"currency": "string",
"valueMinor": 0
}
},
"captureMethod": "automatic",
"merchantReference": "string",
"checkoutSessionId": "e4b3bd08-5189-40bd-bc1b-0dd256297c90",
"paymentMethodType": "string",
"action": {
"type": "redirect",
"url": "http://example.com",
"data": {
"threeDSToken": "string",
"authenticationMethod": "string",
"displayMessage": "string",
"expiresIn": 0
}
},
"errorCode": "string",
"errorMessage": "string",
"approved": true,
"providerReference": "string",
"threeDSResult": {
"version": "1.0",
"status": "authenticated",
"statusReason": "string",
"eci": "string",
"cavv": "string",
"xid": "string",
"dsTransId": "string",
"enrolled": "Y",
"liabilityShift": true,
"challengeFlow": "frictionless",
"challenged": true,
"challengeCancelled": true,
"exemptionApplied": "low_value",
"messageVersion": "string",
"serverTransId": "string",
"acsTransId": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
}Capture payment
Captures a payment in `requires_capture` status. Only valid for payments created with `captureMethod: "manual"` that are currently in the `requires_capture` status. Captures the full authorized amount — partial captures are not currently supported. Returns 409 if the payment is not in `requires_capture` status.
Create payment
Creates a new H2H payment. The `paymentMethod` field is required — merchants must know the payment instrument upfront (card token, bank transfer, wallet, etc.). Card payments require a vault `token` obtained from the tokenization API. Pass an `Idempotency-Key` header to safely retry without double-charging. Auto-capture is the default; set `captureMethod: "manual"` for separate authorize + capture flows.