> For a complete page index, fetch https://docs.transak.com/llms.txt

# Confirm Payment

POST https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation
Content-Type: application/json

The **Confirm Payment** is an **authenticated API** that is essential part of the **Transak order flow**, allowing users to **confirm their payment** for an order once the funds have been transferred using their chosen payment method. This API ensures **secure and real-time payment reconciliation**, allowing the **crypto transaction to proceed**.

Reference: https://docs.transak.com/api/whitelabel/payments/bank-transfer/confirm-payment

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: whitelabel-api
  version: 1.0.0
paths:
  /api/v2/orders/payment-confirmation:
    post:
      operationId: confirm-payment
      summary: Confirm Payment
      description: >-
        The **Confirm Payment** is an **authenticated API** that is essential
        part of the **Transak order flow**, allowing users to **confirm their
        payment** for an order once the funds have been transferred using their
        chosen payment method. This API ensures **secure and real-time payment
        reconciliation**, allowing the **crypto transaction to proceed**.
      tags:
        - subpackage_bankTransfer
      parameters:
        - name: x-user-ip
          in: header
          description: >-
            End user's originating IP. More details
            [here](/guides/mandatory-security-changes#user-ip-header-in-apis)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: Partner API Key present in Transak Dashboard.
          required: true
          schema:
            type: string
        - name: authorization
          in: header
          description: >-
            Authorization token is the accessToken received from the API -`
            api/v2/auth/verify`


            Note: This is not applicable for [Auth Reliance
            Flows](/features/auth-reliance)
          required: false
          schema:
            type: string
        - name: x-user-identifier
          in: header
          description: >-
            Your authenticated user Email Id address.


            Note: This is applicable only for [Auth Reliance
            Flows](/features/auth-reliance)
          required: false
          schema:
            type: string
        - name: x-access-token
          in: header
          description: >
            Your Partner Access Token. Please refer
            [here](/guides/how-to-create-partner-access-token) for a tutorial on
            generating your access token.


            Note: This is applicable only for [Auth Reliance
            Flows](/features/auth-reliance)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: 200 - Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bankTransfer:confirm-payment_Response_200'
        '400':
          description: 400 - Confirm Payment Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bankTransfer:Confirm-paymentRequestBadRequestError
        '401':
          description: 401 - Confirm Payment Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bankTransfer:Confirm-paymentRequestUnauthorizedError
        '404':
          description: 404 - User Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bankTransfer:Confirm-paymentRequestNotFoundError
        '500':
          description: 500 - Confirm Payment Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bankTransfer:Confirm-paymentRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                orderId:
                  type: string
                  description: orderId is the id received from the API - `api/v2/orders`
                paymentMethod:
                  type: string
                  description: The value should be a supported payment method
              required:
                - orderId
                - paymentMethod
servers:
  - url: https://api-gateway-stg.transak.com
    description: Staging
components:
  schemas:
    bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      title: >-
        ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems
    bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems:
      type: object
      properties:
        fiatCurrency:
          type: string
        paymentMethod:
          type: string
        name:
          type: string
        fields:
          type: array
          items:
            $ref: >-
              #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems
      required:
        - fiatCurrency
        - paymentMethod
        - name
        - fields
      title: >-
        ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems
    bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        orderId:
          type: string
        partnerUserId:
          type: string
        status:
          type: string
        isBuyOrSell:
          type: string
        fiatCurrency:
          type: string
        cryptoCurrency:
          type: string
        paymentMethod:
          type: string
        network:
          type: string
        networkId:
          type: string
        walletAddress:
          type: string
        quoteId:
          type: string
        fiatAmount:
          type: integer
        fiatAmountInUsd:
          type: number
          format: double
        amountPaid:
          type: integer
        cryptoAmount:
          type: number
          format: double
        conversionPrice:
          type: number
          format: double
        totalFeeInFiat:
          type: number
          format: double
        paymentDetails:
          type: array
          items:
            $ref: >-
              #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems
        txHash:
          type:
            - string
            - 'null'
        walletLink:
          type: string
      required:
        - orderId
        - partnerUserId
        - status
        - isBuyOrSell
        - fiatCurrency
        - cryptoCurrency
        - paymentMethod
        - network
        - networkId
        - walletAddress
        - quoteId
        - fiatAmount
        - fiatAmountInUsd
        - amountPaid
        - cryptoAmount
        - conversionPrice
        - totalFeeInFiat
        - paymentDetails
        - txHash
        - walletLink
      title: >-
        ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaData
    bankTransfer:confirm-payment_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaData
      required:
        - data
      title: confirm-payment_Response_200
    bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      required:
        - statusCode
        - message
      title: >-
        ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError
    bankTransfer:Confirm-paymentRequestBadRequestError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: Confirm-paymentRequestBadRequestError
    bankTransfer:Confirm-paymentRequestUnauthorizedError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: Confirm-paymentRequestUnauthorizedError
    bankTransfer:Confirm-paymentRequestNotFoundError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: Confirm-paymentRequestNotFoundError
    bankTransfer:Confirm-paymentRequestInternalServerError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/bankTransfer:ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: Confirm-paymentRequestInternalServerError

```

## Examples

### Success



**Request**

```json
undefined
```

**Response**

```json
{
  "data": {
    "orderId": "e053ef3e-2b89-4fa6-9679-89f31fe39625",
    "partnerUserId": "f8f5ef8f-dac0-4718-a5bb-6fbfcb389966",
    "status": "PENDING_DELIVERY_FROM_TRANSAK",
    "isBuyOrSell": "BUY",
    "fiatCurrency": "EUR",
    "cryptoCurrency": "ETH",
    "paymentMethod": "sepa_bank_transfer",
    "network": "ethereum",
    "networkId": "",
    "walletAddress": "0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405",
    "quoteId": "3417136e-2a64-4c3d-ba20-ac1dc2890285",
    "fiatAmount": 18,
    "fiatAmountInUsd": 20.5,
    "amountPaid": 0,
    "cryptoAmount": 0.01138765,
    "conversionPrice": 0.0006847655905827366,
    "totalFeeInFiat": 1.37,
    "paymentDetails": [
      {
        "fiatCurrency": "",
        "paymentMethod": "sepa_bank_transfer",
        "name": "Bank Transfer Details",
        "fields": [
          {
            "name": "Account Type",
            "value": "Personal"
          },
          {
            "name": "Amount",
            "value": "18 EUR"
          },
          {
            "name": "First Name (Beneficiary)",
            "value": "Jane"
          },
          {
            "name": "Last Name (Beneficiary)",
            "value": "Doe"
          },
          {
            "name": "IBAN",
            "value": "GB40SEOU19870010352376"
          },
          {
            "name": "Bank Name",
            "value": "Simulator Bank"
          },
          {
            "name": "Bank Country",
            "value": "Malta"
          },
          {
            "name": "Bank Address",
            "value": "The Bower, 207-211 Old Street, London, England, EC1V 9NR"
          }
        ]
      }
    ],
    "txHash": null,
    "walletLink": "https://sepolia.etherscan.io/address/0xE99B71B9a035102432e30F47843746e646737b79"
  }
}
```

**SDK Code**

```python Success
import requests

url = "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation"

headers = {
    "x-user-ip": "",
    "x-api-key": "",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Success
const url = 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation';
const options = {
  method: 'POST',
  headers: {'x-user-ip': '', 'x-api-key': '', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-user-ip", "")
	req.Header.Add("x-api-key", "")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-user-ip"] = ''
request["x-api-key"] = ''
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation")
  .header("x-user-ip", "")
  .header("x-api-key", "")
  .header("Content-Type", "application/json")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '',
    'x-user-ip' => '',
  ],
]);

echo $response->getBody();
```

```csharp Success
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation");
var request = new RestRequest(Method.POST);
request.AddHeader("x-user-ip", "");
request.AddHeader("x-api-key", "");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = [
  "x-user-ip": "",
  "x-api-key": "",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### confirm-payment_example



**Request**

```json
{
  "orderId": "",
  "paymentMethod": ""
}
```

**Response**

```json
{
  "data": {
    "orderId": "e053ef3e-2b89-4fa6-9679-89f31fe39625",
    "partnerUserId": "f8f5ef8f-dac0-4718-a5bb-6fbfcb389966",
    "status": "PENDING_DELIVERY_FROM_TRANSAK",
    "isBuyOrSell": "BUY",
    "fiatCurrency": "EUR",
    "cryptoCurrency": "ETH",
    "paymentMethod": "sepa_bank_transfer",
    "network": "ethereum",
    "networkId": "",
    "walletAddress": "0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405",
    "quoteId": "3417136e-2a64-4c3d-ba20-ac1dc2890285",
    "fiatAmount": 18,
    "fiatAmountInUsd": 20.5,
    "amountPaid": 0,
    "cryptoAmount": 0.01138765,
    "conversionPrice": 0.0006847655905827366,
    "totalFeeInFiat": 1.37,
    "paymentDetails": [
      {
        "fiatCurrency": "",
        "paymentMethod": "sepa_bank_transfer",
        "name": "Bank Transfer Details",
        "fields": [
          {
            "name": "Account Type",
            "value": "Personal"
          },
          {
            "name": "Amount",
            "value": "18 EUR"
          },
          {
            "name": "First Name (Beneficiary)",
            "value": "Jane"
          },
          {
            "name": "Last Name (Beneficiary)",
            "value": "Doe"
          },
          {
            "name": "IBAN",
            "value": "GB40SEOU19870010352376"
          },
          {
            "name": "Bank Name",
            "value": "Simulator Bank"
          },
          {
            "name": "Bank Country",
            "value": "Malta"
          },
          {
            "name": "Bank Address",
            "value": "The Bower, 207-211 Old Street, London, England, EC1V 9NR"
          }
        ]
      }
    ],
    "txHash": null,
    "walletLink": "https://sepolia.etherscan.io/address/0xE99B71B9a035102432e30F47843746e646737b79"
  }
}
```

**SDK Code**

```python confirm-payment_example
import requests

url = "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation"

payload = {
    "orderId": "",
    "paymentMethod": ""
}
headers = {
    "x-user-ip": "",
    "x-api-key": "",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript confirm-payment_example
const url = 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation';
const options = {
  method: 'POST',
  headers: {'x-user-ip': '', 'x-api-key': '', 'Content-Type': 'application/json'},
  body: '{"orderId":"","paymentMethod":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go confirm-payment_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation"

	payload := strings.NewReader("{\n  \"orderId\": \"\",\n  \"paymentMethod\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-user-ip", "")
	req.Header.Add("x-api-key", "")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby confirm-payment_example
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-user-ip"] = ''
request["x-api-key"] = ''
request["Content-Type"] = 'application/json'
request.body = "{\n  \"orderId\": \"\",\n  \"paymentMethod\": \"\"\n}"

response = http.request(request)
puts response.read_body
```

```java confirm-payment_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation")
  .header("x-user-ip", "")
  .header("x-api-key", "")
  .header("Content-Type", "application/json")
  .body("{\n  \"orderId\": \"\",\n  \"paymentMethod\": \"\"\n}")
  .asString();
```

```php confirm-payment_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation', [
  'body' => '{
  "orderId": "",
  "paymentMethod": ""
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '',
    'x-user-ip' => '',
  ],
]);

echo $response->getBody();
```

```csharp confirm-payment_example
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation");
var request = new RestRequest(Method.POST);
request.AddHeader("x-user-ip", "");
request.AddHeader("x-api-key", "");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"orderId\": \"\",\n  \"paymentMethod\": \"\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift confirm-payment_example
import Foundation

let headers = [
  "x-user-ip": "",
  "x-api-key": "",
  "Content-Type": "application/json"
]
let parameters = [
  "orderId": "",
  "paymentMethod": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```