# Manual Capture (deprecated)

{% hint style="danger" %}
Please refer to [Commit Transaction](/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk/commit-transaction.md) for the new version.
{% endhint %}

Manual capture allows creating a transaction and call capture request later.

The capture request can only be called once, see [Tokenization flow](/sensepay/transaction-api/payment-flows/tokenization.md) for multi capture flow.

Manual capture is useful for making a payment and updating the payment details later.

### Create a Transaction

Call "transactions/init" in order to create a capture request and add the "methodType" field with "manual\_capture".

See here the full docs of [creating a transaction](/sensepay/transaction-api/payment-flows/create-a-transaction.md)

URL: **/api/transactions/Init**

Request Body:

```json
{
  "timeOut": 600,
  "deviceId": "2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm",
  "methodType": "manual_capture"
}
```

Response body:

```json
{
    "TransactionNumber": "5f3275249792ee75b41322e636617ee039e2e1a49cc80c11f2177233",
    "date": "2022-08-14T10:09:05.810Z",
    "status": 0,
    "statusName": "Initialize",
    "timeoutDate": "2022-08-14T10:19:05.872Z",
    "paymentCommit": {
        "messsage": "Payment commit is enabled for this transaction"
    },
    "businessId": "339978940107456",
    "businessName": "Coffee Bar",
    "pos": "POS 1",
    "businessOwnerPhone": "3587292",
    "businessCountry": "US",
    "businessCity": "Virginia Beach",
    "businessStreet": "123 Street",
    "businessAddress": "123 Street, Virginia Beach",
    "branchNumber": "1",
    "branchId": "1",
    "transactionPage": {
        "iOSLink": "https://pay.sandbox.sensepass.com/orderSummary/5f3275249792ee75b41322e636617ee039e2e1a49cc80c27f2177233",
        "androidLink": "https://pay.sandbox.sensepass.com/orderSummary/5f3275249792ee75b41322e636617ee039e2e1a49cc80c27f2177233",
        "qrURL": "https://pay.sandbox.sensepass.com/orderSummary/5f3275249792ee75b41322e636617ee039e2e1a49cc80c27f2177233"
    },
    "paymentDetails": {
        "type": "ManualCapture"
    }
}
```

The consumer tap the sticker, or get the payment link through e-mail or SMS, and choose a payment method.

### Capture

{% hint style="info" %}
You may add metadata to the request with the key "metadata", follow [Metadata Model](/sensepay/transaction-api/models/metadata-model.md) for further instructions.
{% endhint %}

URL: **/api/transactions/{transactionNumber}/capture**

Request Body:

```
{
  amount: number; // required
  deviceId: string; // required
  currency: string; // optional: 'USD' | 'ILS' | 'CAD'
  reason: string;
  clientPhoneNumber: string;
  clientName: string;
  clientEmail: string;
  products: ProductEntity[];
}
```

Here is an example:

```json
{
  "amount": 200,
  "deviceId": "2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm"
}
```

Response body:

```json
{
    "success": true,
    "transactionNumber": "dff8c53f80b25527666a5935b56fc431d8a68cc82e53234d907103d2",
    "transactionStatus": "TransactionApproved",
    "confirmation": {
        "fullConfirmationCode": "166-60202801955",
        "confirmationNumber": "166-60202801955",
        "approvedBy": "AuthorizeNet Sandbox",
        "providerId": "jDPPZyn8zdGtBcKUP4EbxTfwy62j+JShtQGDlbwx4/c=",
        "dateApproval": "2022-10-20T17:34:31.778Z",
        "approvalDate": "2022-10-20T17:34:31.778Z",
        "paymentMethodName": "Credit Card",
        "lastFourDigits": "1111",
        "cardExpiration": "1234"
    },
    "cardMask": ""
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sensepass.com/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk/manual-capture-deprecated.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
