Skip to main content

Guides

This is a collection of some of the most common use cases for payFURL. If you're looking to get started, this is the place to come.

Accepting a payment with a card

curl -d '{"Amount":"20", "ProviderId":"a26c371f94f640daadd228ec8e9da8ed", "PaymentInformation" : {"CardNumber" : "4111111111111111", "ExpiryDate" : "12/22", "Ccv" : "123"}}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/card

For all parameters to the API, see Create Charge

Accepting a payment with a token

First, use the Client SDK to securely convert the payment details to a payment token. You can then use that token to accept a payment.

curl -d '{"Amount":"20", "Token":"5db53c06443c8f28c0cba6e5"}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/token

For all parameters to the API, see Create Charge with a Token

Accepting a payment with a bank account

curl -d '{"Amount":"20", "ProviderId":"a26c371f94f640daadd228ec8e9da8ed", "BankPaymentInformation" : {"BankCode" : "012-003", "AccountNumber" : "11111", "AccountName" : "Bank Account"}}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/bank_account

For all parameters to the API, see Create Charge with a bank account

Creating a Customer

If you want to accept payments for the same payment details more than once, it's best to create a customer.

First, use the Client SDK to securely convert the payment details to a payment token. You can then use that token to create a customer:

curl -d '{"FirstName":"John", "LastName":"Doe", "Reference":"123", "Token":"5db53c06443c8f28c0cba6e5"}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/customer/token

For all parameters to the API, see Create Customer

Accepting a Payment for a Customer

If you already have a customer, you can use that customer to accept a payment for that customer.

curl -d '{"Amount":"20", "ProviderId":"7eeeb601-2992-486d-8dc9-f788eef26f95", "CustomerId":"95af2d87-36a6-499d-87c8-e887a3498f1e"}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/customer

For all parameters to the API, see Create a Charge for a Customer

Creating a Payment Method

If you want to accept payments for the same payment details more than once but do not want to create a customer, you can create a payment method.

curl -d '{"ProviderId":"a26c371f94f640daadd228ec8e9da8ed", "PaymentInformation" : {"CardNumber" : "4111111111111111", "ExpiryDate" : "12/22", "Ccv" : "123"}}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/payment_method/card

For all parameters to the API, see Create Payment Method

Creating a Payment Method with a token

If you want to accept payments for the same payment details more than once but do not want to create a customer, you can create a payment method with a token.

curl -d '{"Token" : "dc16e22be13246809c9f05c1a4bf92fa"}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/payment_method/token

For all parameters to the API, see Create Payment Method With A Token

Accepting a payment for a Payment Method

If you already have a payment method, you can use that payment method to accept a payment for that payment method.

curl -d '{"Amount":"20", "PaymentMethodId":"154d5c8940db4d76ba9334fb44241aa4", "Currency":"AUD"}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/payment_method

For all parameters to the API, see Create a Charge for a Payment Method

Refund

If payment status is SUCCESS or PARTIAL_REFUND you can refund this payment by using the Refund method.

curl --location --request DELETE 'https://sandbox-api.payfurl.com/refund/b59efd7afd9949fbb1d5aed4cf83aedb' \
-H 'x-secretkey: <secret_key>' \
-H 'Content-Type: application/json'

Authorise & Capture

Any payment request could have a Capture parameter (by default Capture = true) and you can decide whether you want to have payment captured immediately or not. If payment was created with Capture = false it means that status of this payment is Authorised. You can complete this payment by using the Capture method.

curl -d '{"Amount":"20", "Currency" : "USD", "CustomerId":"95af2d87-36a6-499d-87c8-e887a3498f1e", "Capture": false}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/customer

curl --location --request POST 'https://sandbox-api.payfurl.com/charge/b59efd7afd9949fbb1d5aed4cf83aedb' \
-H 'x-secretkey: <secret_key>' \
-H 'Content-Type: application/json' \
-d '{
"Amount": 20
}'

Void

If status of payment is Authorised you can cancel it by the Void method.

curl -d '{"Amount":"20", "Currency" : "USD", "CustomerId":"95af2d87-36a6-499d-87c8-e887a3498f1e", "Capture": false}' \
-H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X POST https://sandbox-api.payfurl.com/charge/customer

curl --location --request DELETE 'https://sandbox-api.payfurl.com/charge/b59efd7afd9949fbb1d5aed4cf83aedb/void' \
-H 'x-secretkey: <secret_key>' \
-H 'Content-Type: application/json'

Search for Transactions

You may want to check whether a transaction has succeeded or search for past transactions for a customer.

curl -H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X GET https://sandbox-api.payfurl.com/charge?reference=123

For all parameters to the API, see Search for Transactions

Search for Customers

You may want to search for a specific customer based on email address or name.

curl -H "Content-Type: application/json" \
-H "x-secretkey: <secret_key>" \
-X GET https://sandbox-api.payfurl.com/customer?email=john.doe@gmail.com

For all parameters to the API, see Search for Customers