Ya, Aspire menyediakan API yang dirancang untuk menawarkan fleksibilitas dalam mengelola konversi mata uang, pembayaran, dan manajemen akun. Dirancang untuk developer, API intuitif kami memastikan penerapan dan penyesuaian yang lancar untuk memenuhi kebutuhan bisnis Anda secara tepat.
Kemampuan API Aspire
API Pembayaran
Pembayaran massal
Sesuaikan alur pembayaran
Buat link pembayaran otomatis
*Catatan: Hanya pembayaran lokal yang didukung untuk Akun Aspire EUR dan GBP. Kami sedang berupaya untuk memungkinkan pembayaran internasional untuk akun-akun ini.
API Penerbitan Kartu
Buat akses Aspire untuk karyawan baru
Penerbitan kartu secara instan
Integrasi vendor dan CRM
API Otomatisasi Akuntansi
Menarik Data Bank
Jalankan rekonsiliasi dengan pemetaan chart of accounts ke kategori
Informasi tambahan tentang Aspire API
Aspire API diatur berdasarkan REST. API kami memiliki URL berorientasi sumber daya yang dapat diprediksi, menerima badan permintaan yang dikodekan dalam formulir, mengembalikan respons yang dikodekan JSON, dan menggunakan kode respons HTTP standar, autentikasi, dan kata kerja.
Akses akun demo juga dapat diberikan, dan ID Klien serta kunci API dapat dibuat dalam Pengaturan akun > kunci API di Aplikasi Web.
Untuk bantuan apa pun terkait integrasi, Account Manager Aspire Anda dapat memandu Anda.
Memulai
Contoh alur kerja di bawah ini memberikan panduan tentang cara kerja Aspire API dalam praktik.
Dalam contoh ini, kami ingin melakukan pembayaran sebesar SGD$10,000 dalam SGD kepada penerima di SG, didanai oleh saldo akun yang tersedia di akun SGD.
1. Autentikasi
1. Autentikasi
Untuk memulai, Anda perlu mendapatkan token akses yang memungkinkan Anda mencapai semua endpoint API lainnya. Menggunakan Client ID dan API key unik Anda (dapat ditemukan di menu API di Aplikasi Web Aspire), Anda dapat memanggil endpoint Autentikasi API. Setelah berhasil, token akses akan diberikan.
curl --location '<https://api.aspireapp.com/public/v1/login>' \\
--header 'Content-Type: application/json' \\
--data '{
"grant_type": "client_credentials",
"client_id": "SGLTTC-qXox2XXxxHs7Erd",
"client_secret": "CkuDGSF1HXXxx9ZEgthbor2suQAITZ36"
}'
[
{
"access_token": "eyJ0eXAiOiJKV1QxXXxhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMyIsImp0aSI6ImU3NTkxOWIwMzRkZGM1NjdkMDQ3NTM0OWU2MTlkOGNiYzA2NTI4NzI0MjgwYTg3NjZkMmRjN2QzMDA1MDk1ZTc1OGJkZDdhMDYwYjAwZWM0IiwiaWF0IjoxNzAxNzcxMTcyLCJuYmYiOjE3MDE3NzExNzIsImV4cCI6MTcwMTc3Mjk3Miwic3ViIjoiNzIyIn0.CPDe-EguskAKuyqRm04-oNuD-MLabe9lbiv74P1EEroO2zphk7mrfOAIm4jco5fVD7T_1-L-PoehhCF3rVU15GIlHqU8W-mrQzOn74_TL4aNviZQ78A0CwcXAqvimRco5d_dZaPIVvCOfIfdab3IL2F2vqQGDX_MzfFX45sbXKwehxvBRSC3DoK5dq-75MWv1jB1YWrcAHMGPK6K11PE2ud0h1lpx-BLWnHVy04tEuCHb4prCN64gWLUYLhGqmINSEpJ83DK34f4cZmJ16WzOYe6LoTproHGa24pfmSsXr_OzWmMYPxtFKLWzmmGqI_28pOHsQoyzX4061cEhAxP6g",
"token_type": "Bearer",
"expires_in": "1799",
"refresh_token": null
}
]
2. Dapatkan Akun
2. Dapatkan Akun
curl --request GET \
--url 'https://api.aspireapp.com/public/v1/accounts' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QxXXxhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMyIsImp0aSI6ImU3NTkxOWIwMzRkZGM1NjdkMDQ3NTM0OWU2MTlkOGNiYzA2NTI4NzI0MjgwYTg3NjZkMmRjN2QzMDA1MDk1ZTc1OGJkZDdhMDYwYjAwZWM0IiwiaWF0IjoxNzAxNzcxMTcyLCJuYmYiOjE3MDE3NzExNzIsImV4cCI6MTcwMTc3Mjk3Miwic3ViIjoiNzIyIn0.CPDe-EguskAKuyqRm04-oNuD-MLabe9lbiv74P1EEroO2zphk7mrfOAIm4jco5fVD7T_1-L-PoehhCF3rVU15GIlHqU8W-mrQzOn74_TL4aNviZQ78A0CwcXAqvimRco5d_dZaPIVvCOfIfdab3IL2F2vqQGDX_MzfFX45sbXKwehxvBRSC3DoK5dq-75MWv1jB1YWrcAHMGPK6K11PE2ud0h1lpx-BLWnHVy04tEuCHb4prCN64gWLUYLhGqmINSEpJ83DK34f4cZmJ16WzOYe6LoTproHGa24pfmSsXr_OzWmMYPxtFKLWzmmGqI_28pOHsQoyzX4061cEhAxP6g'
Contoh Permintaan Akun
{
"data": [
{
"id": "9046d563-6d62-421f-acda-0b000b4aa4c8",
"account_status": "active",
"account_type": "debit",
"available_balance": 1889,
"currency_code": "SGD",
"debit_details": [
{
"account_name": "Larisa & Company Private Limited",
"funding_type": "LOCAL",
"account_number": "8852-1558-7308",
"bank_swift": "",
"bank_code": "DBSSSGSG",
"bank_name": "DBS",
"bank_address": "",
"bank_country": ""
},
{
"account_name": "Larisa & Company Private Limited",
"funding_type": "SWIFT",
"account_number": "GB68TCCL04140450470872",
"bank_swift": "TCCLGB3L",
"bank_code": "DBSSSGSG",
"bank_name": "The Currency Cloud Limited",
"bank_address": "12 Steward Street, The Steward Building, London, E1 6FQ, GB",
"bank_country": "United Kingdom"
}
],
"advance_details": []
}
],
"metadata": {
"total": 1,
"per_page": 100,
"current_page": 1,
"first_page_url": "https://api.aspireapp.com/public/v1/accounts?page=1",
"last_page_url": "https://api.aspireapp.com/public/v1/accounts?page=1",
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 1,
"aspire-request-id": "c4aa3565-06ca-41be-a775-fbd623c1c280"
}
}
Contoh Respon Akun
3. Dapatkan Saldo
3. Dapatkan Saldo
Sebelum melakukan transaksi, Anda mungkin ingin menanyakan saldo apa pun yang Anda miliki di akun Aspire Anda.
curl --request GET \--url 'https://api.aspireapp.com/public/v1/accounts/9046d563-6d62-421f-acda-0b000b4aa4c8/balance' \--header 'Authorization: Bearer {{Token}}'
Contoh Permintaan Saldo Akun
{
"data": {
"account_id": "9046d563-6d62-421f-acda-0b000b4aa4c8",
"account_type": "debit",
"available_balance": 885756587,
"currency_code": "SGD",
"account_name": "Swaniawski PLC"
},
"metadata": {
"aspire-request-id": "b82b63d7-3a00-4b9a-bffc-49c4be9e5236"
}
}
Contoh Respon Saldo Akun
4. Buat Transfer
4. Buat Transfer
Saat membuat transfer, Anda dapat memesan transaksi FX secara otomatis dan mengaitkannya dengan pembayaran dengan menentukan mata uang target yang berbeda dari mata uang sumber. Respons akan mengembalikan semua detail yang diperlukan pada transaksi, termasuk ID transfer, ID Transaksi (jika transfer berhasil), dan status transfer. Dalam kasus Transfer FX, Anda perlu menambahkan QuoteID.
curl --location 'https://api.aspireapp.com/public/v1/transfer/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{Token}}'
--data '{
"source_currency": "SGD",
"source_account_id": "9b91285b-9c28-4207-af0f-a6dc8ffe8dcb",
"destination_currency": "SGD",
"bank_country_code": "SG",
"payment_method": "LOCAL",
"clearing_system":"REGULAR",
"entity_type": "INDIVIDUAL",
"beneficiary": {
"account_holder_name": "test SGD local",
"bank_code":"DBSSSGSGXXX",
"bank_account_number": "885215898101"
},
"reference":"budget",
"approval":true,
"source_amount": 1000
}'
Contoh Permintaan Buat Transfer untuk Transfer Lokal SGD
{
"data": {
"id": "9b993fc3-5d85-435f-a013-d240f4b54def",
"initiated_at": "2024-03-19T05:10:20Z",
"transaction_id": null,
"source_currency": "SGD",
"source_account_id": "9b91285b-9c28-4207-af0f-a6dc8ffe8dcb",
"destination_currency": "SGD",
"bank_country_code": "SG",
"payment_method": "LOCAL",
"clearing_system": "FAST",
"entity_type": "INDIVIDUAL",
"beneficiary": {
"account_holder_name": "test SGD local",
"bank_code": "DBSSSGSGXXX",
"bank_account_number": "885215898101"
},
"beneficiary_id": null,
"payment_amount": null,
"source_amount": 1000,
"payment_date": null,
"reference": "budget",
"internal_notes": null,
"quote_id": null,
"budget_id": null,
"category_id": null,
"approval": true,
"transaction_datetime": null,
"transfer_status": "pending_approval",
"failure_reason": null,
"failure_id": null,
"fee": 0,
"fee_currency": null,
"fee_transaction_id": null,
"fee_reason": null
},
"metadata": {
"aspire-request-id": "e0eb50b2-6dd4-4c1a-8824-f9a2d0f6bb7c"
}
}
Contoh Respons Buat Transfer
5. Periksa Status Transfer
5. Periksa Status Transfer
Setelah pembuatan transfer berhasil, pembaruan status transfer dapat dikembalikan dari Dapatkan transfer berdasarkan ID.
--request GET \ --url 'https://api.aspireapp.com/public/v1/transfer/9c282e55-90cc-428c-a3bf-fcdd33accff2/status' --header 'Authorization: Bearer {{Token}}'
Contoh Permintaan Periksa Status Transfer
{
"data": {
"id": "9c282e55-90cc-428c-a3bf-fcdd33accff2",
"initiated_at": "2024-05-29T07:35:58Z",
"transaction_id": "9c2847b7-cd80-4e30-b622-ab48e62ebdce",
"source_currency": "USD",
"source_account_id": "9c19d3fe-90e9-4ccf-a63c-ef706fbe5287",
"destination_currency": "USD",
"bank_country_code": "US",
"payment_method": "LOCAL",
"clearing_system": "REGULAR",
"entity_type": "INDIVIDUAL",
"beneficiary": {
"aba": "123456789",
"acct_number": "1234567890",
"beneficiary_city": "some city",
"account_holder_name": "test account",
"beneficiary_address": "some address",
"beneficiary_postcode": "some post",
"beneficiary_state_or_province": "some state"
},
"beneficiary_id": null,
"payment_amount": 1200,
"source_amount": 1200,
"payment_date": "2024-05-29T07:35:58Z",
"reference": "reference",
"internal_notes": "to test internal note",
"quote_id": null,
"budget_id": null,
"approval": null,
"transaction_datetime": "2024-05-29T07:35:58Z",
"transfer_status": "posted",
"failure_reason": null,
"failure_id": null,
"fee": 100,
"fee_currency": "USD",
"fee_transaction_id": "9c2847b8-1dc1-4264-a947-ce717b40cf24",
"fee_reason": "Fee for transaction Y5GJTYK5EGMG"
},
"metadata": {
"aspire-request-id": "785d563a-272a-4692-a502-cf9730e06158"
}
}
Contoh Respons Periksa Status Transfer
6. Buat Kartu
6. Buat Kartu
Anda dapat membuat kartu virtual yang terkait dengan organisasi Anda. Kartu ini dapat digunakan sekali atau berkali-kali dan dapat dibatasi oleh kode pedagang, mata uang, dan jumlah transaksi.
Setelah membuat kartu, Anda juga dapat mengakses detail kartu aman menggunakan endpoint terenkripsi kami.
curl --location 'https://api.aspireapp.com/public/v1/cards' \
--header 'Authorization: Bearer {{your_bearer_token}}' \
--data-raw '
{
"user_id": "9a1119e9-6746-413b-9dd9-354c5f927c9e",
"card_name": "IDR card",
"category": "Travel",
"account_id": "9a1119f6-3fec-4595-8122-59759937a6e5",
"email": "johndoe@example.com",
"country_code": "IN",
"phone_number": "9514567890",
"budget_id": "9b54f47a-6a2d-4051-9977-15be157a0273",
"reporting_field_values": [
{
"reporting_field_uuid": "1122aa22-12av-3321-a0f8-115e60587722",
"reporting_field_option_uuid": "3344bb44-12av-3321-a0f8-115e60587722",
"text_value": null
}
"spend_controls": {
"active_to": "2024-02-19",
"active_from": "2024-02-14",
"freeze_automatically_after": 10,
"spend_limit": null,
"merchant_locks": "98bd588b-fe98-4bff-89cb-89b80e67edfd,98bd58a8-96d7-4be2-a1d0-b697345a0ae4",
"category_locks": "9ad3f0ec-70aa-4406-83a5-dc38d6dc4a40,9ad3f0e8-e9ec-46a3-9f10-996151462ccb",
"currency_locks": "USD,SGD"
}
},
'
Contoh Permintaan Buat Kartu
{
"data": {
"card_id": "9b52f47e-b95f-4286-97af-acdb9b59aa2a",
"card_name": "IDR card",
"last_four": "3354",
"card_status": "Frozen",
"user_id": "9a1119e9-6746-413b-9dd9-354c5f927c9e",
"category": "Travel",
"account_id": "9a1119f6-3fec-4595-8122-59759937a6e5",
"email": "johndoe@example.com",
"country_code": "IN",
"phone_number": "9514567890",
"budget_id": "9b54f47a-6a2d-4051-9977-15be157a0273",
"issued_by": "All Client 2",
"reporting_field_values": [
{
"reporting_field_uuid": "1122aa22-12av-3321-a0f8-115e60587722",
"reporting_field_option_uuid": "3344bb44-12av-3321-a0f8-115e60587722",
"text_value": null
}
"spend_controls": {
"active_to": "2024-02-19",
"active_from": "2024-02-14",
"freeze_automatically_after": 10,
"spend_limit": null,
"merchant_locks": [
{
"merchant_id": "98bd588b-fe98-4bff-89cb-89b80e67edfd",
"merchant_name": "Facebook"
},
{
"merchant_id": "98bd58a8-96d7-4be2-a1d0-b697345a0ae4",
"merchant_name": "Google"
}
],
"category_locks": [
{
"category_id": "9ad3f0ec-70aa-4406-83a5-dc38d6dc4a40",
"category_name": "Agricultural Co-operatives"
},
{
"category_id": "9ad3f0e8-e9ec-46a3-9f10-996151462ccb",
"category_name": "Airlines"
}
],
"currency_locks": [
{
"currency_code": "SGD",
"currency_name": "Singapore Dollar"
},
{
"currency_code": "USD",
"currency_name": "United States Dollar"
}
]
}
},
"metadata": []
}
Contoh Respons Buat Kartu
Ingin mempelajari lebih lanjut tentang bagaimana Anda dapat mengembangkan bisnis Anda dengan Aspire API? Kunjungi halaman kami dan klik "Request early access" untuk terhubung dengan pakar kami!
Ada pertanyaan? Hubungi kami dengan klik ikon messenger di kanan bawah layar setelah Anda login.