Confirm Payment
POSThttps://useast.api.elasticpath.com/v2/orders/:orderID/transactions/:transactionID/confirm
Confirm Payment serves as a mechanism to synchronize transaction information from the third-party payment provider back to our system. This ensures that Composable Commerce accurately reflects the values from the payment provider.
Handling 3D Secure Validations for Stripe Payments
For Stripe Payments requiring 3D Secure validation, the transaction response will include the client_parameters
object, which provides credentials to support validation of these payment requests on the payment provider's side. We recommend using the Stripe's client libraries to manage these 3D Secure validations. Once the validation succeeds, proceed with a confirmation request to sync the validated transaction into Composable Commerce and continue with the payment process.
Request
Path Parameters
The unique identifier of the order.
The unique identifier of the transaction.
- application/json
Body
Responses
- 200
- 401
Response Headers
- application/json
- Schema
- Example (auto)
Schema
data object
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reference": "string",
"name": "string",
"custom_reference": "string",
"gateway": "adyen",
"amount": 0,
"refunded_amount": 0,
"currency": "string",
"transaction-type": "string",
"status": "string",
"relationships": {
"order": {
"data": {
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
},
"meta": {
"display_price": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"display_refunded_amount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"timestamps": {
"created_at": "string"
}
}
}
}
Unauthorized
- application/json
- Schema
- Example (auto)
- Example
Schema
[
null
]
{
"errors": {
"status": 401,
"title": "Unauthorized"
}
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://useast.api.elasticpath.com/v2/orders/:orderID/transactions/:transactionID/confirm");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());