> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mercoa.com/embedded-ap-ar/api-reference/payment-gateway/process/create/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # Create Process Job POST https://api.mercoa.com/payment-gateway/process Content-Type: application/json Create a job to process a payment through a payment gateway Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/payment-gateway/process/create ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Body (application/json) This endpoint expects an object. - `object` - `type`: `document` - `cardDetails` (object, required) — The details of the card to use for the payment - `type`: `direct` - `cardNumber` (string, required) — The number of the card to use for the payment - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `cvv` (string, required) — The CVV of the card to use for the payment - `expirationMonth` (integer, required) — The month of the expiration date of the card to use for the payment. This must be a number between 1 and 12. - `expirationYear` (integer, required) — The year of the expiration date of the card to use for the payment. This must be the full year, not the last two digits. - `firstName` (string, required) — The first name of the card user - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `type`: `iframe` - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `firstName` (string, required) — The first name of the card user - `iframeUrl` (string, required) — The URL of the iframe that render the virtual card details - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `type`: `stripeIssuing` - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `ephemeralKeyEndpoint` (object, required) — The endpoint configuration for generating ephemeral keys. Expects a JSON response with a `ephemeralKeySecret` field. - `url` (string, required) — The URL endpoint to call for generating ephemeral keys - `method` (string, required, default: POST) — The HTTP method to use for the request - `headers` (map from string to string, required) — The headers to include in the request. Supports variables \{\{cardId}}, \{\{nonce}}, and \{\{accountId}} that will be replaced with actual values. - `postBody` (string, optional) — The body to include in the POST request. Supports variables \{\{cardId}}, \{\{nonce}}, and \{\{accountId}} that will be replaced with actual values. - `firstName` (string, required) — The first name of the card user - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `stripeCardId` (string, required) — The Stripe Issuing card ID - `stripePublishableKey` (string, required) — The Stripe publishable key for the Issuing Elements - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `stripeAccountId` (string, optional) — The Stripe account ID (optional, used for connected accounts) - `type`: `lithic` - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `embedRequest` (string, required) — The base64-encoded embed request for the Lithic virtual card - `firstName` (string, required) — The first name of the card user - `hmac` (string, required) — The HMAC signature for the embed request - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `type`: `marqetaJs` - `cardToken` (string, required) — The Marqeta card token for the virtual card - `clientAccessToken` (string, required) — The Marqeta client access token for Marqeta.js authentication - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `firstName` (string, required) — The first name of the card user - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `document` (string, required) — The invoice document PDF to extract the payment gateway from. Must be in base64 format or a publicly accessible URL. - `type`: `html` - `cardDetails` (object, required) — The details of the card to use for the payment - `type`: `direct` - `cardNumber` (string, required) — The number of the card to use for the payment - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `cvv` (string, required) — The CVV of the card to use for the payment - `expirationMonth` (integer, required) — The month of the expiration date of the card to use for the payment. This must be a number between 1 and 12. - `expirationYear` (integer, required) — The year of the expiration date of the card to use for the payment. This must be the full year, not the last two digits. - `firstName` (string, required) — The first name of the card user - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `type`: `iframe` - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `firstName` (string, required) — The first name of the card user - `iframeUrl` (string, required) — The URL of the iframe that render the virtual card details - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `type`: `stripeIssuing` - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `ephemeralKeyEndpoint` (object, required) — The endpoint configuration for generating ephemeral keys. Expects a JSON response with a `ephemeralKeySecret` field. - `url` (string, required) — The URL endpoint to call for generating ephemeral keys - `method` (string, required, default: POST) — The HTTP method to use for the request - `headers` (map from string to string, required) — The headers to include in the request. Supports variables \{\{cardId}}, \{\{nonce}}, and \{\{accountId}} that will be replaced with actual values. - `postBody` (string, optional) — The body to include in the POST request. Supports variables \{\{cardId}}, \{\{nonce}}, and \{\{accountId}} that will be replaced with actual values. - `firstName` (string, required) — The first name of the card user - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `stripeCardId` (string, required) — The Stripe Issuing card ID - `stripePublishableKey` (string, required) — The Stripe publishable key for the Issuing Elements - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `stripeAccountId` (string, optional) — The Stripe account ID (optional, used for connected accounts) - `type`: `lithic` - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `embedRequest` (string, required) — The base64-encoded embed request for the Lithic virtual card - `firstName` (string, required) — The first name of the card user - `hmac` (string, required) — The HMAC signature for the embed request - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `type`: `marqetaJs` - `cardToken` (string, required) — The Marqeta card token for the virtual card - `clientAccessToken` (string, required) — The Marqeta client access token for Marqeta.js authentication - `country` (enum, required) — The country of the address of the card - Allowed values: `AF`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `HR`, `CU`, `CW`, `CY`, `CZ`, `CI`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RO`, `RU`, `RW`, `RE`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `AX` - `firstName` (string, required) — The first name of the card user - `lastName` (string, required) — The last name of the card user - `postalCode` (string, required) — The postal code of the address of the card - `achDetails` (object, optional) — The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing. - `routingNumber` (string, required) — The routing number of the ACH account - `accountNumber` (string, required) — The account number of the ACH account - `accountName` (string, optional) — The name on the ACH account - `accountType` (enum, optional) — The type of bank account (checking or savings) - Allowed values: `CHECKING`, `SAVINGS`, `UNKNOWN` - `cardType` (enum, optional) — The type of card (credit or debit). Defaults to debit. - Allowed values: `credit`, `debit` - `email` (string, optional) — The email of the card user - `fullAddress` (string, optional) — The full address of the card user - `phoneNumber` (string, optional) — The phone number of the card user - `html` (string, required) — The HTML from an email to extract the payment gateway from ## Response ### 200 - `object` - `jobStatus`: `pending` - `createdAt` (datetime, required) — The timestamp when the job was created - `jobId` (string, required) — The job ID of the payment gateway processing job - `updatedAt` (datetime, required) — The timestamp when the job was last updated - `jobStatus`: `success` - `attempts` (list of object, required) — List of payment gateway attempts for this job - `id` (string, required) — The unique identifier for the payment gateway attempt - `status` (enum, required) — The status of the attempt - Allowed values: `PENDING`, `COMPLETED`, `FAILED` - `createdAt` (datetime, required) — The timestamp when the attempt was created - `amount` (double, optional) — The amount processed in this attempt - `receiptUrl` (string, optional) — The URL of the receipt for this attempt - `createdAt` (datetime, required) — The timestamp when the job was created - `jobId` (string, required) — The job ID of the payment gateway processing job - `updatedAt` (datetime, required) — The timestamp when the job was last updated - `gatewayAmount` (double, optional) — The amount displayed on the payment gateway (may include fees) - `invoiceAmount` (double, optional) — The invoice amount detected from the payment gateway - `receiptUrl` (string, optional) — The URL of the receipt that was downloaded from the payment gateway - `requiredData` (object, optional) — Information about what data is required to proceed with payment - `needsAccountNumber` (boolean, optional) — Whether the payment gateway requires an account number to proceed - `needsPostalCode` (boolean, optional) — Whether the payment gateway requires a postal code to proceed - `needsEmail` (boolean, optional) — Whether the payment gateway requires an email address to proceed - `needsAccountHolderFirstName` (boolean, optional) — Whether the payment gateway requires the account holder's first name to proceed - `needsAccountHolderLastName` (boolean, optional) — Whether the payment gateway requires the account holder's last name to proceed - `needsFullServiceAddress` (boolean, optional) — Whether the payment gateway requires a full service address to proceed - `needsPhoneNumber` (boolean, optional) — Whether the payment gateway requires a phone number to proceed - `vendorName` (string, optional) — The vendor name detected from the payment gateway - `jobStatus`: `failed` - `createdAt` (datetime, required) — The timestamp when the job was created - `errorType` (enum, required) — The error that occurred during the payment gateway processing job - Allowed values: `NO_VALID_PAYMENT_GATEWAY_FOUND`, `PAYMENT_GATEWAY_UNSUPPORTED`, `CARD_DETAILS_INVALID`, `CARD_DECLINED`, `INVOICE_AMOUNT_MISMATCH` - `jobId` (string, required) — The job ID of the payment gateway processing job - `updatedAt` (datetime, required) — The timestamp when the job was last updated - `errorMessage` (string, optional) — The error message that occurred during the payment gateway processing job ## Errors ### 400 Bad Request - `errorName` ("BadRequest", required) - `content` (string, required) ### 401 Unauthorized - `errorName` ("Unauthorized", required) - `content` (string, required) ### 403 Forbidden - `errorName` ("Forbidden", required) - `content` (string, required) ### 404 Not Found - `errorName` ("NotFound", required) - `content` (string, required) ### 409 Conflict - `errorName` ("Conflict", required) - `content` (string, required) ### 500 Internal Server Error - `errorName` ("InternalServerError", required) - `content` (string, required) ### 501 Unimplemented - `errorName` ("Unimplemented", required) - `content` (string, required) ## Examples ### Direct **Request** ```json { "type": "document", "cardDetails": { "type": "direct", "cardNumber": "4242424242424242", "country": "US", "cvv": "123", "expirationMonth": 10, "expirationYear": 2025, "firstName": "John", "lastName": "Doe", "postalCode": "12345", "achDetails": { "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" } }, "document": "data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==" } ``` **Response** ```json { "jobStatus": "pending", "createdAt": "2024-01-01T00:00:00Z", "jobId": "pgp_8f86116b-3b4d-4ded-99ef-3bc929d8c33c", "updatedAt": "2024-01-01T00:00:00Z" } ``` **SDK Code** ```python Direct import requests url = "https://api.mercoa.com/payment-gateway/process" payload = { "type": "document", "cardDetails": { "type": "direct", "cardNumber": "4242424242424242", "country": "US", "cvv": "123", "expirationMonth": 10, "expirationYear": 2025, "firstName": "John", "lastName": "Doe", "postalCode": "12345", "achDetails": { "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" } }, "document": "data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript Direct import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.paymentGateway.process.create({ type: "document", document: "data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==", cardDetails: { type: "direct", firstName: "John", lastName: "Doe", cardNumber: "4242424242424242", expirationMonth: 10, expirationYear: 2025, cvv: "123", postalCode: "12345", country: "US", achDetails: { routingNumber: "123456789", accountNumber: "987654321", accountName: "John Doe" } } }); ``` ```go Direct package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/payment-gateway/process" payload := strings.NewReader("{\n \"type\": \"document\",\n \"cardDetails\": {\n \"type\": \"direct\",\n \"cardNumber\": \"4242424242424242\",\n \"country\": \"US\",\n \"cvv\": \"123\",\n \"expirationMonth\": 10,\n \"expirationYear\": 2025,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n }\n },\n \"document\": \"data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Direct require 'uri' require 'net/http' url = URI("https://api.mercoa.com/payment-gateway/process") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"document\",\n \"cardDetails\": {\n \"type\": \"direct\",\n \"cardNumber\": \"4242424242424242\",\n \"country\": \"US\",\n \"cvv\": \"123\",\n \"expirationMonth\": 10,\n \"expirationYear\": 2025,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n }\n },\n \"document\": \"data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==\"\n}" response = http.request(request) puts response.read_body ``` ```java Direct import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/payment-gateway/process") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"document\",\n \"cardDetails\": {\n \"type\": \"direct\",\n \"cardNumber\": \"4242424242424242\",\n \"country\": \"US\",\n \"cvv\": \"123\",\n \"expirationMonth\": 10,\n \"expirationYear\": 2025,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n }\n },\n \"document\": \"data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==\"\n}") .asString(); ``` ```php Direct request('POST', 'https://api.mercoa.com/payment-gateway/process', [ 'body' => '{ "type": "document", "cardDetails": { "type": "direct", "cardNumber": "4242424242424242", "country": "US", "cvv": "123", "expirationMonth": 10, "expirationYear": 2025, "firstName": "John", "lastName": "Doe", "postalCode": "12345", "achDetails": { "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" } }, "document": "data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Direct using RestSharp; var client = new RestClient("https://api.mercoa.com/payment-gateway/process"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"document\",\n \"cardDetails\": {\n \"type\": \"direct\",\n \"cardNumber\": \"4242424242424242\",\n \"country\": \"US\",\n \"cvv\": \"123\",\n \"expirationMonth\": 10,\n \"expirationYear\": 2025,\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n }\n },\n \"document\": \"data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Direct import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "document", "cardDetails": [ "type": "direct", "cardNumber": "4242424242424242", "country": "US", "cvv": "123", "expirationMonth": 10, "expirationYear": 2025, "firstName": "John", "lastName": "Doe", "postalCode": "12345", "achDetails": [ "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" ] ], "document": "data:application/pdf;base64,JVBERi0xLjEKJcKlwrHDqwoKMSAwIG9iagogIDw8IC9UeXBlIC9DYXRhbG9nCiAgICAgL1BhZ2VzIDIgMCBSCiAgPj4KZW5kb2JqCgoyIDAgb2JqCiAgPDwgL1R5cGUgL1BhZ2VzCiAgICAgL0tpZHMgWzMgMCBSXQogICAgIC9Db3VudCAxCiAgICAgL01lZGlhQm94IFswIDAgMzAwIDE0NF0KICA+PgplbmRvYmoKCjMgMCBvYmoKICA8PCAgL1R5cGUgL1BhZ2UKICAgICAgL1BhcmVudCAyIDAgUgogICAgICAvUmVzb3VyY2VzCiAgICAgICA8PCAvRm9udAogICAgICAgICAgIDw8IC9GMQogICAgICAgICAgICAgICA8PCAvVHlwZSAvRm9udAogICAgICAgICAgICAgICAgICAvU3VidHlwZSAvVHlwZTEKICAgICAgICAgICAgICAgICAgL0Jhc2VGb250IC9UaW1lcy1Sb21hbgogICAgICAgICAgICAgICA+PgogICAgICAgICAgID4+CiAgICAgICA+PgogICAgICAvQ29udGVudHMgNCAwIFIKICA+PgplbmRvYmoKCjQgMCBvYmoKICA8PCAvTGVuZ3RoIDU1ID4+CnN0cmVhbQogIEJUCiAgICAvRjEgMTggVGYKICAgIDAgMCBUZAogICAgKEhlbGxvIFdvcmxkKSBUagogIEVUCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxOCAwMDAwMCBuIAowMDAwMDAwMDc3IDAwMDAwIG4gCjAwMDAwMDAxNzggMDAwMDAgbiAKMDAwMDAwMDQ1NyAwMDAwMCBuIAp0cmFpbGVyCiAgPDwgIC9Sb290IDEgMCBSCiAgICAgIC9TaXplIDUKICA+PgpzdGFydHhyZWYKNTY1CiUlRU9GCg==" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/payment-gateway/process")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Iframe **Request** ```json { "type": "html", "cardDetails": { "type": "iframe", "country": "US", "firstName": "John", "iframeUrl": "https://www.myvirtualcard.com/iframe/543543", "lastName": "Doe", "postalCode": "12345", "achDetails": { "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" }, "cardType": "debit" }, "html": "

Invoice Details

Pay Invoice" } ``` **Response** ```json { "jobStatus": "pending", "createdAt": "2024-01-01T00:00:00Z", "jobId": "pgp_8f86116b-3b4d-4ded-99ef-3bc929d8c33c", "updatedAt": "2024-01-01T00:00:00Z" } ``` **SDK Code** ```python Iframe import requests url = "https://api.mercoa.com/payment-gateway/process" payload = { "type": "html", "cardDetails": { "type": "iframe", "country": "US", "firstName": "John", "iframeUrl": "https://www.myvirtualcard.com/iframe/543543", "lastName": "Doe", "postalCode": "12345", "achDetails": { "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" }, "cardType": "debit" }, "html": "

Invoice Details

Pay Invoice" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript Iframe import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.paymentGateway.process.create({ type: "html", html: "

Invoice Details

Pay Invoice", cardDetails: { type: "iframe", firstName: "John", lastName: "Doe", postalCode: "12345", country: "US", cardType: "debit", iframeUrl: "https://www.myvirtualcard.com/iframe/543543", achDetails: { routingNumber: "123456789", accountNumber: "987654321", accountName: "John Doe" } } }); ``` ```go Iframe package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/payment-gateway/process" payload := strings.NewReader("{\n \"type\": \"html\",\n \"cardDetails\": {\n \"type\": \"iframe\",\n \"country\": \"US\",\n \"firstName\": \"John\",\n \"iframeUrl\": \"https://www.myvirtualcard.com/iframe/543543\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n },\n \"cardType\": \"debit\"\n },\n \"html\": \"

Invoice Details

Pay Invoice\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Iframe require 'uri' require 'net/http' url = URI("https://api.mercoa.com/payment-gateway/process") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"type\": \"html\",\n \"cardDetails\": {\n \"type\": \"iframe\",\n \"country\": \"US\",\n \"firstName\": \"John\",\n \"iframeUrl\": \"https://www.myvirtualcard.com/iframe/543543\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n },\n \"cardType\": \"debit\"\n },\n \"html\": \"

Invoice Details

Pay Invoice\"\n}" response = http.request(request) puts response.read_body ``` ```java Iframe import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/payment-gateway/process") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"type\": \"html\",\n \"cardDetails\": {\n \"type\": \"iframe\",\n \"country\": \"US\",\n \"firstName\": \"John\",\n \"iframeUrl\": \"https://www.myvirtualcard.com/iframe/543543\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n },\n \"cardType\": \"debit\"\n },\n \"html\": \"

Invoice Details

Pay Invoice\"\n}") .asString(); ``` ```php Iframe request('POST', 'https://api.mercoa.com/payment-gateway/process', [ 'body' => '{ "type": "html", "cardDetails": { "type": "iframe", "country": "US", "firstName": "John", "iframeUrl": "https://www.myvirtualcard.com/iframe/543543", "lastName": "Doe", "postalCode": "12345", "achDetails": { "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" }, "cardType": "debit" }, "html": "

Invoice Details

Pay Invoice" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Iframe using RestSharp; var client = new RestClient("https://api.mercoa.com/payment-gateway/process"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"type\": \"html\",\n \"cardDetails\": {\n \"type\": \"iframe\",\n \"country\": \"US\",\n \"firstName\": \"John\",\n \"iframeUrl\": \"https://www.myvirtualcard.com/iframe/543543\",\n \"lastName\": \"Doe\",\n \"postalCode\": \"12345\",\n \"achDetails\": {\n \"routingNumber\": \"123456789\",\n \"accountNumber\": \"987654321\",\n \"accountName\": \"John Doe\"\n },\n \"cardType\": \"debit\"\n },\n \"html\": \"

Invoice Details

Pay Invoice\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Iframe import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "type": "html", "cardDetails": [ "type": "iframe", "country": "US", "firstName": "John", "iframeUrl": "https://www.myvirtualcard.com/iframe/543543", "lastName": "Doe", "postalCode": "12345", "achDetails": [ "routingNumber": "123456789", "accountNumber": "987654321", "accountName": "John Doe" ], "cardType": "debit" ], "html": "

Invoice Details

Pay Invoice" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/payment-gateway/process")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```