Transfers

Create social pay order with two step verification

POST2FA/v3/social-pay/order
2FA

This operation uses two-step verification: first call without proof headers (expect 428 with a ticket), complete /v1/auth/two-step-verification/*, then retry with x-two-step-verification-proof-token and x-two-step-verification-operation-id. See Two-factor authentication.

Creates a new social payment order. The recipient is identified by email, phone, or alias depending on the type field. The amount is debited from the sender's pocket.

This endpoint requires two step verification, and the verification is bound to this exact order: pocket, type, recipient, currency, amount, concept and note.

  1. Call this endpoint without the verification headers. The response is a 428 with data.ticket and data.operationId.
  2. Complete the verification with the ticket: call POST /v1/auth/two-step-verification/initiate, then POST /v1/auth/two-step-verification/verify. To send the code again or use a different channel, call POST /v1/auth/two-step-verification/reissue.
  3. Repeat this request with the same body, the proofToken from the verify response in x-two-step-verification-proof-token, and the data.operationId from step 1 in x-two-step-verification-operation-id.

A proof token can be used only once and expires two minutes after the verification. If it is missing, invalid, expired, already used, issued for a different operation, or the body changed, the response is a new 428 with a new ticket and operation ID. Start again from step 2 with those values.

Stablecoin orders can also answer a 428 for SCA (B2M_AUTH_SCA_*, no data). Resolve it first, then repeat the request: the proof token is not spent by an SCA 428.

Do not use GET /v3/signin/sfa or the x-totp headers for this endpoint.

Authorization

ApiKeyAuth
X-Api-Key<token>

For accessing these endpoints a valid API key must be sent in the X-Api-Key header.

In: header

Header Parameters

x-two-step-verification-proof-token?string

Proof token returned by POST /v1/auth/two-step-verification/verify. Omit it on the first request. Treat it as an opaque secret: do not parse or log it.

x-two-step-verification-operation-id?string

The data.operationId from the 428 response, sent unchanged. Required when x-two-step-verification-proof-token is sent.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

Create social pay order with two step verification
curl --request POST \  --url 'https://gateway.bit2me.com/v3/social-pay/order' \  --header 'Content-Type: application/json' \  --data '{  "amount": "10.00",  "concept": "Dinner",  "currency": "EUR",  "email": "recipient@example.com",  "pocketId": "e108f9c3-c3ae-4c43-b2fb-7ac04c2f12f6",  "type": "email"}'
{  "amount": "2.00000000",  "createdAt": "2023-02-14T11:30:38.918Z",  "currency": "EUR",  "email": "recipient@example.com",  "expiryDate": "2023-02-21T11:30:38.912Z",  "orderId": "25e9349b-4039-4865-b306-56f3a2e1b916",  "pocketId": "9ca6cf96-4645-4658-b086-6cdb367c16bd",  "senderName": "Pineapple S.",  "status": "pending",  "statusChanges": [    {      "author": "00000000-0000-4000-8000-000000000001",      "created": "2023-02-14T11:30:38.914Z",      "newStatus": "waiting-funds",      "reason": "Order created"    },    {      "author": "00000000-0000-4000-8000-000000000001",      "created": "2023-02-14T11:30:39.158Z",      "newStatus": "pending",      "reason": "Order accepted"    }  ],  "type": "email",  "userId": "61afcba0-6152-4af6-8610-4bebc915249e",  "walletMovementId": "7a24b421-c92a-401c-9104-171a60cbe64d"}