- [HTTP request](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#body.request_body)
  - [JSON representation](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#body.response_body)
- [MandateDetails](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#MandateDetails)
  - [JSON representation](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#MandateDetails.SCHEMA_REPRESENTATION)
- [AsynchronousCaptureResponse](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#AsynchronousCaptureResponse)
  - [JSON representation](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#AsynchronousCaptureResponse.SCHEMA_REPRESENTATION)
- [AsynchronousCaptureResultCode](https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#AsynchronousCaptureResultCode)

Triggers the start of a money movement operation between a customer's account and the integrator. The integrator should acknowledge the request and perform whatever actions need to happen in order to complete the capture (e.g., collect a PIN from the user). The integrator will inform Google of the capture's final result by calling the `captureResultNotification` API.

The `requestId` within the header is the idempotency key and uniquely identifies this transaction. All mutations on this transaction (refunds) populate the `requestId` value in the `captureRequestId` field.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse`.

An example request looks like:


    {
      "requestHeader": {
          "protocolVersion": {
              "major": 1,
              "minor": 1,
              "revision": 0
          },
          "requestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
          "requestTimestamp": "1502220196077"
      },
      "paymentIntegratorAccountId": "InvisiCashIN_INR",
      "transactionDescription": "Google - Music",
      "transactionDateInMillis": "1402220196077",
      "currencyCode": "INR",
      "amount": "728000000",
      "mandateDetails": {
          "mandateId": "Gbsdfju4bnQgdHJXPFWSDhgdka4"
      }
    }

An example response looks like:


    {
      "responseHeader": {
        "responseTimestamp": "1481900013178"
      },
      "result": "ACKNOWLEDGED",
      "paymentIntegratorTransactionId": "aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA"
    }

### HTTP request

`POST https://www.integratorhost.example.com/integrator-base-path/refundable-one-time-payment-code-v1/asynchronousCapture`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/RequestHeader`) }, "paymentIntegratorAccountId": string, "transactionDescription": string, "transactionDateInMillis": string, "currencyCode": string, "amount": string, "mandateDetails": { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#MandateDetails`) } } ``` |

| Fields ||
|---|---|
| `requestHeader` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/RequestHeader`)`` **REQUIRED**: Common header for all requests. |
| `paymentIntegratorAccountId` | `string` **REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction. |
| `transactionDescription` | `string` **REQUIRED**: This is the description of the transaction that can be put on the customer's statement. This format can be changed without notice and must never be parsed. |
| `transactionDateInMillis` | `string (https://developers.google.com/discovery/v1/type-format format)` **REQUIRED**: The date for the transaction to be executed. This is represented as a Timestamp. This is the first millisecond of the day (in UTC) of the mandate start, 00:00:00.000 |
| `currencyCode` | `string` **REQUIRED**: ISO 4217 3-letter currency code |
| `amount` | `string (https://developers.google.com/discovery/v1/type-format format)` **REQUIRED** : The amount of the purchase, in [micros](https://developers.google.com/pay/refundable-one-time-payment-code-v1/reference/glossary#micros "What are micros?") of the currency unit. |
| `mandateDetails` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#MandateDetails`)`` **OPTIONAL**: Payment details specific to mandates. |

### Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an `ErrorResponse`, consult the `ErrorResponse` object and [HTTP status codes documentation](https://developers.google.com/pay/refundable-one-time-payment-code-v1/guides/connectivity/protocol-standards#http_status_codes).

| Possible response messages ||
|---|---|
| HTTP 200 Status | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#AsynchronousCaptureResponse`)`` |
| HTTP 4XX / 5XX Status | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse`)`` |
| End of mutually exclusive fields. ||

## MandateDetails

Details about the mandate to capture from.

| JSON representation |
|---|
| ``` { "mandateId": string } ``` |

| Fields ||
|---|---|
| `mandateId` | `string` **REQUIRED** : The mandate id that was generated during the `createMandate` call. |

## AsynchronousCaptureResponse

Response object for the capture method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ResponseHeader`) }, "paymentIntegratorTransactionId": string, "result": enum (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#AsynchronousCaptureResultCode`) } ``` |

| Fields ||
|---|---|
| `responseHeader` | ``object (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ResponseHeader`)`` **REQUIRED**: Common header for all responses. |
| `paymentIntegratorTransactionId` | `string` **REQUIRED**: This identifier is specific to the integrator and is generated by the integrator. This is the identifier that the integrator knows this transaction by. For convenience, this identifier is included with in the remittance details |
| `result` | ``enum (`https://developers.google.com/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/asynchronousCapture#AsynchronousCaptureResultCode`)`` **REQUIRED**: The result of the asynchronous capture call. |

## AsynchronousCaptureResultCode

Result codes for asynchronousCapture.

| Enums ||
|---|---|
| `UNKNOWN_RESULT` | Do not ever set this default value! |
| `ACKNOWLEDGED` | The capture has been requested and the integrator will do additional steps to determine if the capture was successful or declined. Once the integrator knows the result of the capture, they will inform Google of the result by calling the `captureResultNotification` API. |
| `ACCOUNT_CLOSED` | The user's account held with the integrator has been closed. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
| `ACCOUNT_CLOSED_ACCOUNT_TAKEN_OVER` | The user's account with the integrator has been closed, suspected account take over. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
| `ACCOUNT_ON_HOLD` | The account is on hold. |
| `ACCOUNT_CLOSED_FRAUD` | The user's account held with the integrator has been closed because of fraud. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
| `MULTIPLE_PAYMENTS_IN_PAYMENT_CYCLE` | The integrator detected multiple payment attempts within the same payment cycle where only one is permitted. Returning this value will cause this specific payment attempt to be declined. |