Sources

Source object represent your customer's payment method or instrument. Those are used with Payments API to pay a payment or related to Customer object to be used as a reusable payment instrument.

Source object

Attributes

id string

Unique object's identifier.

customer string

ID of the Customer to which this Source was related.

gateway choice

The payment gateway that the Source represents.

Possible choice values paypal webpay khipu oneclick

amount float

A float number in the currency unit, this is 10.5 USD or 10000 CLP. This is the amount for which the source will be chargeable once ready. Required for single_use gateway.

status string

The status of the Source, one of failed, pending, consumed, chargeable or finalized . For a gateway with single_use usage only chargeable sources can be used to pay a payment.

description string

A short Source's description. Its max length is 256.

created timestamp

Time at which the object was created in format yyyy-mm-dd hh:mm:ss

updated timestamp

Time at which the object was updated in format yyyy-mm-dd hh:mm:ss

Create a source

POST https://api.piriod.com/sources/

Creates a new source object.

Request Body

Name
Type
Description

gateway

string

The payment gateway of the source to create.

string

string

gateway

string

{
    "name": "Cake's name",
    "recipe": "Cake's recipe name",
    "cake": "Binary cake"
}

Retrieve a source

GET https://api.piriod.com/sources/

Request Body

Name
Type
Description

gateway

string

The payment gateway of the source to create.

Destroy a source

DELETE https://api.piriod.com/sources/

Request Body

Name
Type
Description

gateway

string

The payment gateway of the source to create.

Authorize a source

GET https://api.piriod.com/sources/{{id}}/authorize/

Path Parameters

Name
Type
Description

string

Last updated