post
https://sandbox.bluesnap.com/services/2/alt-transactions
The Create Pay by Bank Transaction request performs a transaction using the Pay by Bank payment method. For implementation details, see Pay by Bank.
Request Content
Send an altTransaction object. The type of shopper determines the content required in the request body:
- New shopper — include a payerInfo object.
- Returning shopper — include the
vaultedShopperIdto identify the shopper and their payment information.
The following table describes required and optional body parameters:
<th>
Type
</th>
<th>
Required
</th>
</tr>
<td>
*decimal*
</td>
<td>
<span style="color:#F37500; weight: bold">required</span>
</td>
</tr>
<tr>
<td>
`currency`
</td>
<td>
*string*
</td>
<td>
<span style="color:#F37500; weight: bold">required</span>
</td>
</tr>
<tr>
<td>
`merchantTransactionId`
</td>
<td>
*string*
</td>
<td>
optional
</td>
</tr>
<tr>
<td>
`payByBankTransaction`
</td>
<td>
*object*
</td>
<td>
<span style="color:#F37500; weight: bold">required</span>. See [payByBankTranscation](ref:paybybanktranscation).
</td>
</tr>
<tr>
<td>
`payerInfo`
</td>
<td>
*object*
</td>
<td>
<span style="color:#F37500; weight: bold">required</span> for a new shopper. See [payerInfo](ref:payer-info).
</td>
</tr>
<tr>
<td>
`productDescription`
</td>
<td>
*string*
</td>
<td>
optional
</td>
</tr>
<tr>
<td>
`softDescriptor`
</td>
<td>
*string*
</td>
<td>
optional
</td>
</tr>
<tr>
<td>
`transactionMetaData`
</td>
<td>
*object*
</td>
<td>
optional (see [transactionMetaData](ref:transaction-meta-data))
</td>
</tr>
<tr>
<td>
`vaultedShopperId`
</td>
<td>
*integer*
</td>
<td>
<span style="color:#F37500; weight: bold">required</span> for a returning shopper. See [vaultedShopper](vaulted-shopper).
</td>
</tr>
<tr>
<td>
`vendorsInfo`
</td>
<td>
*object*
</td>
<td>
<span style="color:#F37500; weight: bold">required</span> if using marketplace vendors (see [vendorsInfo](ref:vendorsinfo))
</td>
</tr>
| Property |
|---|
| `amount` |
Response
Successful requests return the HTTP response status code 200 OK and a response body that contains the following properties:
| Property | Notes |
|---|---|
amount | Value of the transaction in the provided currency. |
currency | Currency used to process the transaction. |
merchantTransactionId | Merchant-provided unique identifier for the transaction. |
payByBankTransaction | See payByBankTranscation. |
payerInfo | Returned when vaultedShopperId is not sent in the request. See payerInfo. |
processingInfo | Status of the transaction. See processingInfo. |
productDescription | Details about the product purchased in the transaction. |
transactionId | Unique identifier for the transaction. |
vaultedShopperId | Unique identifier for the vaulted shopper. |
Examples
Request Examples
curl --request POST \
--url https://sandbox.bluesnap.com/services/2/alt-transactions \
--header 'Authorization: Basic QVBJXzE2MTk2MjgyMzU0ODkyMDM5MTMzODc0OkFsdG9pZHMxIQ==' \
--header 'accept: application/json' \
--header 'bluesnap-version: 3.0' \
--header 'content-type: application/json' \
--data '
{
"payByBankTransaction": {
"returnUrl": "https://path/to/success-page?success=true",
"cancelUrl": "https://path/to/failure-page?failure=true",
"iban": "DE12345678901234567890"
},
"amount": 100,
"payerInfo": {
"zip": "12345",
"firstName": "Jane",
"lastName": "Doe",
"country": "de"
},
"currency": "EUR"
}'
curl --request POST \
--url https://sandbox.bluesnap.com/services/2/alt-transactions \
--header 'Authorization: Basic QVBJXzE2MTk2MjgyMzU0ODkyMDM5MTMzODc0OkFsdG9pZHMxIQ==' \
--header 'accept: application/json' \
--header 'bluesnap-version: 3.0' \
--header 'content-type: application/json' \
--data '
{
"payByBankTransaction": {
"returnUrl": "https://returnURL?success=true",
"cancelUrl": "https://cancelURL?failure=true"
},
"vaultedShopperId": 87654321,
"amount": 100,
"currency": "EUR"
}'
Response Examples
{
"transactionId": "12345678",
"amount": 100,
"currency": "EUR",
"payerInfo": {
"firstName": "Jane",
"lastName": "Doe",
"country": "de",
"zip": "12345"
},
"vaultedShopperId": 87654321,
"payByBankTransaction": {
"payByBankUrl": "https://<hostname>:8444/services/fel/pbb/hostedpage?hpid=<hosted-page-id>==&invid=<invid-id>",
"ibanFirstFour": "DE12",
"ibanLastFour": "7890"
},
"productDescription": "N/A",
"processingInfo": {
"processingStatus": "PENDING"
}
}
{
"transactionId": "12345678",
"amount": 100,
"currency": "EUR",
"vaultedShopperId": 87654321,
"payByBankTransaction": {
"payByBankUrl": "https://<hostname>:8444/services/fel/pbb/hostedpage?hpid=<hosted-page-id>==&invid=<invid-id>",
"ibanFirstFour": "DE12",
"ibanLastFour": "7890"
},
"productDescription": "N/A",
"processingInfo": {
"processingStatus": "PENDING"
}
}
