Make a sale with a saved payment method

Learn how to make a sale transaction via the API with a customer's saved payment method
View as MarkdownOpen in Claude
Applies to:Developers

You can make a sale transaction with a customer’s saved payment method, sometimes referred to as card-on-file or a payment token.

Pass the saved method’s token in as storedMethodId when authorizing or making a sale transaction.

POST
/api/MoneyIn/getpaid
1from payabli import (
2 PaymentDetail,
3 PayMethodStoredMethod,
4 PayorDataRequest,
5 payabli,
6)
7
8client = payabli(
9 api_key="YOUR_API_KEY",
10)
11client.money_in.getpaid(
12 customer_data=PayorDataRequest(
13 customer_id=4440,
14 ),
15 entry_point="f743aed24a",
16 ipaddress="255.255.255.255",
17 payment_details=PaymentDetail(
18 service_fee=0.0,
19 total_amount=100.0,
20 ),
21 payment_method=PayMethodStoredMethod(
22 initiator="payor",
23 method="card",
24 stored_method_id="1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440",
25 stored_method_usage_type="unscheduled",
26 ),
27)

See these related resources to help you get the most out of Payabli.