Airtm Payins API

# Payins The Payins API enables you to collect payments from users worldwide through their Airtm accounts. This is ideal for e-commerce platforms, service providers, and any business that needs to accept payments from customers across different countries and currencies. ## Overview Payins allow you to create payment requests that customers can fulfill using their Airtm account balance or connected payment methods. The system handles currency conversion, fee calculation, and provides a seamless checkout experience for your users. ## Key Features - **Global Payment Collection**: Accept payments from users in 190+ countries - **Multiple Payment Methods**: Users can pay with Airtm balance, bank transfers, or connected payment sources - **Itemized Billing**: Support for multiple items with quantities and individual pricing - **Automatic Currency Conversion**: Handle multiple currencies seamlessly - **Secure Checkout**: Hosted payment pages with built-in security - **Real-time Status Updates**: Track payment progress with webhooks and status polling - **Mobile Optimized**: Responsive design works across all devices ## How Payins Work ### Payment Flow 1. **Create Payment Request**: Generate a payin with item details and amounts 2. **Redirect Customer**: Send customer to Airtm's secure checkout page 3. **Customer Authentication**: User logs into their Airtm account 4. **Payment Processing**: Customer completes payment using available methods 5. **Confirmation**: Receive real-time notification of payment status 6. **Fulfillment**: Deliver goods or services upon successful payment ### Checkout Experience Customers are redirected to a secure Airtm-hosted checkout page where they can: - Review itemized billing and total amounts - Select their preferred payment method - Complete the transaction securely - Receive confirmation and receipts ## Checkout Integration ### Redirect URL Structure The checkout URL follows the pattern: `{baseUrl}/checkout/{id}` Where: - `baseUrl` is your environment's base URL - `id` is the payin identifier returned from creation ### Mobile Considerations For mobile applications, configure redirection links to open in the device's default browser rather than in-app web views. This ensures proper authentication flow and better user experience. ### Callback URLs Configure callback URLs to handle different payment outcomes: - **Confirmation URL**: Where customers are redirected after successful payment - **Failure URL**: Where customers go if payment fails - **Cancel URL**: Where customers are sent if they cancel the payment ## Item Management ### Itemized Billing Payins support detailed itemization with: - Individual item descriptions - Quantity and unit pricing

Operations 5

POST /payins Create a Payin #
GET /payins List payins #
GET /payins/{id} Get payin details #
DELETE /payins/{id} Cancel a payin #
GET /payins/by-code/{code} Get payin by code #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/airtm-payins-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

airtm-payins-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Airtm Enterprise API V2 Payins API
  version: 1.155.0
  description: '# Introduction


    The Airtm Enterprise API enables organizations to send and receive payments globally through a simple REST API.'
  contact:
    name: Airtm Enterprise
    email: enterprise@airtm.com
    url: https://www.airtm.com
servers:
- url: https://api.enterprise.airtm.com/v2
- url: https://api.stg.enterprise.airtm.com/v2
tags:
- name: Payins
  description: '# Payins


    The Payins API enables you to collect payments from users worldwide through their Airtm accounts.'
paths:
  /payins:
    post:
      operationId: CreatePayin
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayinResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: string
                    description: 'Machine-friendly error code


                      See the API error code catalog in the documentation for the endpoint surface you are using.'
                    example: '415096'
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid email address
                  data:
                    $ref: '#/components/schemas/Record_string.unknown_'
                    description: Additional data related to the error
                    example:
                      email: invalid@address
                required:
                - code
                - message
                type: object
      description: 'This endpoint will allow you to create a payin.

        In order to complete a payin, it must first be created, then the user must be directed to the Airtm website to confirm/checkout the payin, at which time they will be redirected to a URL of your choosing. See “Usage” below.


        We will redirect the user to either `confirmationUri` or `cancelUri` with code as a query parameter so you can process the payin as being either confirmed or cancelled.


        ## Usage


        1. Create a payin.

        2. Extract the `id` from the response and redirect the user to: https:///payin/:id User will be redirected for authentication as necessary.

        3. User will confirm or cancel payin from Airtm’s website.

        4. If confirmed, money will be transferred from the user’s Airtm wallet, to your account, and the user will be redirected to the provided `confirmationUri`.

        If canceled, no money will be transferred, and the user will be redirected to the provided `cancelUri`.


        Upon confirmation or cancellation, the payin will be considered completed, and the URL residing at /payin/:id will no longer function.

        Therefore, if you wish to complete an identical payin, you will need to create a new one.


        The `confirmationUri` attribute should not be used for transaction completeness verification, if the URI was requested, it doesn''t mean the transaction was completed successfully.


        ## Redirection


        > [!important]

        > If you are integrating our API in a mobile application, you will need to redirect the user with the payin generated url by making sure that you open the user’s external browser.

        > By implementing this, the user’s device will be able to successfully handle deeplinks and redirect the users to the Airtm app to finish the operation.


        Here are some code snippets in the most popular mobile development frameworks for you to implement the redirection:


        ### Swift Example


        ```swift

        // instead of opening a WKWebView or a Safari View Controller, do this:


        let url = URL(string: "https://app.airtm.com/payin/payin-id")

        if UIApplication.shared.canOpenURL(url) {

        UIApplication.shared.open(url)

        }

        ```


        ### Kotlin Example


        ```kotlin

        val url = "https://app.airtm.com/payin/payin-id"

        fun Context.openUrl(url: String?) {

        if (url == null) return


        val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))


        kotlin.runCatching {

        this.startActivity(browserIntent)

        }.onFailure {

        // handle errors gracefully

        }

        }

        ```


        ### Flutter Example


        ```dart

        import ''package:url_launcher/url_launcher.dart'';


        void openUrl(String? url) async {

        if (url == null) return;


        final uri = Uri.parse(url);


        try {

        await launchUrl(uri, mode: LaunchMode.externalApplication);

        } catch (_) {

        // Fail silently or log if needed

        }

        }

        ```


        ### React Native Example


        ```typescript

        import { Linking } from ''react-native'';


        const openUrl = async (url: string | null | undefined) => {

        if (!url) return;


        try {

        const supported = await Linking.canOpenURL(url);

        if (supported) {

        await Linking.openURL(url);

        }

        // If not supported, you can silently fail or log

        } catch (error) {

        // Optional: Handle errors silently or log

        }

        };

        ```'
      summary: Create a Payin
      tags:
      - Payins
      security:
      - basicAuth: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayinRequest'
    get:
      operationId: ListPayins
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paginated_PayinResponse_'
        default:
          description: Error
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: string
                    description: 'Machine-friendly error code


                      See the API error code catalog in the documentation for the endpoint surface you are using.'
                    example: '415096'
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid email address
                  data:
                    $ref: '#/components/schemas/Record_string.unknown_'
                    description: Additional data related to the error
                    example:
                      email: invalid@address
                required:
                - code
                - message
                type: object
      description: Endpoint to list all payins associated with your account.
      summary: List payins
      tags:
      - Payins
      security:
      - basicAuth: []
      parameters:
      - description: Gets results before the specified cursor.
        in: query
        name: before
        required: false
        schema:
          type: string
      - description: Gets results after the specified cursor.
        in: query
        name: after
        required: false
        schema:
          type: string
      - description: The maximum number of items to fetch.
        in: query
        name: perPage
        required: false
        schema:
          default: 100
          format: int32
          type: integer
          minimum: 10
          maximum: 1000
      - in: query
        name: status
        required: false
        schema:
          $ref: '#/components/schemas/PayinStatus'
      - in: query
        name: enterpriseId
        required: false
        schema:
          type: string
  /payins/{id}:
    get:
      operationId: GetPayinById
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayinResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: string
                    description: 'Machine-friendly error code


                      See the API error code catalog in the documentation for the endpoint surface you are using.'
                    example: '415096'
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid email address
                  data:
                    $ref: '#/components/schemas/Record_string.unknown_'
                    description: Additional data related to the error
                    example:
                      email: invalid@address
                required:
                - code
                - message
                type: object
      description: Get the details of an existing payin.
      summary: Get payin details
      tags:
      - Payins
      security:
      - basicAuth: []
      parameters:
      - description: The payin id
        in: path
        name: id
        required: true
        schema:
          type: string
    delete:
      operationId: CancelPayin
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayinResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: string
                    description: 'Machine-friendly error code


                      See the API error code catalog in the documentation for the endpoint surface you are using.'
                    example: '415096'
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid email address
                  data:
                    $ref: '#/components/schemas/Record_string.unknown_'
                    description: Additional data related to the error
                    example:
                      email: invalid@address
                required:
                - code
                - message
                type: object
      description: 'Cancel an existing payin.


        > [!tip]

        > Only `PENDING` payins can be canceled.'
      summary: Cancel a payin
      tags:
      - Payins
      security:
      - basicAuth: []
      parameters:
      - description: The payin id
        in: path
        name: id
        required: true
        schema:
          type: string
  /payins/by-code/{code}:
    get:
      operationId: GetPayinByCode
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayinResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: string
                    description: 'Machine-friendly error code


                      See the API error code catalog in the documentation for the endpoint surface you are using.'
                    example: '415096'
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid email address
                  data:
                    $ref: '#/components/schemas/Record_string.unknown_'
                    description: Additional data related to the error
                    example:
                      email: invalid@address
                required:
                - code
                - message
                type: object
      description: Get the details of an existing payin by its code.
      summary: Get payin by code
      tags:
      - Payins
      security:
      - basicAuth: []
      parameters:
      - description: The payin code
        in: path
        name: code
        required: true
        schema:
          type: string
components:
  schemas:
    Email:
      type: string
      pattern: ^(.+)@(.+)$
    PayinStatus:
      description: 'The current status of the payin


        - `CREATED`: The payin has been created but not yet confirmed.

        - `CONFIRMED`: The payin has been confirmed and is ready for processing.

        - `CANCELED`: The payin has been canceled by the user or system.

        - `PROCESSING`: The payin is currently being processed.

        - `FAILED`: The payin has failed due to an error.

        - `BRIDGE_FAILED`: The payin has failed due to an error in Bridge.

        - `BRIDGE_CANCELED`: The payin has been canceled due to an error in Bridge.'
      enum:
      - CREATED
      - CONFIRMED
      - CANCELED
      - PROCESSING
      - FAILED
      - BRIDGE_FAILED
      - BRIDGE_CANCELED
      type: string
      x-enum-varnames:
      - CREATED
      - CONFIRMED
      - CANCELED
      - PROCESSING
      - FAILED
      - BRIDGE_FAILED
      - BRIDGE_CANCELED
    Paginated_PayinResponse_:
      description: Represents a paginated collection of items.
      properties:
        items:
          items:
            $ref: '#/components/schemas/PayinResponse'
          type: array
          description: The items in the current page.
        startCursor:
          type: string
          description: The cursor for the first item in the current page.
        endCursor:
          type: string
          description: The cursor for the last item in the current page.
      required:
      - items
      type: object
      additionalProperties: false
    CreatePayinItem:
      properties:
        description:
          type: string
          description: An arbitrary string describing the individual item.
        amount:
          type: number
          format: double
          description: The price in USD of the individual item.
          example: 10
          minimum: 0.01
        quantity:
          type: number
          format: double
          description: 'The number of items being purchased.

            This will be multiplied with the ''amount'' value to calculate the total.'
          example: 1
          minimum: 1
      required:
      - description
      - amount
      - quantity
      type: object
      additionalProperties: false
    Record_string.unknown_:
      properties: {}
      additionalProperties: {}
      type: object
      description: Construct a type with a set of properties K of type T
    PayinItem:
      description: An item within a payin transaction
      properties:
        description:
          type: string
          description: An arbitrary string describing the individual item.
        amount:
          type: number
          format: double
          description: The price in USD of the individual item.
          example: 10
          minimum: 0.01
        quantity:
          type: number
          format: double
          description: 'The number of items being purchased.

            This will be multiplied with the ''amount'' value to calculate the total.'
          example: 1
          minimum: 1
        id:
          type: string
          description: The unique identifier for the item
          format: uuid
        payinId:
          type: string
          description: The unique identifier for the payin.
          format: uuid
      required:
      - description
      - amount
      - quantity
      - id
      - payinId
      type: object
      additionalProperties: false
    PayinResponse:
      description: 'A payin is a transaction that transfers funds from a user''s Airtm account to an enterprise''s account.

        Normally, the payin represents a purchase made by a user.'
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
          description: The unique identifier for the payin.
        code:
          type: string
          description: 'An arbitrary string of the partner’s choosing. Used to identify and correlate Airtm purchases with partner records.


            > [!important]

            > Must be a unique.'
        hash:
          type: string
          description: Unique hash for the payin operation within the Airtm system.
        status:
          $ref: '#/components/schemas/PayinStatus'
        amount:
          type: number
          format: double
          description: Amount in USD that was transacted in the operation.
          example: 10
        netAmount:
          type: number
          format: double
          description: Amount in USD to be received by the enterprise
          example: 9.5
        airtmFee:
          type: number
          format: double
          description: Amount to be collected by Airtm as fee
          example: 0.5
        description:
          type: string
          description: 'A text string describing the purchase.


            > [!tip]

            > This text is displayed to the user when they are confirming the transaction.'
        items:
          items:
            $ref: '#/components/schemas/PayinItem'
          type: array
          description: An array of the items being purchased/bought.
        airtmUserId:
          $ref: '#/components/schemas/Uuid'
          description: The unique identifier for the AirTM user associated with this payin.
        airtmUserEmail:
          $ref: '#/components/schemas/Email'
          description: The email of the Airtm user associated with this payin.
        failureReason:
          type: string
          description: If the payin failed to complete, this field will describe why it failed.
        createdAt:
          type: string
          format: date-time
          description: Timestamp of when the payin was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp of the last update made to the payin.
        confirmationUri:
          type: string
          description: A URL to redirect the user to when they confirm the transaction.
          format: url
        cancelUri:
          type: string
          description: A URL to redirect the user to when they cancel the transaction.
          format: url
      required:
      - id
      - code
      - status
      - amount
      - netAmount
      - airtmFee
      - description
      - items
      - createdAt
      - updatedAt
      - confirmationUri
      - cancelUri
      type: object
      additionalProperties: false
    CreatePayinRequest:
      properties:
        code:
          type: string
          description: 'An arbitrary string of the partner’s choosing. Used to identify and correlate Airtm purchases with partner records.


            > [!important]

            > Must be unique.'
        amount:
          type: number
          format: double
          description: 'The total amount in USD of the purchase.


            > [!important]

            > This value must correctly correspond to the sum of the amounts associated with each purchase item.'
        description:
          type: string
          description: A text string describing the purchase. This text is displayed to the user when they are confirming the transaction.
          maximum: 250
        items:
          items:
            $ref: '#/components/schemas/CreatePayinItem'
          type: array
          description: An array of the items being purchased/bought.
        confirmationUri:
          type: string
          description: A URL to redirect the user to when they confirm the transaction.
          format: url
        cancelUri:
          type: string
          description: A URL to redirect the user to when they cancel the transaction.
          format: url
      required:
      - code
      - amount
      - description
      - items
      - confirmationUri
      - cancelUri
      type: object
      additionalProperties: false
    Uuid:
      type: string
      format: uuid
      pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
x-tagGroups:
- name: Payout Operations
  tags:
  - Payouts
  - Bulk Payouts
  - Users
- name: Payin Operations
  tags:
  - Payins
- name: Account
  tags:
  - Me
  - Deposits
  - Reports
- name: Direct Withdrawal
  tags:
  - External Bank Account
  - External Crypto Account
  - Withdrawals
- name: Webhooks
  tags:
  - Webhooks