Transfer in — preview

This API is used to show the customer the fee and net amount before charging a saved card.

It returns the amount, the service fee of the card's location and the net amount. Nothing is charged.

Note: Amounts are in cents. The location is the one where the card was saved.

URL

{{interface_url}}/{{version}}/customers/{{customer_id}}/transfers/in/preview

Method

POST

Headers

Authorization: Bearer {access_token} (or Api-Key)

Request Parameters

FieldTypeRequiredDescription
payment_method_idIntegerYesA saved card of the customer.
amountIntegerYesAmount to charge, in cents (1-99999999).
currencyStringNo3 letters. Default USD.

URL Parameters

ParameterRequired/OptionalTypeDescription
customer_idRequiredIntegerOur customer ID (id returned by Create customer).

Example Request (cURL)

curl --location --request POST '{{interface_url}}/{{version}}/customers/{{customer_id}}/transfers/in/preview' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
  "payment_method_id": 90311,
  "amount": 5000
}'

Example Response (JSON) — 200

{
  "location_id": 279685,
  "amount": 5000,
  "service_fee_percent": 3,
  "service_fee_amount": 150,
  "net_amount": 4850,
  "currency": "USD"
}

Error Responses

Format: { "error": { "code", "name", "message", "details" } }

StatusErrorWhen
400missing_required_parametersMissing or invalid field.
404payment_method_not_foundNot a saved card of this customer.

Path Params
string
required
string
required
Body Params
Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json