# Generate card payment context

<mark style="color:green;">POST:</mark> v1/payment/get-capture-context

#### Headers

| Name       | Type   | Description               |
| ---------- | ------ | ------------------------- |
| public-key | String | Your Redstone  public key |
| secret-key | String | Your Redstone secret key  |

## Request body

* currency (string, required): The currency of the payment.
* amount (string, required): The amount of the payment.

## Response

The response will be in JSON format and will have the following schema:

```
{
    "status": "success",
    "code": 200,
    "message": "success",
    "data": {
        "message": "success",
        "capture_token": "eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0.eyJmbHgiOnsicGF0aCI6Ii9mbGV4L3YyL3Rva2VucyIsImRhdGEiOiJvdW9YMm9xUXJxVG5DeTVRODlTeE14QUFFR1pwMmhTRUNQdy9OSGVmcW91eDRGTjFSMmZobVA5R1JYTDVsSUJlLzVhVmtRUHhUcEZTOGdSZkJxL3F1TG01eGhFanFXRndHcE1FVHd1bXJnM1pkWVI0S2h5dmdTcGpUL29EaGFhemdSS0RjWDdKUVF3UzdzY3hHS0hSZDQ4Um9RXHUwMDNkXHUwMDNkIiwib3JpZ2luIjoiaHR0cHM6Ly90ZXN0ZmxleC5jeWJlcnNvdXJjZS5jb20iLCJqd2siOnsia3R5IjoiUlNBIiwiZSI6IkFRQUIiLCJ1c2UiOiJlbmMiLCJuIjoicXV2bVlnYzU5VkxMalBscTV4WTZGX3lSTHZ0QU1ueEVoZF9pTWVXcWZCd2NMVGFnUXFuZXJUMTNmalB1N0IyZnJuc1c2U1NxWW1BRWpWcHFfVXJOR2V5SnE1V3E0UUltMWI3N2k2T3pIQTREdmRTSC1hdDR5c2UzNHl3bzM3b1A3d3N2M190bVJHWEhqdFFhVW5QYXBYNVVuNjZzSkVacnZ6MWd4eEJQLUJsQnlrRWVrOGwzRmJJTXdyVjhXNUo1M3IyV0ZuZFBZdGIzZVhGNjR4VGJaVl9GR1I2YlR4RVZUR3dkWlQwczA1ZUZkMmpuNjlWVWdDOXBtVkJGbVlZZ2lhT3RBX09pQkk5azlMeWNGSWR0Tl92T2VfRXFVS05n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.Jbb-SR7-kirYmA2PpNrlmugorg2n_d4-kuUb1JgF67KJqTPfHrVaOLFMfFrehkq40OvYPeeqRQBcHI1kAkG-HvbsyVvjFsupkKwmCYPu0ntskk3Y6f6xeujWmZZvbToSxcyeSC0GhPdH9MFl4O7PYoFmG_zQM8BeOZucN_d-kOtz01Kg90siTsvQA1BWWutkR0sIIqsesqFuU2UdCYXgeND0Ac4fkI8_jbwroMvelTD6DLmo0-mZXc1cWCSdOW857FI-UEZV9qQV7lQewtcHM9OMS95uWrqEezndImPTk3n86K4rTEEzhPd_OJxtkuWS-9Y1QqJ1kfOwkZkIKGXAmA"
    }
}
```

The capture\_token will be used to initialize the microform on the Generate card payment token endpoint.


---

# 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://developer.redstonepgs.com/api-documentation/payments/generate-card-payment-context.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.
