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

# Transaction Process API

POST https://api-gateway-stg.transak.com/api/v2/transaction-session/request/{requestId}/process
Content-Type: application/json



Reference: https://docs.transak.com/api/whitelabel/payments/headless-apple-pay-no-auth-no-kyc/transaction-process-api

## Request

### Path parameters

- `requestId` (string, required) — Transaction session request identifier.

### Headers

- `x-user-ip` (string, required) — End user's originating IP. More details [here](/guides/mandatory-security-changes#user-ip-header-in-apis)
- `x-api-key` (string, required) — Your Partner API key. You can find this in the [Partner Dashboard](https://docs.transak.com/guides/how-to-create-partner-dashboard-account#open-the-developers-section).
- `x-access-token` (string, required) — Your Partner Access Token. Please refer [here](/guides/how-to-create-partner-access-token) for a tutorial on generating your access token.

## Response

### 200

Success

- `data` (object, required) — Order details returned after processing the Apple Pay transaction session.
  - `orderId` (string, required) — Unique identifier for the created order.
  - `status` (string, required) — Current order status (e.g. AWAITING_PAYMENT_FROM_USER).
  - `isBuyOrSell` (string, required) — Indicates whether the order is a BUY or SELL.
  - `fiatCurrency` (string, required) — Fiat currency used for the order.
  - `cryptoCurrency` (string, required) — Crypto asset being purchased.
  - `paymentMethod` (string, required) — Payment method used. Always `apple_pay` for this flow.
  - `network` (string, required) — Blockchain network for the crypto asset.
  - `fiatAmount` (double, required) — Fiat amount for the order.
  - `fiatAmountInUsd` (double, required) — Fiat amount converted to USD.
  - `cryptoAmount` (double, required) — Crypto amount the user will receive.
  - `partnerUserId` (string, optional) — Partner's user identifier associated with this order.
  - `networkId` (string, optional) — Chain ID of the network.
  - `walletAddress` (string, optional) — Destination wallet address for the crypto.
  - `quoteId` (string, optional) — Quote ID used to create this order.
  - `amountPaid` (double, optional) — Amount already paid by the user.
  - `conversionPrice` (double, optional) — Fiat-to-crypto conversion rate.
  - `totalFeeInFiat` (double, optional) — Total fee charged in fiat currency.
  - `txHash` (string, optional, nullable) — Blockchain transaction hash. Null until the transaction is confirmed on-chain.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "orderId": "e053ef3e-2b89-4fa6-9679-89f1fe39625",
    "status": "AWAITING_PAYMENT_FROM_USER",
    "isBuyOrSell": "BUY",
    "fiatCurrency": "USD",
    "cryptoCurrency": "ETH",
    "paymentMethod": "apple_pay",
    "network": "ethereum",
    "fiatAmount": 20,
    "fiatAmountInUsd": 20,
    "cryptoAmount": 0.00812345,
    "partnerUserId": "f8f5ef8f-dac0-4718-a5bb-6ffcb389966",
    "networkId": "1",
    "walletAddress": "0xABCDEF1234567890abcdef1234567890ABCDEF12",
    "quoteId": "3417136e-2a64-4c3d-ba20-ac1dc2890285",
    "amountPaid": 0,
    "conversionPrice": 0.000406172,
    "totalFeeInFiat": 1.5,
    "txHash": null
  }
}
```

**SDK Code**

```python Success
import requests

url = "https://api-gateway-stg.transak.com/api/v2/transaction-session/request/:requestId/process"

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

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

print(response.json())
```

```javascript Success
const url = 'https://api-gateway-stg.transak.com/api/v2/transaction-session/request/:requestId/process';
const options = {
  method: 'POST',
  headers: {
    'x-access-token': '',
    'x-api-key': '',
    'x-user-ip': '',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/transaction-session/request/:requestId/process"

	payload := strings.NewReader("{}")

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

	req.Header.Add("x-access-token", "")
	req.Header.Add("x-api-key", "")
	req.Header.Add("x-user-ip", "")
	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/transaction-session/request/:requestId/process")

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

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

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/transaction-session/request/:requestId/process")
  .header("x-access-token", "")
  .header("x-api-key", "")
  .header("x-user-ip", "")
  .header("Content-Type", "application/json")
  .body("{}")
  .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/transaction-session/request/:requestId/process', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-access-token' => '',
    '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/transaction-session/request/:requestId/process");
var request = new RestRequest(Method.POST);
request.AddHeader("x-access-token", "");
request.AddHeader("x-api-key", "");
request.AddHeader("x-user-ip", "");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/transaction-session/request/:requestId/process")! 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()
```