Skip to main content
POST
Create source (publishable)

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Body

application/json

A payment source: either a single-use intent (e.g. one-off bank transfer) or a reusable tokenization (e.g. saved card).

gateway
string
required

Gateway ID (e.g. transbank, stripe, ach_transfer).

customer
string | null

Customer ID. Required for reusable sources.

usage
enum<string>
default:single
Available options:
single,
reusable
amount
number | null
description
string | null
Maximum string length: 256
return_url
string<uri> | null

URL the payer is sent to after a redirect-flow tokenization.

client
object

Client metadata captured at creation time (IP, user agent, etc.).

metadata
object

Response

Source created.

A payment source: either a single-use intent (e.g. one-off bank transfer) or a reusable tokenization (e.g. saved card).

gateway
string
required

Gateway ID (e.g. transbank, stripe, ach_transfer).

id
integer
read-only
customer
string | null

Customer ID. Required for reusable sources.

usage
enum<string>
default:single
Available options:
single,
reusable
status
enum<string>
read-only
Available options:
failed,
pending,
requires_authorization,
waiting_authorization,
consumed,
chargeable,
finalized
amount
number | null
description
string | null
Maximum string length: 256
return_url
string<uri> | null

URL the payer is sent to after a redirect-flow tokenization.

gateway_data
object
read-only

Gateway-specific payload (e.g. redirect form fields, token).

client
object

Client metadata captured at creation time (IP, user agent, etc.).

metadata
object
card
object

Card details when the source represents a tokenized card.

test_mode
boolean
read-only
created
string<date-time>
read-only
updated
string<date-time>
read-only