Sender

Create a v2 payment order (off-ramp or on-ramp)

Changed on

Creates a new payment order.

  • Off-ramp (stablecoin → fiat): set source.type = "crypto" and destination.type = "fiat". The response providerAccount contains a receiveAddress to send tokens to.
  • On-ramp (fiat → stablecoin): set source.type = "fiat" and destination.type = "crypto". The response providerAccount contains a virtual bank account for the user to deposit fiat into.

Off-ramp deposit. Send exactly providerAccount.amountToTransfer of providerAccount.currency: that is amount + senderFee + transactionFee. When providerAccount.memo is present, include it with the deposit or the deposit cannot be credited.

Transaction fee. By default the sender pays the transaction fee out of their sender fee, so the returned senderFee is what the sender earns and the customer only tops up a shortfall. Set transactionFeePayer: "customer" (or change the token's setting in the dashboard) to add the transaction fee on top of the full sender fee instead.

Solana (solana) is available through this endpoint only; v1 order endpoints reject it. For on-ramp to Solana, the recipient wallet must already have a token account for the stablecoin's mint.

Provider routing. On off-ramp, leave destination.providerIds unset and the API resolves a ranked queue of up to 3 providers at creation; assignment walks it in order. Set destination.providerIds to supply your own queue — typically the ids from a rate quote — or a one-entry queue to route to a single provider. Queue exhaustion is not an immediate refund: Paycrest may still route the order elsewhere before refunding it.

On on-ramp, the provider is selected when the order is created, so destination.providerIds accepts at most one entry and acts as a pin.

The singular destination.providerId is retained for backward compatibility on both flows and is mutually exclusive with providerIds. Routing validation failures return 400 with data as a single { field, message } object rather than an array.

post/sender/orders

Request

  • Base URL
    https://api.paycrest.io/v2
  • URL
    https://api.paycrest.io/v2/sender/orders
  • Auth
    API key in header API-Key

Request body

amountstring required

Payment amount. Denomination is determined by amountIn (defaults to crypto units).

amountIn'crypto' | 'fiat'

Specifies whether amount is denominated in crypto or fiat. Defaults to crypto.

ratestring

Quoted exchange rate (fiat per crypto unit). Optional — protocol uses best available rate if omitted.

senderFeestring

Fixed sender fee in crypto units. Mutually exclusive with senderFeePercent. When the effective sender fee is greater than zero, senderFeeAddress (or a fee address configured on the sender profile) is required.

senderFeePercentstring

Sender fee as a percentage of the order amount (alternative to senderFee). Mutually exclusive with senderFee. When the effective sender fee is greater than zero, senderFeeAddress (or a fee address configured on the sender profile) is required.

senderFeeAddressstring

Optional fee recipient address for this order. Required when the effective sender fee is greater than zero (from senderFee, senderFeePercent, or a profile-configured fee) and no fee address is configured on the sender profile for the token. Not required when the effective fee is zero. Must be a valid address for the order's crypto source or destination network (a Solana address for Solana orders). Fees on some networks are collected and paid out to it in batches rather than per order.

transactionFeePayer'sender' | 'customer'

Who pays the order's transaction fee (its network cost). Overrides the token's setting in your dashboard, which defaults to sender.

  • sender: the transaction fee comes out of your sender fee first; your customer only pays the difference when your fee is smaller. You earn max(0, fee − transactionFee), and the customer sends amount + max(fee, transactionFee).
  • customer: your customer pays the transaction fee on top of your full sender fee.

With no sender fee, both modes are the same.

referencestring

Your internal reference ID for this order.

Example request

{
  "amount": "100",
  "senderFee": "0.5",
  "senderFeePercent": "1",
  "senderFeeAddress": "0xYourFeeRecipientAddress",
  "transactionFeePayer": "sender",
  "source": {
    "kyc": {
      "organizationDetails": {
        "directors": [
          {
            "role": "Director"
          }
        ]
      }
    }
  },
  "destination": {
    "kyc": {
      "organizationDetails": {
        "directors": [
          {
            "role": "Director"
          }
        ]
      }
    }
  }
}

Response

Order created

statusstring
messagestring

Changes

    • breaking

      added the new required request property /////

    • breaking

      added to the ///// request property allOf list

    • breaking

      removed the enum value lisk of the request property //////

    • breaking

      removed the enum value lisk of the request property /////

    • breaking

      removed the enum value scroll of the request property //////

    • breaking

      removed the enum value scroll of the request property /////

    • breaking

      the ///// request property type changed from object to no type

    • breaking

      the ////// response's property type changed from object to no type for status

    • warning

      added the new solana enum value to the /////// response property for the response status

    • warning

      added the new solana enum value to the ////// response property for the response status

    • warning

      added the new starknet enum value to the /////// response property for the response status

    • warning

      added the new starknet enum value to the ////// response property for the response status

    • warning

      added the new tron enum value to the /////// response property for the response status

    • warning

      added the new tron enum value to the ////// response property for the response status

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new optional request property

    • info

      added the new optional request property /////

    • info

      added the new optional request property

    • info

      added crypto fiat discriminator mapping keys to the request property

    • info

      added fiat crypto discriminator mapping keys to the request property

    • info

      added the new solana enum value to the request property //////

    • info

      added the new solana enum value to the request property /////

    • info

      added the new starknet enum value to the request property //////

    • info

      added the new starknet enum value to the request property /////

    • info

      added the new tron enum value to the request property //////

    • info

      added the new tron enum value to the request property /////

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional write-only property data/destination/oneOf[V2CryptoDestination]/kyc to the response with the status

    • info

      added the optional write-only property data/destination/oneOf[V2CryptoDestination]/providerIds to the response with the status

    • info

      added the optional write-only property data/destination/oneOf[V2FiatDestination]/providerIds to the response with the status

    • info

      added the optional write-only property data/source/oneOf[V2CryptoSource]/kyc to the response with the status

    • info

      added to the ////// response property allOf list for the response status

    • info

      removed the lisk enum value from the /////// response property for the response status

    • info

      removed the lisk enum value from the ////// response property for the response status

    • info

      removed the otc enum value from the / response property for the response status

    • info

      removed the scroll enum value from the /////// response property for the response status

    • info

      removed the scroll enum value from the ////// response property for the response status

    • info

      added the required write-only property data/source/oneOf[V2FiatSource]/kyc to the response with the status