Skip to main content
GET
/
v2
/
payment_methods
/
{payment_method_id}
Retrieve a payment method
curl --request GET \
  --url https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id} \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.sbx.imprint.co/v2/payment_methods/{payment_method_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "id": "DCBFC736-2286-42DD-897D-160DCA80AED2",
  "customer_id": "B40A789E-BD46-4BB9-B63E-F9919582694C",
  "created_at": "2025-02-13T19:08:07.000Z",
  "metadata": {
    "platform_version": "2.1.0"
  },
  "card": {
    "last4": "1234",
    "card_design_id": "3b9c1f3e-52a0-44c1-b131-a7ab0099a214",
    "pci_details": {
      "pan": "5105105105105100",
      "exp_month": "06",
      "exp_year": "26",
      "cvv": "123"
    },
    "tokens": [
      {
        "token": "<string>",
        "created_at": "2025-02-13T19:08:07.000Z",
        "updated_at": "2025-02-13T19:08:07.000Z",
        "pan_reference_id": "<string>"
      }
    ]
  },
  "bank_account": {
    "last4": "1234",
    "routing_number": "<string>",
    "bank_name": "Wells Fargo"
  },
  "loan": {
    "amount": 10000,
    "term_months": 12,
    "currency": "USD",
    "remaining_balance": 123,
    "apr": "5.89"
  },
  "updated_at": "2025-02-13T19:08:07.000Z"
}
{
"type": "PAYMENT_METHOD_NOT_FOUND_ERROR",
"message": "Payment method not found for provided ID: pymd_123",
"param": "payment_method_id"
}

Authorizations

Authorization
string
header
required

Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>

Path Parameters

payment_method_id
string
required

The unique identifier of the payment method

Example:

"9ED4FE47-8E9C-48E9-BBEF-094DF1789012"

Response

Payment method retrieved successfully

id
string
required

The unique ID Imprint assigns to the payment method.

Example:

"DCBFC736-2286-42DD-897D-160DCA80AED2"

type
enum<string>
required

The type of payment method

Available options:
CARD,
BANK_ACCOUNT,
LOAN
customer_id
string
required

The id of the Imprint customer that the payment method belongs to.

Example:

"B40A789E-BD46-4BB9-B63E-F9919582694C"

created_at
string
required

the RFC-3339 timestamp when the payment method was created

Example:

"2025-02-13T19:08:07.000Z"

status
enum<string>
required

Current status of the payment method

Available options:
ACTIVE,
INACTIVE,
CANCELED
metadata
object
required

Additional metadata for the payment method

Example:
{ "platform_version": "2.1.0" }
card
object

When payment method is a CARD type, this object will have card specific data.

bank_account
object

When payment method is a BANK_ACCOUNT type, this object will have bank account specific data.

loan
object

When payment method is a LOAN type, this object will have loan specific data.

updated_at
string

the RFC-3339 timestamp when the payment method was last updated

Example:

"2025-02-13T19:08:07.000Z"