> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/docs/checkout/tokenization-use-token",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Use a stored card token

> Charge a stored Dintero card token for customer-initiated and merchant-initiated payments, including subscriptions, recurring billing, and one-click checkout.

### Customer initiated transactions

To use the token in a new session for the same customer, put the token value in
the session under `customer.tokens.payex.creditcard` or `customer.tokens.bambora.creditcard`. See [create session].

<Tabs groupId="payment_product" queryString>
  <TabItem value="payex" label="payex.creditcard">
    ```json theme={null}
    {
      "url": {
        "return_url": "https://example.com/thankyou",
        "callback_url": "https://example.com/callback"
      },
      "order": {
        "amount": 29990,
        "currency": "NOK",
        "merchant_reference": "merchants_order_number"
      },
      "customer": {
        "email": "john.doe@example.com",
        "phone_number": "+4799999999",
        "tokens": {
          "payex.creditcard": {
            "payment_token": "<token previously acquired>"
          }
        }
      },
      "profile_id": "default"
    }
    ```
  </TabItem>

  <TabItem value="bambora" label="bambora.creditcard">
    ```json theme={null}
    {
      "url": {
        "return_url": "https://example.com/thankyou",
        "callback_url": "https://example.com/callback"
      },
      "order": {
        "amount": 29990,
        "currency": "NOK",
        "merchant_reference": "merchants_order_number"
      },
      "customer": {
        "email": "john.doe@example.com",
        "phone_number": "+4799999999",
        "tokens": {
          "bambora.creditcard": {
            "payment_token": "<token previously acquired>"
          }
        }
      },
      "profile_id": "default"
    }
    ```
  </TabItem>

  <TabItem value="dintero_psp" label="dintero_psp.creditcard">
    ```json theme={null}
    {
      "url": {
        "return_url": "https://example.com/thankyou",
        "callback_url": "https://example.com/callback"
      },
      "order": {
        "amount": 29990,
        "currency": "NOK",
        "merchant_reference": "merchants_order_number"
      },
      "customer": {
        "email": "john.doe@example.com",
        "phone_number": "+4799999999",
        "tokens": {
          "dintero_psp.creditcard": {
            "payment_token": "<token previously acquired>"
          }
        }
      },
      "profile_id": "default"
    }
    ```
  </TabItem>
</Tabs>

The response will look like this:

```json theme={null}
{
    "id": "T11223445.5cyWnV68vzJ1kYjZPrKWWm",
    "url": "https://checkout.test.dintero.com/v1/view/T11223445.5cyWnV68vzJ1kYjZPrKWWm"
}
```

Redirect the customer to the url for them to confirm the payment with `CVC`.

### Recurrence transactions

To perform transactions without involving the customer, using a recurrence token,
use `recurring_purchase` operation when calling the pay endpoint.

With the access token, call [Create and pay merchant initiated session][post session pay]
with the following body:

<Tabs groupId="payment_product" queryString>
  <TabItem value="payex" label="payex.creditcard">
    ```json theme={null}
    {
      "session": {
        "url": {
          "callback_url": "https://example.com/callback?method=GET"
        },
        "customer": {
          "email": "john.doe@example.com",
          "phone_number": "+4799999999",
          "tokens": {
            "payex.creditcard": {
              "recurrence_token": "<token previously acquired>"
            }
          }
        },
        "order": {
          "amount": 29990,
          "currency": "NOK",
          "vat_amount": 6000,
          "items": [
            {
              "line_id": "1",
              "description": "Stablestol",
              "quantity": 1,
              "amount": 29990,
              "vat_amount": 6000,
              "vat": 25
            }
          ],
          "merchant_reference": "order-1"
        },
        "configuration": {
          "auto_capture": false
        }
      },
      "payment": {
        "payment_product_type": "payex.creditcard",
        "operation": "recurring_purchase"
      }
    }
    ```
  </TabItem>

  <TabItem value="bambora" label="bambora.creditcard">
    ```json theme={null}
    {
      "session": {
        "url": {
          "callback_url": "https://example.com/callback?method=GET"
        },
        "customer": {
          "email": "john.doe@example.com",
          "phone_number": "+4799999999",
          "tokens": {
            "bambora.creditcard": {
              "payment_token": "<token previously acquired>"
            }
          }
        },
        "order": {
          "amount": 29990,
          "currency": "NOK",
          "vat_amount": 6000,
          "items": [
            {
              "line_id": "1",
              "description": "Stablestol",
              "quantity": 1,
              "amount": 29990,
              "vat_amount": 6000,
              "vat": 25
            }
          ],
          "merchant_reference": "order-1"
        },
        "configuration": {
          "auto_capture": false
        }
      },
      "payment": {
        "payment_product_type": "bambora.creditcard",
        "operation": "recurring_purchase"
      }
    }
    ```
  </TabItem>

  <TabItem value="dintero_psp" label="dintero_psp.creditcard">
    ```json theme={null}
    {
      "session": {
        "url": {
          "callback_url": "https://example.com/callback?method=GET"
        },
        "customer": {
          "email": "john.doe@example.com",
          "phone_number": "+4799999999",
          "tokens": {
            "dintero_psp.creditcard": {
              "payment_token": "<token previously acquired>"
            }
          }
        },
        "order": {
          "amount": 29990,
          "currency": "NOK",
          "vat_amount": 6000,
          "items": [
            {
              "line_id": "1",
              "description": "Stablestol",
              "quantity": 1,
              "amount": 29990,
              "vat_amount": 6000,
              "vat": 25
            }
          ],
          "merchant_reference": "order-1"
        },
        "configuration": {
          "auto_capture": false
        }
      },
      "payment": {
        "payment_product_type": "dintero_psp.creditcard",
        "operation": "recurring_purchase"
      }
    }
    ```
  </TabItem>
</Tabs>

### Unscheduled transactions

To perform transactions without involving the customer, MIT (merchant initiated)
transactions use `unscheduled_purchase` operation when calling the pay endpoint.

With the access token, call [Create and pay merchant initiated session][post session pay]
with the following body:

<Tabs groupId="payment_product" queryString>
  <TabItem value="payex" label="payex.creditcard">
    ```json theme={null}
    {
      "session": {
        "url": {
          "callback_url": "https://example.com/callback?method=GET"
        },
        "customer": {
          "email": "john.doe@example.com",
          "phone_number": "+4799999999",
          "tokens": {
            "payex.creditcard": {
              "payment_token": "<token previously acquired>"
            }
          }
        },
        "order": {
          "amount": 29990,
          "currency": "NOK",
          "vat_amount": 6000,
          "items": [
            {
              "line_id": "1",
              "description": "Stablestol",
              "quantity": 1,
              "amount": 29990,
              "vat_amount": 6000,
              "vat": 25
            }
          ],
          "merchant_reference": "order-1"
        },
        "configuration": {
          "auto_capture": false
        }
      },
      "payment": {
        "payment_product_type": "payex.creditcard",
        "operation": "unscheduled_purchase"
      }
    }
    ```
  </TabItem>

  <TabItem value="bambora" label="bambora.creditcard">
    ```json theme={null}
    {
      "session": {
        "url": {
          "callback_url": "https://example.com/callback?method=GET"
        },
        "customer": {
          "email": "john.doe@example.com",
          "phone_number": "+4799999999",
          "tokens": {
            "bambora.creditcard": {
              "payment_token": "<token previously acquired>"
            }
          }
        },
        "order": {
          "amount": 29990,
          "currency": "NOK",
          "vat_amount": 6000,
          "items": [
            {
              "line_id": "1",
              "description": "Stablestol",
              "quantity": 1,
              "amount": 29990,
              "vat_amount": 6000,
              "vat": 25
            }
          ],
          "merchant_reference": "order-1"
        },
        "configuration": {
          "auto_capture": false
        }
      },
      "payment": {
        "payment_product_type": "bambora.creditcard",
        "operation": "unscheduled_purchase"
      }
    }
    ```
  </TabItem>

  <TabItem value="dintero_psp" label="dintero_psp.creditcard">
    ```json theme={null}
    {
      "session": {
        "url": {
          "callback_url": "https://example.com/callback?method=GET"
        },
        "customer": {
          "email": "john.doe@example.com",
          "phone_number": "+4799999999",
          "tokens": {
            "dintero_psp.creditcard": {
              "payment_token": "<token previously acquired>"
            }
          }
        },
        "order": {
          "amount": 29990,
          "currency": "NOK",
          "vat_amount": 6000,
          "items": [
            {
              "line_id": "1",
              "description": "Stablestol",
              "quantity": 1,
              "amount": 29990,
              "vat_amount": 6000,
              "vat": 25
            }
          ],
          "merchant_reference": "order-1"
        },
        "configuration": {
          "auto_capture": false
        }
      },
      "payment": {
        "payment_product_type": "dintero_psp.creditcard",
        "operation": "unscheduled_purchase"
      }
    }
    ```
  </TabItem>
</Tabs>

[post session pay]: /payments-api.html#operation/checkout_session_pay_post

[create session]: /payments-api.html#operation/checkout_session_profile_post
