Skip to content

Credit Card Remittance

Request URL

POST /remittance/creditCardPayment

Description

This endpoint transfers funds from a source account to a credit card account identified by a destinationAccountId. The transaction is queued and may be undone before it is completed.

The response indicates success if the request is successfully queued. An undo response object is returned (see Undo) with an undo ID (handle) that may be used to cancel the payment.

Schema

Property table for remittance/creditCardPayment

Property Description Required Schema
sourceAccountId ampliFi ID of source account Yes {
  "type": "string"
}
destinationAccountId ampliFi ID of destination account Yes {
  "type": "string"
}
amount Amount Yes {
  "type": "string"
}
currency 3-letter ISO alphabetic code to identify the currency Yes {
  "type": "string",
  "pattern": "^[A-Z]{3}$"
}
narrativeDebit A brief description, used if transaction is debit No {
  "type": "string",
  "nullable": true
}
narrativeCredit A brief description, used if transaction is credit No {
  "type": "string",
  "nullable": true
}

Request Body

{
  "sourceAccountId": "qwegal8kgtmysmels",
  "destinationAccountId": "qwegalgmnr8njtinq",
  "amount": 0.01,
  "currency": "USD"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
  "sourceAccountId": "qwegal8kgtmysmels",
  "destinationAccountId": "qwegalgmnr8njtinq",
  "amount": 0.01,
  "currency": "USD"
};
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/remittance/creditCardPayment',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token request"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/remittance/creditCardPayment" --data "{  \"sourceAccountId\":\"qwegal8kgtmysmels\", \"destinationAccountId\":\"qwegalgmnr8njtinq\", \"amount\":0.01, \"currency\":\"USD\"}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 REMITTANCE/CREDITCARDPAYMENT SUCCESSFUL RESPONSE QUEUING CREDIT CARD PAYMENT

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

REQUEST BODY

{
  "sourceAccountId": "qwegal8kgtmysmels",
  "destinationAccountId": "qwegalgmnr8njtinq",
  "amount": 0.01,
  "currency": "USD"
}

RESPONSE BODY

{
    "success": true,
    "text": "queued the funds transfer",
    "undo": {
        "id": "znqmz",
        "isActionable": false,
        "dtsQueued": "2023-12-20T12:55:47.032Z",
        "dtsExpiry": "2023-12-20T12:55:50.034Z"
    }
}