---
title: "Create payin"
method: POST
path: "/payins"
tags: ["Payins"]
---

# Create payin

`POST /payins`

Creates a payin (payment intent) for an order. Requires `order_id` and either `type` or `gateway_id`.

For card payments, the response includes a `direct_link` to the payment page.
For bank wire payments, the response includes bank transfer details in `provider`.

## Request body

- object
  - `order_id` integer, required — ID of the order to pay.
  - `type` string, required — Payment method type. Valid values include `BANKWIRE`, `WALLET`, and any registered gateway type for the account (e.g. `REDSYS_V2`, `ADDON`, `ADDON_V2`, `ADDON_ICE`, `ADDON_HPP`, `ADDON_APPLE_PAY`, `AZUPAY`, `DCP`, `EPX`, `REDSYS_APPLE_PAY`, `REDSYS_AUTH`, `STRIPE`, `DOCOMO`, `SIBS_MBWAY`, `SIBS_MULTIBANCO`, `SEQURA`, `UNNAX`, `PAYPAL`, `BIZUM`, `INESPAY`).
  - `gateway_id` integer — Gateway ID to use. Alternative to `type`.
  - `card_id` integer — Saved card ID to charge (for recurring or one-click payments).
  - `wallet_id` integer — Wallet ID to debit. Required when `type` is `WALLET`.
  - `save_card` 0 | 1 — Set to `1` to tokenize and save the card for future use.

## Response `200`

Payin created

- Payin
  - `id` integer
  - `self` string
  - `reference` string, nullable — Provider's payment reference ID.
  - `type` string — Payment method type (e.g. `CARD`, `BANKWIRE`, `WALLET`).
  - `subtype` string, nullable
  - `status` 'CREATED' | 'AUTHORIZED' | 'CONFIRMED' | 'DENIED' | 'REFUNDED' | 'CANCELLED'
  - `provider` object — Raw provider response data.
  - `tag` string, nullable
  - `direct_link` string, uri, nullable — Payment page URL. Only present when status is `CREATED` or `AUTHORIZED`.
  - `created_at` string, date-time, nullable
  - `confirmed_at` string, date-time, nullable
  - `denied_at` string, date-time, nullable
  - `connections` Connections — Hypermedia links to related resources.

## Other responses

- `404` — Validation error

## Changes

- **2026-03-11** `ff825f6602c8` — 6 breaking, 2 info
  - request property `save_card` was restricted to a list of enum values
  - the request property `type` became required
  - removed the enum value `BANKWIRE` of the request property `type`
  - removed the enum value `CARD` of the request property `type`
  - …4 more

[Change history](https://skmtc.dev/truust-io/apis/truust-api/changes/payins/post.md)

---

[API](https://skmtc.dev/truust-io/apis/truust-api.md) · [All operations](https://skmtc.dev/truust-io/apis/truust-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/truust-io/truust-api/revisions/cc81e28726b9/schema)
