Skip to main content
GET
/
cards
/
{id}
/
transactions
/
{transactionId}
curl -X GET https://api.swervpay.co/api/v1/cards/{id}/transactions/{transactionId} \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json"
import { SwervpayClient } from '@swervpaydev/sdk';

const config = {
    secretKey: "<SECRET_KEY>",
    businessId: "<BUSINESS_ID>"
}

const swervpay = new SwervpayClient(config);

await swervpay.card.transaction('<CARD_ID>', '<TRANSACTION_ID>');
use Swervpaydev\SDK\Swervpay;

$config = [
	'business_id' => '<BUSINESS_ID>',
	'secret_key' => '<SECRET_KEY>'
];

$client = new Swervpay($config);

$client->card()->transaction('<CARD_ID>', '<TRANSACTION_ID>');
package main

import (
	"context"
	"fmt"
	"github.com/swerv-ltd/swervpay-go"
	"log"
)

func main() {
	ctx := context.Background()

	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
        BusinessID: "<BUSINESS_ID>",
        SecretKey: "<SECRET_KEY>",
    })

	resp, err := client.Card.Transaction(ctx, "<CARD_ID>", "<TRANSACTION_ID>")

	if err != nil {
		log.Fatal("error", err.Error())
		return
	}
}
{
  "amount": 123,
  "category": "<string>",
  "charges": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "description": "<string>",
  "id": "<string>",
  "merchant_city": "<string>",
  "merchant_country": "<string>",
  "merchant_mcc": "<string>",
  "merchant_mid": "<string>",
  "merchant_name": "<string>",
  "merchant_postal_code": "<string>",
  "merchant_state": "<string>",
  "reference": "<string>",
  "report": true,
  "report_message": "<string>",
  "status": "<string>",
  "type": "<string>",
  "updated_at": "2023-11-07T05:31:56Z"
}
{
"message": "<string>",
"values": {}
}
{
"message": "<string>",
"values": {}
}
{
"message": "<string>",
"values": {}
}
curl -X GET https://api.swervpay.co/api/v1/cards/{id}/transactions/{transactionId} \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json"
import { SwervpayClient } from '@swervpaydev/sdk';

const config = {
    secretKey: "<SECRET_KEY>",
    businessId: "<BUSINESS_ID>"
}

const swervpay = new SwervpayClient(config);

await swervpay.card.transaction('<CARD_ID>', '<TRANSACTION_ID>');
use Swervpaydev\SDK\Swervpay;

$config = [
	'business_id' => '<BUSINESS_ID>',
	'secret_key' => '<SECRET_KEY>'
];

$client = new Swervpay($config);

$client->card()->transaction('<CARD_ID>', '<TRANSACTION_ID>');
package main

import (
	"context"
	"fmt"
	"github.com/swerv-ltd/swervpay-go"
	"log"
)

func main() {
	ctx := context.Background()

	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
        BusinessID: "<BUSINESS_ID>",
        SecretKey: "<SECRET_KEY>",
    })

	resp, err := client.Card.Transaction(ctx, "<CARD_ID>", "<TRANSACTION_ID>")

	if err != nil {
		log.Fatal("error", err.Error())
		return
	}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required
transactionId
string
required

Response

OK

amount
number
category
string
charges
number
created_at
string<date-time>
currency
string
description
string
id
string
merchant_city
string
merchant_country
string
merchant_mcc
string
merchant_mid
string
merchant_name
string
merchant_postal_code
string
merchant_state
string
reference
string
report
boolean
report_message
string
status
string
type
string
updated_at
string<date-time>