Aller au contenu principal

Saved Payment Methods

Allow customers to save their payment methods for faster future checkouts.

Attach a Payment Method to a Customer

curl -X POST https://api.ikawaari.com/v1/payment-methods/pm_abc123/attach \
-H "Authorization: Bearer ik_test_your_key" \
-H "Content-Type: application/json" \
-d '{ "customer": "cus_xyz789" }'

List Saved Payment Methods

curl "https://api.ikawaari.com/v1/customers/cus_xyz789/payment-methods?type=mobile_money" \
-H "Authorization: Bearer ik_test_your_key"

Charge a Saved Payment Method

curl -X POST https://api.ikawaari.com/v1/payment-intents \
-H "Authorization: Bearer ik_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "XOF",
"customer": "cus_xyz789",
"payment_method": "pm_abc123",
"confirm": true
}'

Detach a Payment Method

curl -X POST https://api.ikawaari.com/v1/payment-methods/pm_abc123/detach \
-H "Authorization: Bearer ik_test_your_key"