1. App-to-App
  • API Docs Mexico 🇲🇽
  • Online Payments
    • Release Notes
    • Card Payments
      • Request a card token
      • Make a charge or deferred charge
      • Create payment (tokenless)
      • Request deferred options
      • Refund a transaction
      • Authorize payments
      • Preauthorization (tokenless)
      • Void a transaction
      • Reauthorize payments
      • Capture an authorized payment
      • Bin Info V2
      • Bin Info
      • Validate OTP
    • One-Click and Scheduled Payments
      • Request a recurring charge token
      • Create a recurring charge
      • Make an One-click payment
      • Update recurring charge card data
      • Cancel a recurring charge
      • Update a recurring charge
      • Add a temporary charge or discount
      • Authorize payments
      • Capture an authorized payment
      • Get recurring charge Info
    • Transfer in
      • Get Bank List
      • Request a Transfer In token
      • Init Transaction
      • Get Status
    • Transfer Out
      • Get Bank List
      • Get Bank List V2
      • Request a Transfer Out token
      • Init Transaction
      • Get Status
      • Balance for Payouts
    • Smartlinks
      • Create a Smartlink
      • Get a Smartlink
      • Delete a smartlink
      • Update a Smartlink
    • Payment Button
      • Create a payment button
    • Analytics
      • Get transactions list v1
      • Get transactions list v2
    • Chargebacks
      • Query Chargebacks
      • Request Chargeback Export
    • Commissions
      • Get Commission Configuration
    • Payment Credentials
      • Create a credential
      • Activate or deactivate
      • Delete credential
      • Regenerate a credential
      • Update credential
      • Advanced search
      • Search credentials
    • Platform Status
      • Get platform status
      • Get gateway status
    • Settlement
      • Query settlement
    • Subscription Transactions
      • Get subscription transactions
  • Card Present Billpocket
    • Get Started
      • Create Account
      • User Token
      • API Keys
    • Webhooks
      • Webhooks — Transfer Funds to Your Bank Account
      • Transfer Funds Errors
    • Terminals
      • App Review
      • Splash Screen
    • Card Present Payment Services
      • Cloud Terminal API
        • Collect card payments
        • Print Ticket
        • Cancel Push Notification
        • Get transaction status
        • Collect card payments v2
      • App-to-App
        • Android intents
        • App to App — iOS
        • App to App — Mobile Web
      • Terminal SDK
        • Terminal SDK Android
        • Android SDK errors
    • Card not Present Billpocket Services
      • 3DS Checkout
        • Create checkout
        • Get checkout details
      • E-commerce Flex
        • Get token
        • Validate token
        • Collect payments
        • Refund
        • Capture an authorized payment
        • Get status
    • Catalogs
      • States
      • Municipalities
      • Tax companies
      • Commercial activities
    • User Settings
      • Create user
    • Accounts
      • Clabe Account Setup
        • Add CLABE account
      • Deposit Accounts
        • Add or update CLABE account
    • Transactions
      • Transaction List
        • Get token
        • Get transaction list
        • Get transaction list v2
        • Get transaction list v3
        • Get transaction list v4
      • Cancel Payments
        • Cancel payments Error Codes
        • Cancel payments
  • API Raw Card Present
    • The Amount Object
    • Error Catalog
    • Key Exchange Process
    • Release Notes
    • Test Data
    • One-time payments
      • Single payment
    • Two-step-payments
      • Authorization and capture
    • Voids & Refunds
      • Refund a transaction
      • Void & Reverse
    • Card information
      • Get BIN Info
      • Bin Info V2
      • Request deferred options
    • Query Transactions
      • Transaction Search
    • Webhooks
      • Webhooks — Introduction
      • Good Practices
      • Webhooks — Card Payments
      • Webhooks — Refunds
      • Check Your Webhooks
    • Chargebacks
      • Query Chargebacks
      • Request Chargeback Export
  • Kushki One
    • Error Catalog
    • Release notes
    • Transaction Examples
    • Webhooks
    • Cloud Services
      • Payment
        • Sync
          • Charge
          • Authorization (Pre-auth)
          • Capture
          • Re-authorization
          • Post-tip
          • Void
          • Refund
          • Abort
        • Async
          • Charge (Async)
          • Authorization — Pre-auth (Async)
          • Capture (Async)
          • Re-authorization (Async)
          • Post-tip (Async)
          • Void (Async)
        • Search
          • Transaction Search
      • Print
        • Create Print Job
        • Get Print Job Status
    • Local Services
      • Payment
        • Sync
          • Charge
          • Authorization (Pre-auth)
          • Capture
          • Re-authorization
          • Post-tip
          • Void
          • Refund
          • Abort
        • Async
          • Charge (Async)
          • Authorization — Pre-auth (Async)
          • Capture (Async)
          • Re-authorization (Async)
          • Post-tip (Async)
          • Void (Async)
          • Abort (Async)
        • Search
          • Transaction Search — Online
          • Transaction Search — Local
      • Print
        • Create Print Job
        • Get Print Job Status
        • Print Job Webhook (inbound — implemented by your POS)
  • Appian - Submerchant Register
    • Submerchant Validation in Batch
    • Query submerchant status by requestId/submerchantId
    • Submerchant Document Upload
    • Get submerchantIds
    • Get credentials for submerchants
  • Schemas
    • RequestBodies
      • one-and-two-step-payment
    • Card
    • Channel
    • Amount-cash-in
    • ChargebackListResponse
    • StatusComponent
    • SettlementDateRangeRequest
    • SubscriptionTransactionsResponse
    • amount
    • TransactionResponse
    • PrintJobRequest
    • one-and-two-step-payment-2
    • networkToken
    • ChargebackItem
    • SubscriptionTransaction
    • extra_taxes
    • RawResponse
    • CommandText
    • currency
    • ErrorResponse400
    • ErrorResponse
    • SettlementResponse
    • SettlementRecord
    • webhooksItem
    • card
    • CardData
    • CommandColumns
    • Amount
    • Country
    • ErrorResponse401
    • card_details
    • LinkFailure
    • ColumnItem
    • extraTaxes
    • ErrorResponse403
    • enc_tlv
    • CommandDivider
    • TransactionEvent
    • Deferred
    • payment_method
    • ErrorResponse500
    • deferred
    • CommandFeed
    • TransactionStatus
    • pos_details
    • CommandSpace
    • ReadingType
    • ContactDetails
    • contact_details
    • sub_merchant
    • CommandCut
    • FailureReason
    • documentType
    • Subscription
    • metadata
    • CommandImage
    • EventTerminal
    • orderDetails
    • Language
    • TransactionSearchRequest
    • CommandQR
    • EventOperation
    • Shipping Address
    • payment_submethod
    • CommandBarcode
    • EventAmount
    • Billing-Address
    • SubscriptionUpdate
    • EventExtraTaxes
    • PrintJobAccepted
    • product
    • SubscriptionAdjustmentRequest
    • PrinterError
    • EventMetadata
    • threeDomainSecure
    • AmountWithTaxes
    • PrintJobStatus
    • PrintJobStatusRequest
    • webhooks
    • AmountCore
    • headers
    • ExtraTaxes
    • PrintWebhookPayload
    • Metadata
    • webhooksChargeback
    • citMit
    • AmountWithTip
    • network
    • TransactionSearchBody
    • TransactionSearchOnlineBody
    • binInfo
    • AmountWithOptionalTip
    • TransactionSearchLocalBody
    • messageFields
    • TransactionEvent_2
    • UnexpectedErrorResponse
    • FailureReason_2
    • transactionType
    • ExternalReferenceId
    • EventTerminal_2
    • ExternalSubscriptionId
    • EventOperation_2
    • EventAmount_2
    • EventExtraTaxes_2
    • EventMetadata_2
    • SettlementTicketRequest
BienvenidaPerú 🇵🇪México 🇲🇽
Ecuador 🇪🇨Colombia 🇨🇴Chile 🇨🇱
BienvenidaPerú 🇵🇪México 🇲🇽
Ecuador 🇪🇨Colombia 🇨🇴Chile 🇨🇱
  1. App-to-App

App to App — iOS

Open the point of sale (POS) app from your iOS mobile app to process payments through a terminal. The POS application is called through a custom URL scheme.
INFO
Service available in Mexico 🇲🇽 only.

Requirements#

In order to call the POS app from your app within an iOS device, you must meet the following requirements:
A valid account
The latest available version of the Billpocket POS app installed from the App Store
Be logged in within the POS app
A supported Billpocket reader

Calling the POS app#

The POS app uses the custom URL scheme billpocket:// to receive requests from other apps. You can send parameters in the request to configure the operation to be performed. When a request is received, the application opens on the corresponding screen according to the request settings.
You can perform the following operations:
Sale
Refund

Request data model#

To send a request to the terminal, you must send an object that contains all the required properties. Below is the list of all the properties available in the request by operation type.
PropertyTypeSaleRefundDescription
transactionStringRequiredRequiredTransaction type: venta (sale) or devolucion (refund).
usertokenStringRequiredRequiredYour user token. The query string key is lowercase. This same value is called userToken (camelCase) in Android intents and in the SDK — the POS app does not recognize the camelCase key in custom URL schemes.
identifierStringRequiredRequiredAn identifier generated on your side for transaction traceability. It is returned in the response. 256 characters maximum.
amountDecimalRequiredN/ATransaction amount. Does not include tip. Two decimals.
urlSchemeStringRequiredRequiredApp, webhook or URL scheme to be called at the end of any transaction. This app should be ready to handle the POS app call. 50 characters maximum.
transactionIdStringN/ARequiredOriginal transaction ID generated by us, to be refunded.
tipDecimalOptionalN/ATip included in the transaction. Two decimals.
msiIntegerOptionalN/ADefer a payment. Number of monthly installments: 0 (one-time payment), 3, 6, 9 or 12.
referenceStringOptionalN/AText reference to identify the transaction. 256 characters maximum.
emailStringOptionalN/ACustomer's email (when provided). 150 characters maximum.
phoneStringOptionalN/ACustomer's phone number (when provided). 14 characters maximum.
showPhotoButtonBooleanOptionalN/AAllows attaching a photo during the transaction. Default false.
mandatoryPhotoBooleanOptionalN/AMakes the photo mandatory during the transaction. Requires showPhotoButton set to true.
comesFromQRBooleanOptionalN/ASet to true if the transaction URL comes from a QR image.

Sale#

Send a sale request from your app to the POS to process a payment with a terminal.
To make a sale request you must:
Set the transaction property to the value of venta.
Send your user token.
Send an identifier generated on your end for traceability. It is returned in the response.
Send a valid amount.
Send a urlScheme where the response will be returned.
You can also set a tip, defer a payment and other operations. Check the request data model to see all the parameters available in the request.
The parameters must be concatenated using a query string along with the custom URL scheme billpocket://.
Important
You must make sure you encode the parameters correctly before making a request.

Sale request example#

In this example, the values necessary for the request are obtained through text fields to be concatenated to the URL.
The values of NSString are concatenated and converted to NSURL to form a valid URL.
To concatenate NSString use stringWithFormat as shown below.
Open the URL through the open() method.
If the request has been successful, the POS application is displayed on the payment screen with the configuration sent.

Refund#

Send a request to process a refund from your app.
To make a refund, you must:
Set the transaction property to the value of devolucion.
Send your user token.
Send an identifier generated on your end for traceability. It is returned in the response.
Send a valid amount.
Send a urlScheme where the response will be returned.
Send the ID of the transaction to be refunded.
Review the request data model.
The parameters must be concatenated using a query string along with the custom URL scheme billpocket://. You must make sure you encode your parameters correctly before requesting a refund.

Refund conditions#

To be refunded, a transaction must meet the following conditions:
The original transaction must have been approved at least 1 minute ago.
The request must be made before 11 p.m. (CDMX time) on the same day the original transaction was made.
The refund must be for an amount equal to or less than the original transaction.
Note
To process a refund on iOS, you need POS app version 4.3.24 or higher.

Refund request example#

To concatenate NSString use stringWithFormat as shown below.
URLWithString is used to cast the NSURL response.
Open the URL through the open() method.
If the request has been successful, the POS application is displayed on the payment screen with the configuration sent.

Response#

Find out if the request was successful (aprobada), rejected (rechazada), or if there was an error (error) through the result property returned in the response.
The response is sent along with the operation parameters to the URL established in the urlScheme property. The structure of the payload is encoded using a query string, so it has a similar structure to the request. You must process the response correctly to continue with the payment flow.
Among the important parameters returned in the response is the transactionId property, which contains the ID of the approved transaction and allows you to perform other operations, such as a refund.

Response data model#

Depending on the result of the operation, you may receive additional information through the following properties:
PropertyTypeDescription
resultStringThe result of the operation: aprobada (approved), rechazada (declined) or error.
statusinfoStringIn case of error, additional information is returned.
amountDecimalTransaction amount. Does not include tip.
tipDecimalTip included in the transaction.
referenceStringText reference to identify the transaction.
transactionidStringTransaction ID generated by us.
msiIntegerNumber of monthly installments the payment was deferred to: 0 (one-time payment), 3, 6, 9 or 12.
authorizationStringAuthorization given by the issuer bank.
creditcardStringLast 4 digits of the card.
cardtypeStringCard type.
emailStringCustomer's email (when provided).
phoneStringCustomer's phone number (when provided).
arqcStringCard's chip validated cryptogram (when available).
aidStringCard's chip application identifier (when available).
applabelStringCard's chip application label (when available).
urlStringIdentifier to obtain a digital voucher.
identifierStringIdentifier sent during the sale for traceability.
bankStringCard issuer.
accountTypeStringAccount type: credit (credit card) or debit (debit card).
nameStringCardholder name.
bp_versionStringPOS app version.

Example of a response#

myapp://result=aprobada&statusinfo=&amount=100.00&tip=15.00&reference=Pago%20%26%20%25%20%23%20(%20)%20/%20@%20con%20propina%20a%203%20meses%20sin%20intereses&transactionid=72037…
You can implement a Custom URL Scheme or a Universal Link to handle the response in your application. See Apple's documentation on how to allow apps and websites to link to your content.

See also#

Find out how to set up a splash screen when calling the POS app.

Got a suggestion on this documentation? Contact us.
Modified at 2026-08-25 19:54:30
Previous
Android intents
Next
App to App — Mobile Web
Built with