Additional information about a card purchase (e.g., settlement or refund), such as level 3 line item data.
{
"card_payment_id": "card_payment_nd3k2kacrqjli8482ave",
"id": "card_purchase_supplement_ijuc45iym4jchnh2sfk3",
"invoice": {
"discount_amount": 100,
"discount_currency": "USD",
"discount_treatment_code": null,
"duty_tax_amount": 200,
"duty_tax_currency": "USD",
"order_date": "2023-07-20",
"shipping_amount": 300,
"shipping_currency": "USD",
"shipping_destination_country_code": "US",
"shipping_destination_postal_code": "10045",
"shipping_source_postal_code": "10045",
"shipping_tax_amount": 400,
"shipping_tax_currency": "USD",
"shipping_tax_rate": "0.2",
"tax_treatments": null,
"unique_value_added_tax_invoice_reference": "12302"
},
"line_items": [
{
"detail_indicator": "normal",
"discount_amount": null,
"discount_currency": null,
"discount_treatment_code": null,
"id": "card_purchase_supplement_invoice_line_item_nf9760lz0apqy5retmqh",
"item_commodity_code": "001",
"item_descriptor": "Coffee",
"item_quantity": "1.0",
"product_code": "101",
"sales_tax_amount": null,
"sales_tax_currency": null,
"sales_tax_rate": null,
"total_amount": 500,
"total_amount_currency": "USD",
"unit_cost": "5.0",
"unit_cost_currency": "USD",
"unit_of_measure_code": "NMB"
}
],
"shipping": {
"customer_reference_number": null,
"destination_address": null,
"destination_country_code": "US",
"destination_postal_code": "10045",
"destination_receiver_name": null,
"discount_amount": null,
"net_amount": 500,
"number_of_packages": 1,
"origin_address": null,
"origin_country_code": "US",
"origin_postal_code": "10045",
"origin_sender_name": null,
"pick_up_date": "2023-07-20",
"service_description": null,
"service_level_code": null,
"shipping_courier_name": "UPS",
"tax_amount": null,
"tracking_number": "1Z9999999999999999",
"unit_of_measure": null,
"weight": null
},
"transaction_id": "transaction_uyrp7fld2ium70oa7oi",
"type": "card_purchase_supplement"
}The ID of the Card Payment this transaction belongs to.
The Card Purchase Supplement identifier.
Invoice-level information about the payment.
Line item information, such as individual products purchased.
Shipping information for the purchase.
The ID of the transaction.
A constant representing the object’s type. For this resource it will always be card_purchase_supplement.
curl \
--url "${INCREASE_URL}/card_purchase_supplements?card_payment_id=card_payment_nd3k2kacrqjli8482ave" \
-H "Authorization: Bearer ${INCREASE_API_KEY}"import Increase from 'increase';
const client = new Increase({
apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const cardPurchaseSupplement of client.cardPurchaseSupplements.list()) {
console.log(cardPurchaseSupplement.id);
}import os
from increase import Increase
client = Increase(
api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted
)
page = client.card_purchase_supplements.list()
page = page.data[0]
print(page.id)require "increase"
increase = Increase::Client.new(
api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)
page = increase.card_purchase_supplements.list
puts(page)package main
import (
"context"
"fmt"
"os"
"github.com/Increase/increase-go"
"github.com/Increase/increase-go/option"
)
func main() {
client := increase.NewClient(
option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
)
page, err := client.CardPurchaseSupplements.List(context.TODO(), increase.CardPurchaseSupplementListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.increase.api.example;
import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPage;
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
IncreaseClient client = IncreaseOkHttpClient.fromEnv();
CardPurchaseSupplementListPage page = client.cardPurchaseSupplements().list();
}
}package com.increase.api.example
import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPage
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams
fun main() {
val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()
val page: CardPurchaseSupplementListPage = client.cardPurchaseSupplements().list()
}<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Increase\Client;
use Increase\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('INCREASE_API_KEY'));
try {
$page = $client->cardPurchaseSupplements->list(
cardPaymentID: 'card_payment_id',
createdAt: [
'after' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
'before' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
'onOrAfter' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
'onOrBefore' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
],
cursor: 'cursor',
limit: 1,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using Increase.Api;
using Increase.Api.Models.CardPurchaseSupplements;
IncreaseClient client = new();
CardPurchaseSupplementListParams parameters = new();
var page = await client.CardPurchaseSupplements.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}{
"data": [
{ /* Card Purchase Supplement object */ },
{ /* Card Purchase Supplement object */ }
/* ... */
],
"next_cursor": "v57w5d",
}Filter Card Purchase Supplements to ones belonging to the specified Card Payment.
curl \
--url "${INCREASE_URL}/card_purchase_supplements/card_purchase_supplement_ijuc45iym4jchnh2sfk3" \
-H "Authorization: Bearer ${INCREASE_API_KEY}"import Increase from 'increase';
const client = new Increase({
apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});
const cardPurchaseSupplement = await client.cardPurchaseSupplements.retrieve(
'card_purchase_supplement_ijuc45iym4jchnh2sfk3',
);
console.log(cardPurchaseSupplement.id);import os
from increase import Increase
client = Increase(
api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted
)
card_purchase_supplement = client.card_purchase_supplements.retrieve(
"card_purchase_supplement_ijuc45iym4jchnh2sfk3",
)
print(card_purchase_supplement.id)require "increase"
increase = Increase::Client.new(
api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)
card_purchase_supplement = increase.card_purchase_supplements.retrieve("card_purchase_supplement_ijuc45iym4jchnh2sfk3")
puts(card_purchase_supplement)package main
import (
"context"
"fmt"
"os"
"github.com/Increase/increase-go"
"github.com/Increase/increase-go/option"
)
func main() {
client := increase.NewClient(
option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
)
cardPurchaseSupplement, err := client.CardPurchaseSupplements.Get(context.TODO(), "card_purchase_supplement_ijuc45iym4jchnh2sfk3")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", cardPurchaseSupplement.ID)
}
package com.increase.api.example;
import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement;
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
IncreaseClient client = IncreaseOkHttpClient.fromEnv();
CardPurchaseSupplement cardPurchaseSupplement = client.cardPurchaseSupplements().retrieve("card_purchase_supplement_ijuc45iym4jchnh2sfk3");
}
}package com.increase.api.example
import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementRetrieveParams
fun main() {
val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()
val cardPurchaseSupplement: CardPurchaseSupplement = client.cardPurchaseSupplements().retrieve("card_purchase_supplement_ijuc45iym4jchnh2sfk3")
}<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Increase\Client;
use Increase\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('INCREASE_API_KEY'));
try {
$cardPurchaseSupplement = $client->cardPurchaseSupplements->retrieve(
'card_purchase_supplement_ijuc45iym4jchnh2sfk3'
);
var_dump($cardPurchaseSupplement);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using Increase.Api;
using Increase.Api.Models.CardPurchaseSupplements;
IncreaseClient client = new();
CardPurchaseSupplementRetrieveParams parameters = new()
{
CardPurchaseSupplementID = "card_purchase_supplement_ijuc45iym4jchnh2sfk3"
};
var cardPurchaseSupplement = await client.CardPurchaseSupplements.Retrieve(parameters);
Console.WriteLine(cardPurchaseSupplement);The identifier of the Card Purchase Supplement.
Simulates the creation of a Card Purchase Supplement (Level 3 data) for a card settlement. This happens asynchronously in production when Visa sends enhanced transaction data about a purchase.
curl -X "POST" \
--url "${INCREASE_URL}/simulations/card_purchase_supplements" \
-H "Authorization: Bearer ${INCREASE_API_KEY}" \
-H "Content-Type: application/json" \
-d $'{
"invoice": {
"discount_amount": 100,
"duty_tax_amount": 200,
"order_date": "2023-07-20",
"shipping_amount": 300,
"shipping_destination_country_code": "US",
"shipping_destination_postal_code": "10045",
"shipping_source_postal_code": "10045",
"shipping_tax_amount": 400,
"shipping_tax_rate": "0.2",
"unique_value_added_tax_invoice_reference": "12302"
},
"line_items": [
{
"item_commodity_code": "001",
"item_descriptor": "Coffee",
"item_quantity": "1",
"product_code": "101",
"total_amount": 500,
"unit_cost": "5",
"unit_of_measure_code": "NMB"
}
],
"transaction_id": "transaction_uyrp7fld2ium70oa7oi"
}'import Increase from 'increase';
const client = new Increase({
apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});
const cardPurchaseSupplement = await client.simulations.cardPurchaseSupplements.create({
transaction_id: 'transaction_uyrp7fld2ium70oa7oi',
});
console.log(cardPurchaseSupplement.id);import os
from increase import Increase
client = Increase(
api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted
)
card_purchase_supplement = client.simulations.card_purchase_supplements.create(
transaction_id="transaction_uyrp7fld2ium70oa7oi",
)
print(card_purchase_supplement.id)require "increase"
increase = Increase::Client.new(
api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)
card_purchase_supplement = increase.simulations.card_purchase_supplements.create(transaction_id: "transaction_uyrp7fld2ium70oa7oi")
puts(card_purchase_supplement)package main
import (
"context"
"fmt"
"os"
"github.com/Increase/increase-go"
"github.com/Increase/increase-go/option"
)
func main() {
client := increase.NewClient(
option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
)
cardPurchaseSupplement, err := client.Simulations.CardPurchaseSupplements.New(context.TODO(), increase.SimulationCardPurchaseSupplementNewParams{
TransactionID: increase.F("transaction_uyrp7fld2ium70oa7oi"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", cardPurchaseSupplement.ID)
}
package com.increase.api.example;
import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement;
import com.increase.api.models.simulations.cardpurchasesupplements.CardPurchaseSupplementCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
IncreaseClient client = IncreaseOkHttpClient.fromEnv();
CardPurchaseSupplementCreateParams params = CardPurchaseSupplementCreateParams.builder()
.transactionId("transaction_uyrp7fld2ium70oa7oi")
.build();
CardPurchaseSupplement cardPurchaseSupplement = client.simulations().cardPurchaseSupplements().create(params);
}
}package com.increase.api.example
import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement
import com.increase.api.models.simulations.cardpurchasesupplements.CardPurchaseSupplementCreateParams
fun main() {
val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()
val params: CardPurchaseSupplementCreateParams = CardPurchaseSupplementCreateParams.builder()
.transactionId("transaction_uyrp7fld2ium70oa7oi")
.build()
val cardPurchaseSupplement: CardPurchaseSupplement = client.simulations().cardPurchaseSupplements().create(params)
}<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Increase\Client;
use Increase\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('INCREASE_API_KEY'));
try {
$cardPurchaseSupplement = $client
->simulations
->cardPurchaseSupplements
->create(
transactionID: 'transaction_uyrp7fld2ium70oa7oi',
invoice: [
'discountAmount' => 100,
'dutyTaxAmount' => 200,
'orderDate' => '2023-07-20',
'shippingAmount' => 300,
'shippingDestinationCountryCode' => 'US',
'shippingDestinationPostalCode' => '10045',
'shippingSourcePostalCode' => '10045',
'shippingTaxAmount' => 400,
'shippingTaxRate' => '0.2',
'uniqueValueAddedTaxInvoiceReference' => '12302',
],
lineItems: [
[
'discountAmount' => 0,
'itemCommodityCode' => '001',
'itemDescriptor' => 'Coffee',
'itemQuantity' => '1',
'productCode' => '101',
'salesTaxAmount' => 0,
'salesTaxRate' => '-16699',
'totalAmount' => 500,
'unitCost' => '5',
'unitOfMeasureCode' => 'NMB',
],
],
);
var_dump($cardPurchaseSupplement);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using Increase.Api;
using Increase.Api.Models.Simulations.CardPurchaseSupplements;
IncreaseClient client = new();
CardPurchaseSupplementCreateParams parameters = new()
{
TransactionID = "transaction_uyrp7fld2ium70oa7oi"
};
var cardPurchaseSupplement = await client.Simulations.CardPurchaseSupplements.Create(parameters);
Console.WriteLine(cardPurchaseSupplement);Invoice-level information about the payment.
Line item information, such as individual products purchased.
The identifier of the Transaction to create a Card Purchase Supplement for. The Transaction must have a source of type card_settlement.