Skip to main content
POST
/
payments
/
transactions
Create a payment transaction
curl --request POST \
  --url https://api-sb.meld.io/payments/transactions \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceAmount": "10.50",
  "sourceCurrencyCode": "USD"
}
'
{
  "transaction": {
    "createdAt": "2023-11-07T05:31:56Z",
    "id": "<string>",
    "serviceProvider": "<string>",
    "sessionId": "<string>",
    "status": "<string>",
    "transactionType": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z",
    "accountId": "<string>",
    "countryCode": "<string>",
    "cryptoDetails": {
      "blockchainTransactionId": "<string>",
      "chainId": "<string>",
      "institution": "<string>",
      "networkFee": 123,
      "networkFeeInUsd": 123,
      "offrampDestinationWalletAddress": "<string>",
      "partnerFee": 123,
      "partnerFeeInUsd": 123,
      "swapFee": 123,
      "swapFeeInUsd": 123,
      "totalFee": 123,
      "totalFeeInUsd": 123,
      "transactionFee": 123,
      "transactionFeeInUsd": 123,
      "walletAddress": "<string>"
    },
    "customer": {
      "accountId": "<string>",
      "addresses": [
        {
          "addressDetails": {
            "city": "<string>",
            "country": "<string>",
            "firstName": "<string>",
            "lastName": "<string>",
            "lineOne": "<string>",
            "lineTwo": "<string>",
            "postalCode": "<string>",
            "region": "<string>"
          }
        }
      ],
      "email": "<string>",
      "externalId": "<string>",
      "id": "<string>",
      "name": {
        "firstName": "<string>",
        "lastName": "<string>"
      },
      "phone": "<string>",
      "serviceProviders": {},
      "status": "<string>"
    },
    "description": "<string>",
    "destinationAmount": 123,
    "destinationCurrencyCode": "<string>",
    "externalCustomerId": "<string>",
    "externalReferenceId": "<string>",
    "externalSessionId": "<string>",
    "externalSubaccountCustomerId": "<string>",
    "fiatAmountInUsd": 123,
    "isImported": true,
    "isPassthrough": true,
    "key": "<string>",
    "multiFactorAuthorizationStatus": [
      {
        "submitted": true,
        "successful": true,
        "url": "<string>"
      }
    ],
    "orderId": "<string>",
    "parentPaymentTransactionId": "<string>",
    "passthroughReference": "<string>",
    "paymentDetails": {
      "authAmount": 123,
      "captureAmount": 123
    },
    "paymentMethodType": "<string>",
    "serviceProviderCreatedAt": "2023-11-07T05:31:56Z",
    "serviceProviderDetails": {},
    "serviceProviderTransactionUrl": "<string>",
    "serviceTransactionId": "<string>",
    "sessionClientTags": {},
    "sourceAmount": 123,
    "sourceCurrencyCode": "<string>",
    "subaccountCustomerId": "<string>"
  }
}

Authorizations

Authorization
string
header
default:BASIC <Meld API Key>
required

Headers

X-Idempotency-Key
string<uuid>
Meld-Passthrough-Reference
string
Meld-Passthrough-Key-Id
string
Meld-Passthrough-Key-Public
string
Meld-Passthrough-Key-Private
string
Meld-Passthrough-Oauth
string

Body

application/json
sourceAmount
string
required

Amount intended to be collected by this payment

Minimum string length: 1
Example:

"10.50"

sourceCurrencyCode
string
required

Three-letter ISO currency code, in lowercase. Must be a supported currency

Minimum string length: 1
Example:

"USD"

3ds
object

3ds settings

capture
boolean

Should the payment be captured immediately, if set to false an authorization will be performed instead

customer
object

Information about your customer

customerId
string

Meld's internal Id for the Customer

description
string

A description about the transaction

externalCustomerId
string

Your (optional) Id for this customer, for example an id or reference from your database which you may supply during customer creation

nonce
string

A payment method nonce is a secure, one-time-use reference to payment information. It's the key element that allows your server to communicate sensitive payment information to the service provider without ever touching the raw data.

paymentMethod
object

PaymentMethod objects represent your customer's payment instruments.

serviceProvider
enum<string>

The service provider used for this transaction. Required when using a nonce or passthrough credentials, as they are tied to a specific service provider. Do not pass this in if you would like to use routing to select a service provider.

Available options:
AUTHORIZENET,
BRAINTREE,
CHECKOUT,
CIRCLE,
NMI,
STRIPE
serviceProviderDetails
object

Provider specific details which may can be provided for this transaction, if supported by the Service Provider. For example, you can set a custom billing descriptor for your transaction using Checkout.com

Response

Payment transaction created successfully

transaction
object

Payment transaction information