# Create a single-use token, run a payment, optionally reverse it

Create a single-use token, run a payment, optionally reverse it

1. Tokenize the customer's card into a single-use token. The response token is 128 chars, single-use, and expires after 30 minutes — spend it immediately in the next step. The source object is polymorphic; this models the keyed card variant (type: card).
 [createSingleUseToken](/api/create-single-use-token)
2. Run the payment using the single-use token from step 1. Pass the 128-char value as paymentMethod.token with paymentMethod.type set to singleUseToken. This consumes the token — it cannot be reused. Returns 201 with the paymentId and a transactionResult whose status is asserted as ready.
 [payment](/api/payment)
3. OPTIONAL — reverse (void) the payment before it settles, using the paymentId from step 2. Omit amount to reverse the full payment. This is a void of an open-batch payment — distinct from a refund, which returns funds after settlement. Returns 200.
 [reversePayment](/api/reverse-payment)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. single-use token request · API"]
  step1["2. payment request · API"]
  step0 --> step1
  step2["3. reversal request · API"]
  step1 --> step2
```
