Skip to main content
POST
/
payins
/
{id}
/
refund
Refund payin
curl --request POST \
  --url https://{subdomain}.truust.io/2.0/payins/{id}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 2,
  "multipayin": 0
}
'
{
  "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": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.truust.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Path Parameters

id
integer
required

Payin ID.

Body

application/json
amount
number

Amount to refund. Defaults to full amount if not provided.

Required range: x >= 0
multipayin
enum<integer>

Set to 1 to refund all payins associated with the order of this payin.

Available options:
0,
1
bankaccount_id
integer

Required if the payin is of Bankwire type. Bank account ID to receive the refund.

tag
string
Maximum string length: 100
metadata
object

Response

Payin with refund details

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.