Skip to main content
POST
/
payins
Create payin
curl --request POST \
  --url https://api.truust.io/2.0/payins \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "order_id": 4950,
  "type": "REDSYS_V2",
  "save_card": 1
}
'
{
  "id": 123,
  "self": "/2.0/payins/456",
  "reference": "<string>",
  "type": "<string>",
  "subtype": "<string>",
  "status": "CREATED",
  "provider": {},
  "tag": "<string>",
  "direct_link": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "confirmed_at": "2023-11-07T05:31:56Z",
  "denied_at": "2023-11-07T05:31:56Z",
  "connections": {}
}

Authorizations

Authorization
string
header
required

Use your account's Secret Key as the Bearer token.

Body

application/json
order_id
integer
required

ID of the order to pay.

Example:

4950

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).

Example:

"REDSYS_V2"

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
enum<integer>

Set to 1 to tokenize and save the card for future use.

Available options:
0,
1

Response

Payin created

id
integer
self
string
Example:

"/2.0/payins/456"

reference
string | null

Provider's payment reference ID.

type
string

Payment method type (e.g. CARD, BANKWIRE, WALLET).

subtype
string | null
status
enum<string>
Available options:
CREATED,
AUTHORIZED,
CONFIRMED,
DENIED,
REFUNDED,
CANCELLED
provider
object

Raw provider response data.

tag
string | null

Payment page URL. Only present when status is CREATED or AUTHORIZED.

created_at
string<date-time> | null
confirmed_at
string<date-time> | null
denied_at
string<date-time> | null
connections
object

Hypermedia links to related resources.