Transactions

Get Transaction By Order ID

Get a transaction by order ID. Every order that has been paid has a transaction associated with it. This endpoint returns the transaction details for a given order ID.

get/v1/transactions/{orderId}

Request

  • Base URL: https://api.roastify.app
  • URL: https://api.roastify.app/v1/transactions/{orderId}
  • Auth: API key in header x-api-key

Path parameters

orderIdstring required

The Id of the order

Example:1ef87e47-266e-466f-ab06-a64994aefbb0

Response

Get a transaction by order ID

createdAtstring required

The date the transaction was created

orderIdstring required

The order ID associated with the transaction

amountnumber required

The amount of the transaction in cents. Ex: 1000 = $10.00

currencystring required

The currency of the transaction

paymentStatusstring nullable required

The payment status of the transaction

paymentMethodstring nullable required

The payment method used for the transaction

type'balanceTransaction' | 'paymentIntent' | 'subscription' required

Enum for the type of transaction, either balanceTransaction or paymentIntent. BalanceTransaction is used for adjusting the customer's balance. PaymentIntent is used for processing payments using the customer's default payment method.

Example response

{
  "createdAt": "2021-08-25T20:00:00.000Z",
  "orderId": "65df6d09eb81B03ab600782c",
  "amount": 1000,
  "currency": "USD",
  "paymentStatus": "paid",
  "paymentMethod": "card",
  "type": "balanceTransaction"
}

Changes

No recorded changes to this operation across all 1 revision of this API.