Home
Release Notes
Home
Release Notes
Linkedin
  1. Transactions
  • Baladâ„¢ Gateway Documentation đŸ“–
  • Get Started
  • Authorization
  • Responses
  • Go Live!
  • FAQs
  • APIs
    • Authentication
      • Token
    • Core
      • Exchange rate
        • Exchange Rates
      • Balance
        • Get Current Balance
      • Secrets
        • Generate Secret
        • Delete Secret
        • Get Secrets
    • Link
      • Sandbox Testing Guide
      • Error Codes
      • Transaction Lifecycle V2
      • Lookups
        • Purposes List
        • Sources List
        • Banks List
        • Relations
      • Transactions
        • Create transaction
          POST
        • Update transaction
          POST
        • Cancel transaction
          POST
        • Get transaction status V2
          GET
        • Transactions List
          GET
        • Export Transactions List
          GET
        • Validate Account
          POST
        • Request Sender Document Upload URL
          POST
      • Reconciliation
        • Reconciliation
      • Quotations
        • Create Quotation
    • Bills
      • Services
        • Categories
        • Providers
        • Services
        • Service Configurations
        • available currencies
      • Payments
        • Inquiry
        • Fees
        • Confirm Payment
        • Bill Payment List
  • Webhooks
    • Link.Transaction.StatusUpdateV2
  1. Transactions

Request Sender Document Upload URL

POST
/remit-api/v1/transactions/documents/upload-url
Use this endpoint to get a secure, temporary link to upload the sender's identity document (for example, a passport). You then attach the uploaded document to a transaction with sender_identifier_document_id in Create transaction.

How it works#

1.
Request an upload URL: call this endpoint with the file name, content type and size. Keep the document_id from the response.
2.
Upload the file: send the file bytes in an HTTP PUT request to upload_url.
Set the Content-Type header to the exact content_type value from the response.
Do not add a Balad Authorization header. The URL is already signed.
Upload before expires_in_seconds ends. After that, request a new URL.
3.
Create the transaction: send document_id as sender_identifier_document_id in Create transaction.

File rules#

RuleValue
Allowed extensions.jpg, .jpeg, .png, .pdf
Maximum size5 MB (5,242,880 bytes)
UsageOne document can be attached to one transaction only

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/json

Example
{
    "file_name": "passport.pdf",
    "content_type": "application/pdf",
    "size_in_bytes": 482133
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://gateway-sandbox.balad.tech/remit-api/v1/transactions/documents/upload-url' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "file_name": "passport.pdf",
    "content_type": "application/pdf",
    "size_in_bytes": 482133
}'

Responses

đŸŸ¢200Success
application/json
Bodyapplication/json

Example
{
    "data": {
        "document_id": "8f1c2a4e-3b7d-4c55-9a2e-6f0d1b7c9e21",
        "upload_url": "https://<bucket>.s3.amazonaws.com/client-api/<partner>/transactions/<file>?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=600&X-Amz-Signature=<signature>",
        "expires_in_seconds": 600,
        "content_type": "application/pdf"
    },
    "errors": null
}
đŸŸ 400Validation error
Previous
Validate Account
Next
Reconciliation
Built with