-
-
Save thairu/1bb35222aefd6e27aa07 to your computer and use it in GitHub Desktop.
Stripe currency conversion example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This charge is a 3.14 EUR charge that is converted to USD. The charge response shows 3.14/EUR for the amount/currency. | |
# This is the cardholder sees on their card statement (assuming an EUR-issued card) | |
# curl https://api.stripe.com/v1/charges/ch_2zN81l9O1fCy2R -u <SECRET_KEY> | |
# [redacted response] | |
{ | |
"id": "ch_2zN81l9O1fCy2R", | |
"object": "charge", | |
"created": 1385143835, | |
"livemode": false, | |
"paid": true, | |
"amount": 314, | |
"currency": "eur", | |
"refunded": false, | |
"card": { | |
}, | |
"captured": true, | |
"refunds": [], | |
"balance_transaction": "txn_2zN8kH2vTa0zis", | |
"amount_refunded": 0, | |
"metadata": {} | |
} | |
# The balance transaction, txn_2zN8kH2vTa0zis, contains details of what was added to your account balance | |
# i.e. the amount in your transfer currency, in this example USD. | |
# Note, at the time of the charge, 3.14 EUR -> 4.24 USD, which is the amount and currency of the balance transaction. | |
# curl https://api.stripe.com/v1/balance/history/txn_2zN8kH2vTa0zis | |
{ | |
"id": "txn_2zN8kH2vTa0zis", | |
"object": "balance_transaction", | |
"source": "ch_2zN81l9O1fCy2R", | |
"amount": 424, | |
"currency": "usd", | |
"net": 374, | |
"type": "charge", | |
"created": 1385143835, | |
"available_on": 1385683200, | |
"status": "available", | |
"fee": 50, | |
"fee_details": [ | |
{ | |
"amount": 42, | |
"currency": "usd", | |
"type": "stripe_fee", | |
"description": "Stripe processing fees", | |
"application": null | |
}, | |
{ | |
"amount": 8, | |
"currency": "usd", | |
"type": "stripe_fee", | |
"description": "Stripe currency conversion fee", | |
"application": null | |
} | |
], | |
"description": "" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment