Create Sale

Combines both the create authorization and capture authorization API calls into one.

attention

This API is available for Finix Flex and Finix Core customers.

A Transfer representing a customer payment where funds are obtained from a payment card. These specific Transfers are distinguished by their type which return DEBIT.

Learn how to prevent duplicate transfers by passing an idempotency ID in the payload.

Copy
Copied
curl https://finix.sandbox-payments-api.com/transfers \
    -H "Content-Type: application/vnd.json+api" \
    -u  USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
    -d '
	{
	    "merchant": "MUeDVrf2ahuKc9Eg5TeZugvs",
	    "currency": "USD",
	    "amount": 662154,
	    "source": "PIe2YvpcjvoVJ6PzoRPBK137",
	    "tags": {
	        "test": "sale"
	    }
	}'

Example Response:

Copy
Copied
{
  "id" : "TRvypRNBeqM597Zi4DcqJ2Vh",
  "amount" : 662154,
  "tags" : {
    "test" : "sale"
  },
  "state" : "PENDING",
  "trace_id" : "61646f46-f3fb-4fba-baae-a875a8bdce72",
  "currency" : "USD",
  "application" : "APgPDQrLD52TYvqazjHJJchM",
  "source" : "PIe2YvpcjvoVJ6PzoRPBK137",
  "destination" : null,
  "ready_to_settle_at" : null,
  "externally_funded" : "UNKNOWN",
  "fee" : 0,
  "statement_descriptor" : "FNX*DUNDER MIFFLIN",
  "type" : "DEBIT",
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2022-01-27T07:37:09.71Z",
  "updated_at" : "2022-01-27T07:37:10.01Z",
  "idempotency_id" : null,
  "merchant_identity" : "IDuqZpDw28f2KK6YuDk4jNLg",
  "subtype" : "API",
  "_links" : {
    "application" : {
      "href" : "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
    },
    "self" : {
      "href" : "https://finix.sandbox-payments-api.com/transfers/TRvypRNBeqM597Zi4DcqJ2Vh"
    },
    "merchant_identity" : {
      "href" : "https://finix.sandbox-payments-api.com/identities/IDuqZpDw28f2KK6YuDk4jNLg"
    },
    "payment_instruments" : {
      "href" : "https://finix.sandbox-payments-api.com/transfers/TRvypRNBeqM597Zi4DcqJ2Vh/payment_instruments"
    },
    "reversals" : {
      "href" : "https://finix.sandbox-payments-api.com/transfers/TRvypRNBeqM597Zi4DcqJ2Vh/reversals"
    },
    "fees" : {
      "href" : "https://finix.sandbox-payments-api.com/transfers/TRvypRNBeqM597Zi4DcqJ2Vh/fees"
    },
    "disputes" : {
      "href" : "https://finix.sandbox-payments-api.com/transfers/TRvypRNBeqM597Zi4DcqJ2Vh/disputes"
    },
    "source" : {
      "href" : "https://finix.sandbox-payments-api.com/payment_instruments/PIe2YvpcjvoVJ6PzoRPBK137"
    },
    "fee_profile" : {
      "href" : "https://finix.sandbox-payments-api.com/fee_profiles/FPbDSnEPtaT8Nttxj9NJk7eC"
    }
  }
}

HTTP Request

POST https://finix.sandbox-payments-api.com/transfers

Request Arguments

Field Type Description
source string, required ID of the Payment Instrument that will be debited
merchant string, required Merchant ID of the merchant whom you're charging on behalf of
amount integer, required The total amount that will be debited in cents (e.g. 100 cents to debit $1.00)
fee integer, optional The amount of the Transfer you would like to collect as your fee in cents. Defaults to zero (Must be less than or equal to the amount)
currency string, required 3-letter ISO code designating the currency of the Transfers (e.g. USD)processor
idempotency_id string, optional A randomly generated value that you want associated with the request
tags object, optional Key value pair for annotating custom metadata (e.g. order numbers)