# Confirm Payment (Bank Transfer) 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/orders/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 (Bank Transfer) 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_orders parameters: - name: authorization in: header description: >- Authorization token is the accessToken received from the API -` api/v2/auth/verify` required: true schema: type: string default: YOUR_USER_AUTH_TOKEN - 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 default: USER_EMAIL_ID - 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 default: YOUR_ACCESS_TOKEN responses: '200': description: 200 - Success content: application/json: schema: $ref: '#/components/schemas/Orders_confirm-payment_Response_200' '400': description: 400 - Confirm Payment Bad Request content: application/json: schema: $ref: '#/components/schemas/Confirm-paymentRequestBadRequestError' '401': description: 401 - Confirm Payment Unauthorized content: application/json: schema: $ref: '#/components/schemas/Confirm-paymentRequestUnauthorizedError' '500': description: 500 - Confirm Payment Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Confirm-paymentRequestInternalServerError' requestBody: content: application/json: schema: type: object properties: orderId: type: string default: e053ef3e-2b89-4fa6-9679-89f31fe39625 description: orderId is the id received from the API - `api/v2/orders` paymentMethod: type: string default: sepa_bank_transfer description: The value should be a supported payment method required: - orderId - paymentMethod servers: - url: https://api-gateway-stg.transak.com components: schemas: ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems: type: object properties: name: type: string value: type: string required: - name - value title: >- ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems: type: object properties: fiatCurrency: type: string paymentMethod: type: string name: type: string fields: type: array items: $ref: >- #/components/schemas/ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems required: - fiatCurrency - paymentMethod - name - fields title: >- ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems 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/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 Orders_confirm-payment_Response_200: type: object properties: data: $ref: >- #/components/schemas/ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaData required: - data title: Orders_confirm-payment_Response_200 ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError: type: object properties: statusCode: type: integer message: type: string required: - statusCode - message title: >- ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError Confirm-paymentRequestBadRequestError: type: object properties: error: $ref: >- #/components/schemas/ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError required: - error title: Confirm-paymentRequestBadRequestError Confirm-paymentRequestUnauthorizedError: type: object properties: error: $ref: >- #/components/schemas/ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError required: - error title: Confirm-paymentRequestUnauthorizedError Confirm-paymentRequestInternalServerError: type: object properties: error: $ref: >- #/components/schemas/ApiV2OrdersPaymentConfirmationPostResponsesContentApplicationJsonSchemaError required: - error title: Confirm-paymentRequestInternalServerError ``` ## SDK Code Examples ```python Confirm Payment Success import requests url = "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation" headers = { "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" } response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Confirm Payment Success const url = 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation'; const options = { method: 'POST', headers: { authorization: 'YOUR_USER_AUTH_TOKEN', 'x-user-identifier': 'USER_EMAIL_ID', 'x-access-token': 'YOUR_ACCESS_TOKEN', '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 Confirm Payment 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("authorization", "YOUR_USER_AUTH_TOKEN") req.Header.Add("x-user-identifier", "USER_EMAIL_ID") req.Header.Add("x-access-token", "YOUR_ACCESS_TOKEN") 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 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["authorization"] = 'YOUR_USER_AUTH_TOKEN' request["x-user-identifier"] = 'USER_EMAIL_ID' request["x-access-token"] = 'YOUR_ACCESS_TOKEN' request["Content-Type"] = 'application/json' response = http.request(request) puts response.read_body ``` ```java Confirm Payment Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation") .header("authorization", "YOUR_USER_AUTH_TOKEN") .header("x-user-identifier", "USER_EMAIL_ID") .header("x-access-token", "YOUR_ACCESS_TOKEN") .header("Content-Type", "application/json") .asString(); ``` ```php Confirm Payment Success request('POST', 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation', [ 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => 'YOUR_USER_AUTH_TOKEN', 'x-access-token' => 'YOUR_ACCESS_TOKEN', 'x-user-identifier' => 'USER_EMAIL_ID', ], ]); echo $response->getBody(); ``` ```csharp Confirm Payment 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("authorization", "YOUR_USER_AUTH_TOKEN"); request.AddHeader("x-user-identifier", "USER_EMAIL_ID"); request.AddHeader("x-access-token", "YOUR_ACCESS_TOKEN"); request.AddHeader("Content-Type", "application/json"); IRestResponse response = client.Execute(request); ``` ```swift Confirm Payment Success import Foundation let headers = [ "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "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() ``` ```python Orders_confirm-payment_example import requests url = "https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation" payload = { "orderId": "e053ef3e-2b89-4fa6-9679-89f31fe39625", "paymentMethod": "sepa_bank_transfer" } headers = { "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Orders_confirm-payment_example const url = 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation'; const options = { method: 'POST', headers: { authorization: 'YOUR_USER_AUTH_TOKEN', 'x-user-identifier': 'USER_EMAIL_ID', 'x-access-token': 'YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' }, body: '{"orderId":"e053ef3e-2b89-4fa6-9679-89f31fe39625","paymentMethod":"sepa_bank_transfer"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Orders_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\": \"e053ef3e-2b89-4fa6-9679-89f31fe39625\",\n \"paymentMethod\": \"sepa_bank_transfer\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("authorization", "YOUR_USER_AUTH_TOKEN") req.Header.Add("x-user-identifier", "USER_EMAIL_ID") req.Header.Add("x-access-token", "YOUR_ACCESS_TOKEN") 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 Orders_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["authorization"] = 'YOUR_USER_AUTH_TOKEN' request["x-user-identifier"] = 'USER_EMAIL_ID' request["x-access-token"] = 'YOUR_ACCESS_TOKEN' request["Content-Type"] = 'application/json' request.body = "{\n \"orderId\": \"e053ef3e-2b89-4fa6-9679-89f31fe39625\",\n \"paymentMethod\": \"sepa_bank_transfer\"\n}" response = http.request(request) puts response.read_body ``` ```java Orders_confirm-payment_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation") .header("authorization", "YOUR_USER_AUTH_TOKEN") .header("x-user-identifier", "USER_EMAIL_ID") .header("x-access-token", "YOUR_ACCESS_TOKEN") .header("Content-Type", "application/json") .body("{\n \"orderId\": \"e053ef3e-2b89-4fa6-9679-89f31fe39625\",\n \"paymentMethod\": \"sepa_bank_transfer\"\n}") .asString(); ``` ```php Orders_confirm-payment_example request('POST', 'https://api-gateway-stg.transak.com/api/v2/orders/payment-confirmation', [ 'body' => '{ "orderId": "e053ef3e-2b89-4fa6-9679-89f31fe39625", "paymentMethod": "sepa_bank_transfer" }', 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => 'YOUR_USER_AUTH_TOKEN', 'x-access-token' => 'YOUR_ACCESS_TOKEN', 'x-user-identifier' => 'USER_EMAIL_ID', ], ]); echo $response->getBody(); ``` ```csharp Orders_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("authorization", "YOUR_USER_AUTH_TOKEN"); request.AddHeader("x-user-identifier", "USER_EMAIL_ID"); request.AddHeader("x-access-token", "YOUR_ACCESS_TOKEN"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"orderId\": \"e053ef3e-2b89-4fa6-9679-89f31fe39625\",\n \"paymentMethod\": \"sepa_bank_transfer\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Orders_confirm-payment_example import Foundation let headers = [ "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" ] let parameters = [ "orderId": "e053ef3e-2b89-4fa6-9679-89f31fe39625", "paymentMethod": "sepa_bank_transfer" ] 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() ```