Transactions

Call the Payments API to request transactions via bank transfer or pix.


GET /transaction/{id}

Request

curl -v --location --request GET 'https://sandbox.smartfastpay.com/transaction/{id}' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \'

Response

{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": {
        "id": "744252be-fe0b-4209-838c-93635b157951",
        "customer_id": "58f0c005-3b7d-4c75-81f3-93b9a6fee864",
        "transaction_id": "b08e3897-6505-4bb4-81a5-6e3a1d29e277",
        "amount": "300.00",
        "currency": "USD",
        "status": "pending",
        "type": "payment",
        "method": "bank_transfer",
        "payment_status": "pending",
        "created_at": "2021-11-11T19:08:20.000000Z",
        "updated_at": "2021-11-11T19:08:20.000000Z"
    }
}

Response details

ParameterDescription

id

The created payment by the request made unique identificator.

customer_id

The customer id stored on your platform for future identification.

transaction_id

The id of the transaction generated in you platform.

amount

The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)

currency

The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.

status

The current status of the payment. These are our statuses: open, pending, paid, canceled

type

Shows the type of this transaction. payment or payout

method

Shows the payment method of this transaction, usually bank_transfer or pix

payment_status

The current status of the payment. These are our statuses: pending, paid, denied, expired

payout_status

The current status of the payment. These are our statuses: pending, success, failed, onhold, returned, refunded

created_at

The date and time the transaction was created.

updated_at

The date and time the transaction was updated with new status.


GET /transactions

Request

# Without parameters

curl -v --location --request GET 'https://sandbox.smartfastpay.com/transactions' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer < Access-Token >' \'
# With parameters

curl -v --location --request GET 'https://sandbox.smartfastpay.com/transactions?limit=1&order=id,desc' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer < Access-Token >' \'

Parameters detail

ParameterTypeDescription

limit

integer min: 1 | max: 40

The number of items to return in the response.

page

integer min: 1 | max: 9999999

The page number indicating which set of items will be returned in the response. So, the combination of page=1 and limit=20 returns the first 20 items. The combination of page=2 and limit=20 returns items 21 through 40.

sort

string Format: item,(asc|desc)

Sorts the items in the response by filter in ascending or descending order. Eg.: sort=id,desc (This combination returns a list in descending order based on id.)

start_time

string Internet date and time format

The start date and time for the range to show in the response, in Internet date and time format. Eg.: start_time=2021-09-05T11:00:00Z.

end_time

string Internet date and time format

The end date and time for the range to show in the response, in Internet date and time format. Eg.: end_time=2021-09-05T11:00:00Z.

customer_id

string min: 1 | max: 255

Sorts the items in the response by looking for the customer_id that was once provided by your system.

transaction_id

string

Sorts the items in the response by looking for the transaction_id that was once provided by your system. To get multiple transaction_id, send each transaction_id separating by comma (,). Eg.: 8fecdfcc-4e4d-11ee,8fece5ee-4e4d-11ee, d42953be-4e4d-11ee

Response

{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": [
        {
            "id": "b2a9a131-ba69-4722-a2de-67062268bc27",
            "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
            "transaction_id": "22dd9e47-97c7-4982-af50-3d3e0782d054",
            "amount": "980.00",
            "currency": "USD",
            "status": "pending",
            "type": "payout",
            "payout_status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        },
        {
            "id": "744252be-fe0b-4209-838c-93635b157951",
            "customer_id": "58f0c005-3b7d-4c75-81f3-93b9a6fee864",
            "transaction_id": "b08e3897-6505-4bb4-81a5-6e3a1d29e277",
            "amount": "300.00",
            "currency": "USD",
            "status": "pending",
            "type": "payment",
            "method": "bank_transfer",
            "payment_status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        },
        {
            "id": "af78bccd-cc66-4e92-8ee6-56b3d6686327",
            "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
            "transaction_id": "22dd9e47-97c7-4982-af50-3d3e0782d054",
            "amount": "980.00",
            "currency": "USD",
            "status": "pending",
            "type": "payment",
            "method": "pix",
            "payment_status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        }
    ]
}

Response details

ParameterDescription

id

The created payment by the request made unique identificator.

customer_id

The customer id stored on your platform for future identification.

transaction_id

The id of the transaction generated in you platform.

amount

The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)

currency

The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.

status

The current status of the payment. These are our statuses: open, pending, paid, canceled

type

Shows the type of this transaction. payment or payout

method

Shows the payment method of this transaction, usually bank_transfer or pix

payment_status

The current status of the payment. These are our statuses: pending, paid, denied, expired

payout_status

The current status of the payment. These are our statuses: pending, success, failed, onhold, returned, refunded

created_at

The date and time the transaction was created.

updated_at

The date and time the transaction was updated with new status.