curl --request POST \
--url https://developersandbox-api.flutterwave.com/payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "card",
"card": {
"nonce": "<string>",
"encrypted_expiry_month": "sQpvQEb7GrUCjPuEN/NmHiPl",
"encrypted_expiry_year": "sgHNEDkJ/RmwuWWq/RymToU5",
"encrypted_card_number": "sAE3hEDaDQ+yLzo4Py+Lx15OZjBGduHu/DcdILh3En0=",
"encrypted_cvv": "tAUzH7Qjma7diGdi7938F/ESNA==",
"billing_address": {
"city": "New York",
"country": "US",
"line1": "123 Main Street",
"postal_code": "10001",
"state": "New York",
"line2": "Apt 4B"
},
"cof": {
"enabled": true,
"agreement_id": "Agreement00w02W1",
"trace_id": "123456789"
},
"card_holder_name": "Alex James"
},
"customer_id": "cus_3XarBILKQS",
"meta": {}
}
'{
"status": "success",
"message": "<string>",
"data": {
"id": "pmd_WRq7L4TM8p",
"type": "card",
"card": {
"expiry_month": "09",
"expiry_year": "32",
"first6": "123412",
"last4": "1234",
"network": "MASTERCARD",
"billing_address": {
"city": "New York",
"country": "US",
"line1": "123 Main Street",
"postal_code": "10001",
"state": "New York",
"line2": "Apt 4B"
},
"cof": {
"enabled": true,
"agreement_id": "Agreement00w02W1",
"recurring_amount_variability": "VARIABLE",
"agreement_type": "UNSCHEDULED",
"trace_id": "123456789"
},
"card_holder_name": "Alex James"
},
"customer_id": "cus_3XarBILKQS",
"meta": {},
"device_fingerprint": "62wd23423rq324323qew1",
"client_ip": "154.123.220.1",
"created_datetime": "2024-12-03T13:54:21.546559974Z"
}
}Create a payment method
curl --request POST \
--url https://developersandbox-api.flutterwave.com/payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "card",
"card": {
"nonce": "<string>",
"encrypted_expiry_month": "sQpvQEb7GrUCjPuEN/NmHiPl",
"encrypted_expiry_year": "sgHNEDkJ/RmwuWWq/RymToU5",
"encrypted_card_number": "sAE3hEDaDQ+yLzo4Py+Lx15OZjBGduHu/DcdILh3En0=",
"encrypted_cvv": "tAUzH7Qjma7diGdi7938F/ESNA==",
"billing_address": {
"city": "New York",
"country": "US",
"line1": "123 Main Street",
"postal_code": "10001",
"state": "New York",
"line2": "Apt 4B"
},
"cof": {
"enabled": true,
"agreement_id": "Agreement00w02W1",
"trace_id": "123456789"
},
"card_holder_name": "Alex James"
},
"customer_id": "cus_3XarBILKQS",
"meta": {}
}
'{
"status": "success",
"message": "<string>",
"data": {
"id": "pmd_WRq7L4TM8p",
"type": "card",
"card": {
"expiry_month": "09",
"expiry_year": "32",
"first6": "123412",
"last4": "1234",
"network": "MASTERCARD",
"billing_address": {
"city": "New York",
"country": "US",
"line1": "123 Main Street",
"postal_code": "10001",
"state": "New York",
"line2": "Apt 4B"
},
"cof": {
"enabled": true,
"agreement_id": "Agreement00w02W1",
"recurring_amount_variability": "VARIABLE",
"agreement_type": "UNSCHEDULED",
"trace_id": "123456789"
},
"card_holder_name": "Alex James"
},
"customer_id": "cus_3XarBILKQS",
"meta": {},
"device_fingerprint": "62wd23423rq324323qew1",
"client_ip": "154.123.220.1",
"created_datetime": "2024-12-03T13:54:21.546559974Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A unique identifier to track this operation. It must be between 12 and 255 characters in length.
12 - 255A unique identifier to prevent duplicate requests. It must be between 12 and 255 characters in length.
12 - 255Was this page helpful?