Skip to content

Create an external account for a user

POST
/payment-gateways/external-accounts/{user_id}
curl --request POST \
--url https://acme.mykreezalid.com/api/v1/payment-gateways/external-accounts/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "type": "supplier", "gateway_id": 432349, "external_account_id": "acc_123456", "properties": { "preference": "static" }, "tos_acceptance": { "date": "2026-10-13 09:41:05", "user_agent": "Mozilla/5.0", "ip": "203.0.113.7" } }'

Links a user to their account at a payment gateway. Fields you do not list here are ignored.

user_id
required
integer

ID of the user

Media typeapplication/json
object
type

supplier for a vendor, customer for a customer

string

Example

supplier
gateway_id

Identifier of the payment gateway (see GET /payment-gateways)

integer

Example

432349
external_account_id

Identifier of the user’s account at the payment provider

string

Example

acc_123456
properties

Your own data about the account

object

Example

{
"preference": "static"
}
tos_acceptance
object
date
string

Example

2026-10-13 09:41:05
user_agent
string

Example

Mozilla/5.0
ip
string

Example

203.0.113.7

The new external account

Media typeapplication/json

The account of one of your users at a payment gateway.

object
totalResultsCount

Number of results across all pages.

integer
currentPage

Number of the page returned, starting at 1.

integer
nextPage

Whether a next page exists.

boolean
prevPage

Whether a previous page exists.

boolean
resultOnPageCount

Number of results on this page.

integer
pageCount

Number of pages.

integer
id

Identifier of the external account

integer
object

Returned when you create or update an account, not in the list

string
type

Role of the account: supplier for a vendor, customer for a customer

string
nullable
gateway_id

Identifier of the payment gateway

integer
nullable
external_account_id

Identifier of the account at the payment provider

string
nullable
properties

Your own data about the account

object
tos_acceptance

When and from where the user accepted the payment provider’s terms

object
date
string format: date-time
nullable
user_agent
string
nullable
ip
string
nullable
created
string format: date-time

Example

{
"totalResultsCount": 137,
"currentPage": 1,
"resultOnPageCount": 25,
"pageCount": 6,
"id": 4242,
"object": "ExternalAccount",
"type": "supplier",
"gateway_id": 432349,
"external_account_id": "acc_123456",
"properties": {
"preference": "static"
},
"tos_acceptance": {
"ip": "203.0.113.7"
}
}

The external account could not be saved.

Media typeapplication/json

Error body returned when the API refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message
string

Example

{
"code": 400,
"status": "error",
"message": "Some parameters are not correct"
}