At BlueSnap, we look at payments a little differently. Our Payment Orchestration Platform helps businesses accept payments globally and is designed to increase revenue and reduces costs. We provide a comprehensive back-end solutions that simplifies the complexity of payments, managing the full process from start to finish.
BlueSnap supports payments through multiple sales channels such as online and mobile sales, marketplaces, subscriptions, invoice payments and manual orders through a virtual terminal. And for businesses looking for embedded payments, we offer white-labeled payments for platforms with automated underwriting and onboarding that supports marketplaces and split payments.
And with one integration and contract, businesses can sell in over 200 geographies with access to local acquiring in 47 countries, 110+ currencies and 100+ global payment types, including popular eWallets, automated accounts receivable, world-class fraud protection and chargeback management, built-in solutions for regulation and tax compliance, and unified global reporting to help businesses grow.
With a US headquarters in Waltham, MA, and EU headquarters in Dublin, Ireland, BlueSnap is backed by world-class private equity investors including Great Hill Partners and Parthenon Capital Partners.
Learn more at BlueSnap.com
- Requirements
- Installation
- Getting Started
- Async
- Raw HTTP Response
- Reference
bluesnap.agreement.create_debit_for_aus_can
bluesnap.agreement.get_debit
bluesnap.authorization.create_transaction
bluesnap.plan.create_recurring_plan
bluesnap.plan.get_all
bluesnap.plan.get_specific
bluesnap.plan.update_recurring_plan
bluesnap.reversal.auth_transaction
bluesnap.shopper.create_vaulted_shopper
bluesnap.shopper.delete_vaulted_shopper
bluesnap.shopper.get
bluesnap.shopper.update_vaulted_shopper
bluesnap.subscription.create_merchant_managed_charge
bluesnap.subscription.create_merchant_managed_subscription
bluesnap.subscription.create_new
bluesnap.subscription.get_specific
bluesnap.subscription.get_switch_charge_amount
bluesnap.subscription.list_all_subscriptions
bluesnap.subscription.list_charges
bluesnap.subscription.update_subscription
bluesnap.transaction.approve_merchant_transaction
bluesnap.transaction.cancel_pending_refund
bluesnap.transaction.create_batch_transaction
bluesnap.transaction.create_sofort_transaction
bluesnap.transaction.get_batch_transaction
bluesnap.transaction.get_by_id
bluesnap.transaction.get_paypal_transaction
bluesnap.transaction.get_pre_notification_debit_agreement
bluesnap.transaction.get_sepa_dd
bluesnap.transaction.get_sofort_transaction
bluesnap.transaction.initiate_refund
bluesnap.transaction.update_paypal_transaction
bluesnap.vendor.create
bluesnap.vendor.get_all_vendors
bluesnap.vendor.get_vendor
bluesnap.vendor.update_vendor
Python >=3.7
from pprint import pprint
from blue_snap_python_sdk import BlueSnap, ApiException
bluesnap = BlueSnap(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
sec1="YOUR_API_KEY",
)
try:
# Create Debit Agreement
bluesnap.agreement.create_debit_for_aus_can(
region="ca",
type="onetime",
planid="string_example",
overriderecurringchargeamount="string_example",
)
except ApiException as e:
print("Exception when calling AgreementApi.create_debit_for_aus_can: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
async
support is available by prepending a
to any method.
import asyncio
from pprint import pprint
from blue_snap_python_sdk import BlueSnap, ApiException
bluesnap = BlueSnap(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
sec1="YOUR_API_KEY",
)
async def main():
try:
# Create Debit Agreement
await bluesnap.agreement.acreate_debit_for_aus_can(
region="ca",
type="onetime",
planid="string_example",
overriderecurringchargeamount="string_example",
)
except ApiException as e:
print("Exception when calling AgreementApi.create_debit_for_aus_can: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
asyncio.run(main())
To access raw HTTP response values, use the .raw
namespace.
from pprint import pprint
from blue_snap_python_sdk import BlueSnap, ApiException
bluesnap = BlueSnap(
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
sec1="YOUR_API_KEY",
)
try:
# Create Debit Agreement
create_debit_for_aus_can_response = bluesnap.agreement.raw.create_debit_for_aus_can(
region="ca",
type="onetime",
planid="string_example",
overriderecurringchargeamount="string_example",
)
pprint(create_debit_for_aus_can_response.headers)
pprint(create_debit_for_aus_can_response.status)
pprint(create_debit_for_aus_can_response.round_trip_time)
except ApiException as e:
print("Exception when calling AgreementApi.create_debit_for_aus_can: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
for Australia and Canada
bluesnap.agreement.create_debit_for_aus_can(
region="ca",
type="onetime",
planid="string_example",
overriderecurringchargeamount="string_example",
)
Represents the country. Possible Values: au
, ca
Represents the mandate type. Possible Values: onetime
,recurring
, ondemand
SKU number
the amount which overrides recurring charge
/agreements/debit/{region}/{type}
post
for Australia and Canada
bluesnap.agreement.get_debit(
agreement_id="1065",
)
Argument included in the response for the Create Debit Agreement request
/agreements/{agreementId}
get
Auth Only
bluesnap.authorization.create_transaction(
amount=11,
soft_descriptor="DescTest",
card_holder_info={
"first_name": "test first name",
"last_name": "test last name",
"zip": "02453",
},
currency="USD",
credit_card={
"expiration_year": 2026,
"security_code": 837,
"expiration_month": "02",
"card_number": "4263982640269299",
},
card_transaction_type="AUTH_ONLY",
)
card_holder_info: AuthorizationCreateTransactionRequestCardHolderInfo
credit_card: AuthorizationCreateTransactionRequestCreditCard
AuthorizationCreateTransactionRequest
/transactions
post
Create Plan
bluesnap.plan.create_recurring_plan(
charge_frequency="MONTHLY",
grace_period_days=10,
trial_period_days=14,
initial_charge_amount=100,
name="Gold Plan",
currency="USD",
max_number_of_charges=12,
recurring_charge_amount=29.99,
charge_on_plan_switch=True,
)
PlanCreateRecurringPlanRequest
/recurring/plans
post
Retrieve All Plans
bluesnap.plan.get_all(
pagesize="5",
after="2185254",
gettotal=True,
fulldescription=False,
)
/recurring/plans?{parameters}
get
Retrieve Specific Plan
bluesnap.plan.get_specific(
plan_id=2283845,
)
BlueSnap identifier for the plan.
/recurring/plans/{planId}
get
Update Plan
bluesnap.plan.update_recurring_plan(
plan_id=2111111,
charge_frequency="MONTHLY",
trial_period_days="7",
initial_charge_amount="30",
name="Gold Plan",
currency="USD",
recurring_charge_amount="19",
)
BlueSnap identifier for the plan.
PlanUpdateRecurringPlanRequest
/recurring/plans/{planId}
put
Auth Reversal
bluesnap.reversal.auth_transaction(
card_transaction_type="AUTH_REVERSAL",
transaction_id=1011671987,
)
ReversalAuthTransactionRequest
/transactions
put
Create Vaulted Shopper
bluesnap.shopper.create_vaulted_shopper(
payment_sources={},
first_name="FirstName",
last_name="LastName",
)
payment_sources: ShopperCreateVaultedShopperRequestPaymentSources
ShopperCreateVaultedShopperRequest
/vaulted-shoppers
post
Delete Vaulted Shopper
bluesnap.shopper.delete_vaulted_shopper(
vaulted_shopper_id="20769005",
)
vaultedShopperId received from BlueSnap
/vaulted-shoppers/{vaultedShopperId}
delete
Retrieve Vaulted Shopper
bluesnap.shopper.get(
vaulted_shopper_id="20769005",
)
vaultedShopperId received from BlueSnap
/vaulted-shoppers/{vaultedShopperId}
get
Update Vaulted Shopper
bluesnap.shopper.update_vaulted_shopper(
vaulted_shopper_id="40444721",
payment_sources={},
first_name="FirstName",
last_name="LastName",
)
vaultedShopperId received from BlueSnap
payment_sources: ShopperUpdateVaultedShopperRequestPaymentSources
ShopperUpdateVaultedShopperRequest
/vaulted-shoppers/{vaultedShopperId}
put
Create Merchant-Managed Subscription Charge
bluesnap.subscription.create_merchant_managed_charge(
subscription_id=10543419,
amount=45,
currency="USD",
merchant_transaction_id="MyUniqueOnDemandSubscription",
tax_reference="048deff0-a285-47e1-bc39-42f79bf0095b",
)
BlueSnap identifier for the subscription.
SubscriptionCreateMerchantManagedChargeRequest
/recurring/ondemand/{subscriptionId}
post
Create Merchant-Managed Subscription
bluesnap.subscription.create_merchant_managed_subscription(
amount=45,
currency="USD",
payer_info={
"first_name": "John",
"last_name": "Doe",
"zip": "02453",
"country": "us",
},
payment_source={},
)
SubscriptionCreateMerchantManagedSubscriptionRequest
/recurring/ondemand
post
Create Subscription
bluesnap.subscription.create_new(
payer_info={
"zip": "02453",
"first_name": "John",
"last_name": "Doe",
"phone": "1234567890",
},
payment_source={},
plan_id=2283845,
)
payer_info: SubscriptionCreateNewRequestPayerInfo
payment_source: SubscriptionCreateNewRequestPaymentSource
/recurring/subscriptions
post
Retrieve Specific Subscription
bluesnap.subscription.get_specific(
subscription_id=8491535,
)
BlueSnap identifier for the subscription.
/recurring/subscriptions/{subscriptionId}
get
Retrieve Subscription Switch Charge Amount
bluesnap.subscription.get_switch_charge_amount(
newplanid="111111",
newquantity="2",
)
/recurring/subscriptions/:subscriptionId/switch-charge-amount
get
Retrieve All Subscriptions
bluesnap.subscription.list_all_subscriptions(
pagesize="5",
after="34567",
gettotal=True,
fulldescription=False,
)
/recurring/subscriptions?{parameters}
get
Retrieve All Charges for a Subscription
bluesnap.subscription.list_charges(
pagesize="3",
after="163193",
fulldescription=False,
)
/:subscriptionId/charges?{parameters}
get
Update Subscription
bluesnap.subscription.update_subscription(
subscription_id=8491543,
plan_id="2283849",
)
BlueSnap identifier for the subscription.
SubscriptionUpdateSubscriptionRequest
/recurring/subscriptions/{subscriptionId}
put
Merchant Approve Transaction
bluesnap.transaction.approve_merchant_transaction(
transactionid="38612140",
approvetransaction=True,
)
either transactionid
or merchanttransactionid
is required
ID of the transaction to be approved/declined
Set to true
to approve the transaction or to false
to decline the transaction. Default value is true
.
/transactions/approval
put
Cancel Pending Refund
bluesnap.transaction.cancel_pending_refund(
transaction_id="1109144995",
)
transactionId received from BlueSnap
/transactions/pending-refund/{transactionId}
delete
Create Batch Transaction
bluesnap.transaction.create_batch_transaction(
batch_transaction={
"batch_id": "567890",
"callback_url": "http://example.com/batch_callback",
},
)
batch_transaction: TransactionCreateBatchTransactionRequestBatchTransaction
TransactionCreateBatchTransactionRequest
/batch-transactions
post
Create Sofort Transaction
bluesnap.transaction.create_sofort_transaction(
ecp_transaction={
"routing_number": "011075150",
"account_type": "CONSUMER_CHECKING",
"account_number": 4099999992,
},
amount=42,
payer_info={
"zip": "12345",
"first_name": "John",
"last_name": "Doe",
"phone": "1234567890",
"country": "uk",
},
soft_descriptor="ABC COMPANY",
currency="GBP",
authorized_by_shopper=True,
becs_direct_debit_transaction={
"bsb_number": "980201",
"account_number": "9990000001",
"account_name": "Boris Britva",
"financial_institution": "financialInstitution",
"branch_name": "branchName",
"agreement_id": 81,
},
ideal_transaction={
"return_url": "http://www.returnURL.com",
},
local_bank_transfer_transaction={},
paypal_transaction={
"cancel_url": "http://www.cancelURL.com",
"return_url": "http://www.returnURL.com",
"transaction_type": "SET_ORDER",
},
acss_direct_debit_transaction={
"routing_number": "001004820",
"account_number": "9990000001",
"account_type": "PERSONAL",
"agreement_id": 87,
},
sepa_direct_debit_transaction={
"iban": "DE09100100101234567893",
},
sofort_transaction={
"return_url": "http://www.returnURL.com",
},
)
ecp_transaction: TransactionCreateSofortTransactionRequestEcpTransaction
becs_direct_debit_transaction: TransactionCreateSofortTransactionRequestBecsDirectDebitTransaction
ideal_transaction: TransactionCreateSofortTransactionRequestIdealTransaction
local_bank_transfer_transaction: TransactionCreateSofortTransactionRequestLocalBankTransferTransaction
paypal_transaction: TransactionCreateSofortTransactionRequestPaypalTransaction
acss_direct_debit_transaction: TransactionCreateSofortTransactionRequestAcssDirectDebitTransaction
sepa_direct_debit_transaction: TransactionCreateSofortTransactionRequestSepaDirectDebitTransaction
sofort_transaction: TransactionCreateSofortTransactionRequestSofortTransaction
TransactionCreateSofortTransactionRequest
/alt-transactions
post
Retrieve Batch Transaction
bluesnap.transaction.get_batch_transaction(
batch_id="567890",
)
batch ID sent in the Create Batch Transaction request
/batch-transactions/{batchId}
get
Retrieve
bluesnap.transaction.get_by_id(
transaction_id="1011582369",
)
transaction ID received in the response from BlueSnap
/transactions/{transactionId}
get
Retrieve PayPal Transaction
bluesnap.transaction.get_paypal_transaction(
order_id="5666625",
)
order ID received in the response
/alt-transactions/resolve?orderId={orderId}
get
for Australia and Canada
bluesnap.transaction.get_pre_notification_debit_agreement(
transaction_id="38943468",
)
Argument included in the response for the Create Debit Agreement request
/agreements/prenotification/{transactionId}
get
Retrieve SEPA DD Transaction
bluesnap.transaction.get_sepa_dd(
transaction_id="1014672453",
)
transaction ID received in the response from BlueSnap
/alt-transactions/{transactionId}
get
Retrieve Sofort Transaction
bluesnap.transaction.get_sofort_transaction(
order_id=20922493,
)
Order ID received in the Create Sofort Transaction response from BlueSnap
/alt-transactions/resolve
get
Refund
bluesnap.transaction.initiate_refund(
transaction_id="1095710747",
reason="Refund for order #1992",
cancel_subscriptions=False,
transaction_meta_data={},
)
ID of the transaction to be refunded
Required if not using merchantTransactionId
transaction_meta_data: TransactionInitiateRefundRequestTransactionMetaData
TransactionInitiateRefundRequest
/transactions/refund/{transactionId}
post
Update PayPal Transaction
bluesnap.transaction.update_paypal_transaction(
amount=105,
currency="USD",
paypal_transaction={
"order_id": "7078033",
"transaction_type": "DO_ORDER",
},
)
paypal_transaction: TransactionUpdatePaypalTransactionRequestPaypalTransaction
TransactionUpdatePaypalTransactionRequest
/alt-transactions
put
Create Vendor
bluesnap.vendor.create(
email="vendor@example.com",
first_name="Joe",
last_name="Smith",
phone="1-123-456-7890",
address="123 Main Street",
city="Boston",
country="US",
state="MA",
zip="02453",
default_payout_currency="USD",
ipn_url="https://ipnaddress.com",
vendor_principal={
"first_name": "Joe",
"last_name": "Smith",
"address": "123 Main Street",
"city": "Boston",
"country": "US",
"zip": "02453",
"dob": "28-09-9999",
"personal_identification_number": "1234",
"driver_license_number": "561196411",
"email": "individual.vendor@bluesnap.com",
},
vendor_agreement={
"commission_percent": 30,
},
payout_info={},
)
vendor_principal: VendorCreateRequestVendorPrincipal
vendor_agreement: VendorCreateRequestVendorAgreement
/vendors
post
Retrieve All Vendors
bluesnap.vendor.get_all_vendors(
gettotal=True,
)
/vendors?{parameters}
get
Retrieve Vendor
bluesnap.vendor.get_vendor(
vendor_id=837389,
)
BlueSnap identifier for the vendor
/vendors/{vendorId}
get
Update Vendor
bluesnap.vendor.update_vendor(
vendor_id=1,
email="vendor@bluesnap.com",
name="Important Vendor",
first_name="Joe",
last_name="Smith",
address="123 Main Street",
city="testing city",
zip="02453",
country="US",
phone="1-054-976-6778",
state="MA",
tax_id=123456789,
vendor_url="http://mycompany.com",
ipn_url="https://ipnaddress.com",
default_payout_currency="USD",
vendor_principal={
"first_name": "Joe",
"last_name": "Smith",
"address": "123 Main Street",
"city": "Juneau",
"zip": "02453",
"country": "US",
"dob": "28-09-9999",
"personal_identification_number": 1234,
"driver_license_number": "561196411",
"email": "principal.name@vendor.com",
},
payout_info=[
{
"payout_type": "ACH",
"base_currency": "USD",
"name_on_account": "vendor",
"bank_account_class": "PERSONAL",
"bank_account_type": "CHECKING",
"bank_name": "Leumi",
"bank_id": "123456789",
"country": "US",
"city": "Portland",
"address": "1 bank address",
"state": "MA",
"zip": "02453",
"bank_account_id": "123456789",
"minimal_payout_amount": 50,
"payment_reference": "Payment for vendor 1234",
"refund_reserve": 200,
}
],
vendor_agreement={
"commission_percent": 20,
"account_status": "ACTIVE",
},
)
BlueSnap identifier for the vendor
vendor_principal: VendorUpdateVendorRequestVendorPrincipal
payout_info: VendorUpdateVendorRequestPayoutInfo
vendor_agreement: VendorUpdateVendorRequestVendorAgreement
/vendors/{vendorId}
put
This Python package is automatically generated by Konfig